From: zeertzjq Date: Thu, 19 Dec 2024 19:05:28 +0000 (+0100) Subject: patch 9.1.0948: Missing cmdline completion for :pbuffer X-Git-Tag: v9.1.0948^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3baf19a2b144b215c5b537c3c1b3b80a79b0fe99;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 7e5311481b..3ceb6c73e7 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -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; diff --git a/src/testdir/test_preview.vim b/src/testdir/test_preview.vim index 0df1a90222..7c7883ace0 100644 --- a/src/testdir/test_preview.vim +++ b/src/testdir/test_preview.vim @@ -47,12 +47,23 @@ func Test_window_preview_from_pbuffer() edit Xpreview.c const buf_num = bufnr('%') enew + + call feedkeys(":pbuffer Xpre\\\"\", '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() diff --git a/src/version.c b/src/version.c index f026617534..00088ff273 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 948, /**/ 947, /**/