Skip to content
Myr

[vim] s:execute_term works in GVim on Windows

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

Requirements: - compiled with +terminal - has patch-8.0.995 - has('gui_running') returns 1

authored by Jan Edmund Lazo · committed by Junegunn Choi · parent 446e044 · Browse files · 1 file+8 added−3 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−3 removed

  • other:+8 added−3 removed

1 file+8 added−3 removed

modified:plugin/fzf.vim+8 added-3 removed
387 unmodified lines
388 let prefer_tmux = get(g:, 'fzf_prefer_tmux', 0)389 let use_height = has_key(dict, 'down') &&390 \ !(has('nvim') || s:is_win || has('win32unix') || s:present(dict, 'up', 'left', 'right')) &&391 \ executable('tput') && filereadable('/dev/tty')392 let use_term = has('nvim-0.2.1') || (has('nvim') && !s:is_win)392 let use_term = has('nvim-0.2.1') || (has('nvim') && !s:is_win) || (has('terminal') && has('gui_running') && has('patch-8.0.995'))393 let use_tmux = (!use_height && !use_term || prefer_tmux) && !has('win32unix') && s:tmux_enabled() && s:splittable(dict)394 if prefer_tmux && use_tmux395 let use_height = 0396 let use_term = 0
249 unmodified lines
646 enew647 endif648 endif649 endfunction650 function! fzf.on_exit(id, code, _event)650 function! fzf.on_exit(id, code, ...)651 if s:getpos() == self.ppos " {'window': 'enew'}652 for [opt, val] in items(self.winopts)653 execute 'let' opt '=' val654 endfor
36 unmodified lines
691 let command = fzf.temps.batchfile692 else693 let command = a:command694 endif695 let command .= s:term_marker696 if has('nvim')695 call termopen(command.s:term_marker, fzf)697 call termopen(command, fzf)698 else699 call term_start([&shell, &shellcmdflag, command], {'curwin': fzf.buf, 'exit_cb': function(fzf.on_exit)})700 endif701 finally702 if s:present(a:dict, 'dir')703 lcd -704 endif
93 unmodified lines