1
0
Fork 0
mirror of synced 2024-12-21 06:21:07 -05:00
This commit is contained in:
Amir Salihefendic 2018-03-31 11:52:11 -03:00
parent e20b2cbd46
commit 37297ddae6

View file

@ -356,28 +356,26 @@ endfunction
" Don't close window, when deleting a buffer " Don't close window, when deleting a buffer
command! Bclose call <SID>BufcloseCloseIt() command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt() function! <SID>BufcloseCloseIt()
let l:currentBufNum = bufnr("%") let l:currentBufNum = bufnr("%")
let l:alternateBufNum = bufnr("#") let l:alternateBufNum = bufnr("#")
if buflisted(l:alternateBufNum) if buflisted(l:alternateBufNum)
buffer # buffer #
else else
bnext bnext
endif endif
if bufnr("%") == l:currentBufNum if bufnr("%") == l:currentBufNum
new new
endif endif
if buflisted(l:currentBufNum) if buflisted(l:currentBufNum)
execute("bdelete! ".l:currentBufNum) execute("bdelete! ".l:currentBufNum)
endif endif
endfunction endfunction
function! CmdLine(str) function! CmdLine(str)
exe "menu Foo.Bar :" . a:str call feedkeys(":" . a:str)
emenu Foo.Bar
unmenu Foo
endfunction endfunction
function! VisualSelection(direction, extra_filter) range function! VisualSelection(direction, extra_filter) range