Skip to content
Myr

[vim] Git Bash Mintty: only use cmd.exe if winpty missing (#3811)

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

* Git Bash Mintty: only use cmd.exe if winpty missing Addresses https://github.com/junegunn/fzf/issues/3809 * preferably use term in Git Bash for popup window See https://github.com/junegunn/fzf/pull/3811#issuecomment-2124241321

authored by Enno · committed by GitHub · parent 561f929 · Browse files · 1 file+5 added−4 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+5 added−4 removed

  • other:+5 added−4 removed

1 file+5 added−4 removed

modified:plugin/fzf.vim+5 added-4 removed
530 unmodified lines
531 \ !(has('nvim') || s:is_win || has('win32unix') || s:present(dict, 'up', 'left', 'right', 'window')) &&532 \ executable('tput') && filereadable('/dev/tty')533 let has_vim8_term = has('terminal') && has('patch-8.0.995')534 let has_nvim_term = has('nvim-0.2.1') || has('nvim') && !s:is_win535 let use_term = has_nvim_term ||536 \ has_vim8_term && !has('win32unix') && (has('gui_running') || s:is_win || s:present(dict, 'down', 'up', 'left', 'right', 'window'))535 let use_term = has_nvim_term || has_vim8_term 536 \ && !(has('win32unix') && $TERM_PROGRAM ==# 'mintty' && !executable('winpty'))537 \ && (has('gui_running') || s:is_win || s:present(dict, 'down', 'up', 'left', 'right', 'window'))538 let use_tmux = (has_key(dict, 'tmux') || (!use_height && !use_term || prefer_tmux) && !has('win32unix') && s:splittable(dict)) && s:tmux_enabled()539 if prefer_tmux && use_tmux540 let use_height = 0541 let use_term = 0
171 unmodified lines
713 let cmd = 'start /wait cmd /c '.command714 call jobstart(cmd, fzf)715 return []716 endif716 elseif has('win32unix') && $TERM !=# 'cygwin'717 elseif has('win32unix') && $TERM_PROGRAM ==# 'mintty' && !executable('winpty')718 let shellscript = s:fzf_tempname()719 call s:writefile([command], shellscript)719 let command = 'cmd.exe //C '.fzf#shellescape('set "TERM=" & start /WAIT sh -c '.shellscript)720 let command = 'start //WAIT sh -c '.shellscript721 let a:temps.shellscript = shellscript722 endif723 if a:use_height724 let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'
376 unmodified lines