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