mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-26 14:56:30 +00:00
Merge branch 'joshuarubin-master'
This commit is contained in:
commit
411ec2e557
@ -431,9 +431,11 @@ function! s:split(dict)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:execute_term(dict, command, temps) abort
|
function! s:execute_term(dict, command, temps) abort
|
||||||
|
let winrest = winrestcmd()
|
||||||
let [ppos, winopts] = s:split(a:dict)
|
let [ppos, winopts] = s:split(a:dict)
|
||||||
let fzf = { 'buf': bufnr('%'), 'ppos': ppos, 'dict': a:dict, 'temps': a:temps,
|
let fzf = { 'buf': bufnr('%'), 'ppos': ppos, 'dict': a:dict, 'temps': a:temps,
|
||||||
\ 'winopts': winopts, 'command': a:command }
|
\ 'winopts': winopts, 'winrest': winrest, 'lines': &lines,
|
||||||
|
\ 'columns': &columns, 'command': a:command }
|
||||||
function! fzf.switch_back(inplace)
|
function! fzf.switch_back(inplace)
|
||||||
if a:inplace && bufnr('') == self.buf
|
if a:inplace && bufnr('') == self.buf
|
||||||
" FIXME: Can't re-enter normal mode from terminal mode
|
" FIXME: Can't re-enter normal mode from terminal mode
|
||||||
@ -465,6 +467,10 @@ function! s:execute_term(dict, command, temps) abort
|
|||||||
execute 'bd!' self.buf
|
execute 'bd!' self.buf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if &lines <= self.lines && &columns <= self.columns && s:getpos() == self.ppos
|
||||||
|
execute self.winrest
|
||||||
|
endif
|
||||||
|
|
||||||
if !s:exit_handler(a:code, self.command, 1)
|
if !s:exit_handler(a:code, self.command, 1)
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user