Skip to content
Myr

[vim] Revert 7411da8d5a37b94b2171920c82c0dafe6f9115b6

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

Fix #3777

authored by Junegunn Choi · committed by Junegunn Choi · parent ed511d7 · Browse files · 1 file+9 added−20 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+9 added−20 removed

  • other:+9 added−20 removed

1 file+9 added−20 removed

modified:plugin/fzf.vim+9 added-20 removed
506 unmodified lines
507 let dict.dir = fnamemodify(dict.dir, ':p')508 endif509510 if has_key(dict, 'source')511 let source = remove(dict, 'source')511 let source = dict.source512 let type = type(source)513 if type == 1514 let source_command = source514 let prefix = '('.source.')|'515 elseif type == 3516 let temps.input = s:fzf_tempname()517 call s:writefile(source, temps.input)518 let source_command = (s:is_win ? 'type ' : 'cat ').fzf#shellescape(temps.input)518 let prefix = (s:is_win ? 'type ' : 'command cat ').fzf#shellescape(temps.input).'|'519 else520 throw 'Invalid source type'521 endif522 else523 let source_command = ''523 let prefix = ''524 endif525526 let prefer_tmux = get(g:, 'fzf_prefer_tmux', 0) || has_key(dict, 'tmux')527 let use_height = has_key(dict, 'down') && !has('gui_running') &&
15 unmodified lines
543 let optstr .= ' --height='.height544 endif545 " Respect --border option given in $FZF_DEFAULT_OPTS and 'options'546 let optstr = join([s:border_opt(get(dict, 'window', 0)), s:extract_option($FZF_DEFAULT_OPTS, 'border'), optstr])547 let prev_default_command = $FZF_DEFAULT_COMMAND548 if len(source_command)549 let $FZF_DEFAULT_COMMAND = source_command550 endif551 let command = (use_tmux ? s:fzf_tmux(dict) : fzf_exec).' '.optstr.' > '.temps.result547 let command = prefix.(use_tmux ? s:fzf_tmux(dict) : fzf_exec).' '.optstr.' > '.temps.result548549 if use_term550 return s:execute_term(dict, command, temps)551 endif
2 unmodified lines
554 \ : s:execute(dict, command, use_height, temps)555 call s:callback(dict, lines)556 return lines557finally562 if exists('source_command') && len(source_command)563 if len(prev_default_command)564 let $FZF_DEFAULT_COMMAND = prev_default_command565 else566 let $FZF_DEFAULT_COMMAND = ''567 silent! execute 'unlet $FZF_DEFAULT_COMMAND'568 endif569 endif558 let [&shell, &shellslash, &shellcmdflag, &shellxquote] = [shell, shellslash, shellcmdflag, shellxquote]559endtry560endfunction561
21 unmodified lines
583 break584 endif585 endfor586 endif599 return printf('LINES=%d COLUMNS=%d %s %s - --',600 \ &lines, &columns, fzf#shellescape(s:fzf_tmux), size)587 return printf('LINES=%d COLUMNS=%d %s %s %s --',588 \ &lines, &columns, fzf#shellescape(s:fzf_tmux), size, (has_key(a:dict, 'source') ? '' : '-'))589endfunction590591function! s:splittable(dict)592 return s:present(a:dict, 'up', 'down') && &lines > 15 ||
121 unmodified lines
714 let command = 'cmd.exe /C '.fzf#shellescape('set "TERM=" & start /WAIT sh -c '.shellscript)715 let a:temps.shellscript = shellscript716 endif717 if a:use_height718 let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'730 call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s < /dev/tty 2> /dev/tty', &lines, command))719 call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s %s 2> /dev/tty', &lines, command, stdin))720 else721 execute 'silent !'.command722 endif723 let exit_status = v:shell_error
371 unmodified lines