diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-01-20 13:29:49 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-01-20 13:29:49 +0100 |
commit | e823183254e79af4d384abd99d5bde9b013c4ec5 (patch) | |
tree | 18548d476f790cc99d674e39934019da75db515d | |
parent | ff8a75dab738a2d1e81202b5dd1c03fc45d714f2 (diff) | |
download | vim-e823183254e79af4d384abd99d5bde9b013c4ec5.zip |
updated for version 7.4.585
Problem: Range for :bdelete does not work. (Ronald Schild)
Solution: Also allow unloaded buffers.
-rw-r--r-- | src/ex_cmds.h | 2 | ||||
-rw-r--r-- | src/testdir/test_command_count.in | 28 | ||||
-rw-r--r-- | src/testdir/test_command_count.ok | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 34 insertions, 3 deletions
diff --git a/src/ex_cmds.h b/src/ex_cmds.h index 50e82521a..941a97d0d 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -173,7 +173,7 @@ EX(CMD_badd, "badd", ex_edit, ADDR_LINES), EX(CMD_bdelete, "bdelete", ex_bunload, BANG|RANGE|NOTADR|BUFNAME|COUNT|EXTRA|TRLBAR, - ADDR_LOADED_BUFFERS), + ADDR_BUFFERS), EX(CMD_behave, "behave", ex_behave, NEEDARG|WORD1|TRLBAR|CMDWIN, ADDR_LINES), diff --git a/src/testdir/test_command_count.in b/src/testdir/test_command_count.in index fd528c685..c87b4c909 100644 --- a/src/testdir/test_command_count.in +++ b/src/testdir/test_command_count.in @@ -92,11 +92,37 @@ STARTTEST :call append(0, g:lines) :unlet g:lines :w|bd -:se hidden :b1 ENDTEST 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! :let g:lines = [] :%argd diff --git a/src/testdir/test_command_count.ok b/src/testdir/test_command_count.ok index d554ae765..8fdbc7748 100644 --- a/src/testdir/test_command_count.ok +++ b/src/testdir/test_command_count.ok @@ -28,8 +28,11 @@ $tabe 2 $+tabe E16: Invalid range 0tabm x +aaa: 1 bbb: 1 ccc: 1 +aaa: 1 bbb: 0 ccc: 0 +aaa: 0 bbb: 0 ccc: 0 argdo: c d e 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 tabdo: 2 3 4 diff --git a/src/version.c b/src/version.c index b38e20b37..6fe2b32ce 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 585, +/**/ 584, /**/ 583, |