File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11" bufkill.vim
22" Maintainer: John Orr (john underscore orr yahoo com)
3- " Version: 1.0
4- " Last Change: 01 December 2004
3+ " Version: 1.1
4+ " Last Change: 02 December 2004
55
66" Introduction: {{{1
77" Basic Usage:
6060" instead keep it's info so that we can jump forwards to it again
6161" eg in case of a mistake (one level of undo is already implemented).
6262
63- " Bugfixes:
64- " Patience...
65-
6663" Changelog:
64+ " 1.1 - Fix handling of modified, un-named buffers
6765" 1.0 - initial functionality
6866
6967" Reload guard and 'compatible' handling {{{1
@@ -206,7 +204,7 @@ function! <SID>BufKill(cmd, bang) "{{{1
206204 " If the buffer is already '[No File]' then doing enew won't create a new
207205 " buffer, hence the bd/bw command will kill the current buffer and take
208206 " the window with it... so check for this case
209- if bufname (' %' ) == ' '
207+ if bufname (' %' ) == ' ' && ! & modified
210208 " No buffer to kill
211209 return
212210 endif
You can’t perform that action at this time.
0 commit comments