Skip to content
Myr

Merge pull request #506 from justinmk/fixvarmismatch

Before adoption: this commit came in with the history the project adopted, so no landing records it.

[vim] s:callback: Always return list.

authored by Junegunn Choi · committed by Junegunn Choi · parents 42c006d, a7bc9d5 · Browse files · 1 file+8 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−9 removed

  • other:+8 added−9 removed

1 file+8 added−9 removed

modified:plugin/fzf.vim+8 added-9 removed
237 unmodified lines
238 endif239 return 1240endfunction241242function! s:execute(dict, command, temps)242function! s:execute(dict, command, temps) abort243 call s:pushd(a:dict)244 silent! !clear 2> /dev/null245 let escaped = escape(substitute(a:command, '\n', '\\n', 'g'), '%#')246 if has('gui_running')
7 unmodified lines
254 redraw!255 return s:exit_handler(v:shell_error, command) ? s:callback(a:dict, a:temps) : []256endfunction257258function! s:execute_tmux(dict, command, temps)258function! s:execute_tmux(dict, command, temps) abort259 let command = a:command260 if s:pushd(a:dict)261 " -c '#{pane_current_path}' is only available on tmux 1.9 or above262 let command = 'cd '.s:escape(a:dict.dir).' && '.command
56 unmodified lines
319 setlocal winfixwidth winfixheight buftype=nofile bufhidden=wipe nobuflisted320 endtry321endfunction322323function! s:execute_term(dict, command, temps)323function! s:execute_term(dict, command, temps) abort324 call s:split(a:dict)325326 let fzf = { 'buf': bufnr('%'), 'dict': a:dict, 'temps': a:temps, 'name': 'FZF' }327 let s:command = a:command
40 unmodified lines
368 startinsert369 return []370endfunction371372function! s:callback(dict, temps)372function! s:callback(dict, temps) abort373let lines = []374try374 if !filereadable(a:temps.result)375 let lines = []376 else375 if filereadable(a:temps.result)376 let lines = readfile(a:temps.result)377 if has_key(a:dict, 'sink')378 for line in lines379 if type(a:dict.sink) == 2
10 unmodified lines
390391 for tf in values(a:temps)392 silent! call delete(tf)393 endfor395396 return lines394catch395 if stridx(v:exception, ':E325:') < 0396 echoerr v:exception397 endif398finally399 return lines400endtry401endfunction402403let s:default_action = {
56 unmodified lines