mirror of
https://github.com/lotabout/skim.git
synced 2026-09-10 07:16:23 -04:00
fix: handle deprecated --expect flag in sk 4.x vim plugin (#1057)
* fix: handle deprecated --expect flag in sk 4.x vim plugin sk 4.x deprecated --expect and no longer outputs the pressed key name as the first line of results. This caused s:common_sink to silently return without opening files, since it expected at least 2 lines (key + filename). Now handles both old and new output formats. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(vim): replace deprecated expect with accept bindings * fix(vim): shell-escape accept bindings --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Loric ANDRE <loric.andre@pm.me>
This commit is contained in:
parent
815a9b4f94
commit
974bd267cc
|
|
@ -338,7 +338,7 @@ function! skim#wrap(...)
|
||||||
" Action: g:skim_action
|
" Action: g:skim_action
|
||||||
if !s:has_any(opts, ['sink', 'sink*'])
|
if !s:has_any(opts, ['sink', 'sink*'])
|
||||||
let opts._action = get(g:, 'skim_action', s:default_action)
|
let opts._action = get(g:, 'skim_action', s:default_action)
|
||||||
let opts.options .= ' --expect='.join(keys(opts._action), ',')
|
let opts.options .= ' '.skim#shellescape('--bind='.join(map(keys(opts._action), 'v:val.":accept(".v:val.")"'), ','))
|
||||||
function! opts.sink(lines) abort
|
function! opts.sink(lines) abort
|
||||||
return s:common_sink(self._action, a:lines)
|
return s:common_sink(self._action, a:lines)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue