patch 9.1.0948: Missing cmdline completion for :pbuffer
Problem: Missing cmdline completion for :pbuffer.
Solution: Add cmdline completion for :pbuffer like :buffer.
(zeertzjq)
fixes: #16250
closes: #16251
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
b183f50280
commit
3baf19a2b1
@ -2332,6 +2332,7 @@ set_context_by_cmdname(
|
||||
// FALLTHROUGH
|
||||
case CMD_buffer:
|
||||
case CMD_sbuffer:
|
||||
case CMD_pbuffer:
|
||||
case CMD_checktime:
|
||||
xp->xp_context = EXPAND_BUFFERS;
|
||||
xp->xp_pattern = arg;
|
||||
|
||||
@ -47,12 +47,23 @@ func Test_window_preview_from_pbuffer()
|
||||
edit Xpreview.c
|
||||
const buf_num = bufnr('%')
|
||||
enew
|
||||
|
||||
call feedkeys(":pbuffer Xpre\<C-A>\<C-B>\"\<CR>", 'xt')
|
||||
call assert_equal("\"pbuffer Xpreview.c", @:)
|
||||
|
||||
call assert_equal(1, winnr('$'))
|
||||
exe 'pbuffer ' . buf_num
|
||||
call assert_equal(2, winnr('$'))
|
||||
call assert_equal(0, &previewwindow)
|
||||
|
||||
call s:goto_preview_and_close()
|
||||
|
||||
call assert_equal(1, winnr('$'))
|
||||
pbuffer Xpreview.c
|
||||
call assert_equal(2, winnr('$'))
|
||||
call assert_equal(0, &previewwindow)
|
||||
|
||||
call s:goto_preview_and_close()
|
||||
endfunc
|
||||
|
||||
func Test_window_preview_terminal()
|
||||
|
||||
@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
948,
|
||||
/**/
|
||||
947,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user