[neovim] Fix terminal buffer marker on Windows
Original Patch: a9bf29b65e
This commit is contained in:
parent
c7ad97c641
commit
5097e563df
@ -35,6 +35,8 @@ else
|
|||||||
let s:base_dir = expand('<sfile>:h:h')
|
let s:base_dir = expand('<sfile>:h:h')
|
||||||
endif
|
endif
|
||||||
if s:is_win
|
if s:is_win
|
||||||
|
let s:term_marker = '&::FZF'
|
||||||
|
|
||||||
function! s:fzf_call(fn, ...)
|
function! s:fzf_call(fn, ...)
|
||||||
let shellslash = &shellslash
|
let shellslash = &shellslash
|
||||||
try
|
try
|
||||||
@ -53,6 +55,8 @@ if s:is_win
|
|||||||
\ ['chcp %origchcp% > nul']
|
\ ['chcp %origchcp% > nul']
|
||||||
endfunction
|
endfunction
|
||||||
else
|
else
|
||||||
|
let s:term_marker = ";#FZF"
|
||||||
|
|
||||||
function! s:fzf_call(fn, ...)
|
function! s:fzf_call(fn, ...)
|
||||||
return call(a:fn, a:000)
|
return call(a:fn, a:000)
|
||||||
endfunction
|
endfunction
|
||||||
@ -681,7 +685,7 @@ function! s:execute_term(dict, command, temps) abort
|
|||||||
if s:present(a:dict, 'dir')
|
if s:present(a:dict, 'dir')
|
||||||
execute 'lcd' s:escape(a:dict.dir)
|
execute 'lcd' s:escape(a:dict.dir)
|
||||||
endif
|
endif
|
||||||
call termopen(a:command . ';#FZF', fzf)
|
call termopen(a:command.s:term_marker, fzf)
|
||||||
finally
|
finally
|
||||||
if s:present(a:dict, 'dir')
|
if s:present(a:dict, 'dir')
|
||||||
lcd -
|
lcd -
|
||||||
|
Loading…
Reference in New Issue
Block a user