0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.4.585

Problem:    Range for :bdelete does not work. (Ronald Schild)
Solution:   Also allow unloaded buffers.
This commit is contained in:
Bram Moolenaar
2015-01-20 13:29:49 +01:00
parent ff8a75dab7
commit e823183254
4 changed files with 34 additions and 3 deletions

View File

@@ -173,7 +173,7 @@ EX(CMD_badd, "badd", ex_edit,
ADDR_LINES), ADDR_LINES),
EX(CMD_bdelete, "bdelete", ex_bunload, EX(CMD_bdelete, "bdelete", ex_bunload,
BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR, BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR,
ADDR_LOADED_BUFFERS), ADDR_BUFFERS),
EX(CMD_behave, "behave", ex_behave, EX(CMD_behave, "behave", ex_behave,
NEEDARG|WORD1|TRLBAR|CMDWIN, NEEDARG|WORD1|TRLBAR|CMDWIN,
ADDR_LINES), ADDR_LINES),

View File

@@ -92,11 +92,37 @@ STARTTEST
:call append(0, g:lines) :call append(0, g:lines)
:unlet g:lines :unlet g:lines
:w|bd :w|bd
:se hidden
:b1 :b1
ENDTEST ENDTEST
STARTTEST STARTTEST
:let g:lines = []
:func BufStatus()
: call add(g:lines, 'aaa: ' . buflisted(g:buf_aaa) . ' bbb: ' . buflisted(g:buf_bbb) . ' ccc: ' . buflisted(g:buf_ccc))
:endfunc
:se nohidden
:e aaa
:let buf_aaa = bufnr('%')
:e bbb
:let buf_bbb = bufnr('%')
:e ccc
:let buf_ccc = bufnr('%')
:b1
:call BufStatus()
:exe buf_bbb . "," . buf_ccc . "bdelete"
:call BufStatus()
:exe buf_aaa . "bdelete"
:call BufStatus()
:e! test.out
:call append('$', g:lines)
:unlet g:lines
:delfunc BufStatus
:w|bd
:b1
ENDTEST
STARTTEST
:se hidden
:only! :only!
:let g:lines = [] :let g:lines = []
:%argd :%argd

View File

@@ -28,8 +28,11 @@ $tabe 2
$+tabe E16: Invalid range $+tabe E16: Invalid range
0tabm x 0tabm x
aaa: 1 bbb: 1 ccc: 1
aaa: 1 bbb: 0 ccc: 0
aaa: 0 bbb: 0 ccc: 0
argdo: c d e argdo: c d e
windo: 2 3 4 windo: 2 3 4
bufdo: 2 3 4 5 6 7 8 9 10 12 bufdo: 2 3 4 5 6 7 8 9 10 15
bufdo: 3 4 5 6 7 bufdo: 3 4 5 6 7
tabdo: 2 3 4 tabdo: 2 3 4

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
585,
/**/ /**/
584, 584,
/**/ /**/