Skip to content
Myr

[vim] Add support for Cygwin (#933)

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

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

  • other:+10 added−3 removed

1 file+10 added−3 removed

modified:plugin/fzf.vim+10 added-3 removed
384 unmodified lines
385 endif386387 let prefer_tmux = get(g:, 'fzf_prefer_tmux', 0)388 let use_height = has_key(dict, 'down') &&389 \ !(has('nvim') || s:is_win || s:present(dict, 'up', 'left', 'right')) &&389 \ !(has('nvim') || s:is_win || has('win32unix') || s:present(dict, 'up', 'left', 'right')) &&390 \ executable('tput') && filereadable('/dev/tty')391 let use_term = has('nvim') && !s:is_win392 let use_tmux = (!use_height && !use_term || prefer_tmux) && s:tmux_enabled() && s:splittable(dict)392 let use_tmux = (!use_height && !use_term || prefer_tmux) && !has('win32unix') && s:tmux_enabled() && s:splittable(dict)393 if prefer_tmux && use_tmux394 let use_height = 0395 let use_term = 0396 endif
87 unmodified lines
484 \ synIDattr(hlID("Normal"), "bg"), synIDattr(hlID("Normal"), "fg"),485 \ &columns, &lines/2, getwinposx(), getwinposy())486endfunction487unlet! s:launcher488if s:is_win488if s:is_win || has('win32unix')489 let s:launcher = '%s'490else491 let s:launcher = function('s:xterm_launcher')492endif
43 unmodified lines
536 let cmd = 'start /wait cmd /c '.command537 call jobstart(cmd, fzf)538 return []539 endif540 elseif has('win32unix') && $TERM !=# 'cygwin'541 let shellscript = s:fzf_tempname()542 call writefile([command], shellscript)543 let command = 'cmd.exe /C '.fzf#shellescape('set "TERM=" & start /WAIT sh -c '.shellscript)544 let a:temps.shellscript = shellscript545 endif546 if a:use_height547 let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'548 call system(printf('tput cup %d > /dev/tty; tput cnorm > /dev/tty; %s %s 2> /dev/tty', &lines, command, stdin))
215 unmodified lines
764 if len(args) && isdirectory(expand(args[-1]))765 let opts.dir = substitute(substitute(remove(args, -1), '\\\(["'']\)', '\1', 'g'), '[/\\]*$', '/', '')766 if s:is_win && !&shellslash767 let opts.dir = substitute(opts.dir, '/', '\\', 'g')768 elseif has('win32unix')769 let opts.dir = fnamemodify(opts.dir, ':p')770 endif771 let prompt = opts.dir772 else773 let prompt = s:shortpath()
10 unmodified lines