Skip to content

Commit

Permalink
Git Bash Mintty: only use cmd.exe if winpty missing
Browse files Browse the repository at this point in the history
Addresses junegunn#3809
  • Loading branch information
Konfekt committed May 22, 2024
1 parent 7205203 commit 8069868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,10 @@ function! s:execute(dict, command, use_height, temps) abort
call jobstart(cmd, fzf)
return []
endif
elseif has('win32unix') && $TERM !=# 'cygwin'
elseif has('win32unix') && $TERM_PROGRAM ==# 'mintty' && !executable('winpty')
let shellscript = s:fzf_tempname()
call s:writefile([command], shellscript)
let command = 'cmd.exe //C '.fzf#shellescape('set "TERM=" & start /WAIT sh -c '.shellscript)
let command = 'start //WAIT sh -c '.shellscript
let a:temps.shellscript = shellscript
endif
if a:use_height
Expand Down

0 comments on commit 8069868

Please sign in to comment.