patch 9.1.0948: Missing cmdline completion for :pbuffer
Commit:
https://github.com/vim/vim/commit/3baf19a2b144b215c5b537c3c1b3b80a79b0fe99
Author: zeertzjq <[email protected]>
Date: Thu Dec 19 20:05:28 2024 +0100
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 7e5311481..3ceb6c73e 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 0df1a9022..7c7883ace 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\<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()
diff --git a/src/version.c b/src/version.c
index f02661753..00088ff27 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,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1tOLzJ-007XUJ-7V%40256bit.org.