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
|
// FALLTHROUGH
|
||||||
case CMD_buffer:
|
case CMD_buffer:
|
||||||
case CMD_sbuffer:
|
case CMD_sbuffer:
|
||||||
|
case CMD_pbuffer:
|
||||||
case CMD_checktime:
|
case CMD_checktime:
|
||||||
xp->xp_context = EXPAND_BUFFERS;
|
xp->xp_context = EXPAND_BUFFERS;
|
||||||
xp->xp_pattern = arg;
|
xp->xp_pattern = arg;
|
||||||
|
|||||||
@ -47,12 +47,23 @@ func Test_window_preview_from_pbuffer()
|
|||||||
edit Xpreview.c
|
edit Xpreview.c
|
||||||
const buf_num = bufnr('%')
|
const buf_num = bufnr('%')
|
||||||
enew
|
enew
|
||||||
|
|
||||||
|
call feedkeys(":pbuffer Xpre\<C-A>\<C-B>\"\<CR>", 'xt')
|
||||||
|
call assert_equal("\"pbuffer Xpreview.c", @:)
|
||||||
|
|
||||||
call assert_equal(1, winnr('$'))
|
call assert_equal(1, winnr('$'))
|
||||||
exe 'pbuffer ' . buf_num
|
exe 'pbuffer ' . buf_num
|
||||||
call assert_equal(2, winnr('$'))
|
call assert_equal(2, winnr('$'))
|
||||||
call assert_equal(0, &previewwindow)
|
call assert_equal(0, &previewwindow)
|
||||||
|
|
||||||
call s:goto_preview_and_close()
|
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
|
endfunc
|
||||||
|
|
||||||
func Test_window_preview_terminal()
|
func Test_window_preview_terminal()
|
||||||
|
|||||||
@ -704,6 +704,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 */
|
||||||
|
/**/
|
||||||
|
948,
|
||||||
/**/
|
/**/
|
||||||
947,
|
947,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user