This commit is contained in:
parent
e20b2cbd46
commit
37297ddae6
1 changed files with 14 additions and 16 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue