patch 9.1.0934: hard to view an existing buffer in the preview window
Problem: hard to view an existing buffer in the preview window
Solution: add the :pbuffer command (Yinzuo Jiang)
Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N]
from the buffer list in the preview window.
`:pbuffer` can also open special buffer, for example terminal buffer.
closes: #16222
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index edb105a..7764072 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt* For Vim version 9.1. Last change: 2024 Dec 14
+*windows.txt* For Vim version 9.1. Last change: 2024 Dec 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1005,6 +1005,15 @@
it. Make the new Preview window (if required) N high. If N is
not given, 'previewheight' is used.
+ *:pb* *:pbuffer*
+:[N]pb[uffer][!] [+cmd] [N]
+ Edit buffer [N] from the buffer list in the preview window.
+ If [N] is not given, the current buffer remains being edited.
+ See |:buffer-!| for [!]. This will also edit a buffer that is
+ not in the buffer list, without setting the 'buflisted' flag.
+ The notation with single quotes does not work here, `:pbuffer
+ 12'345'` uses 12'345 as a buffer name. Also see |+cmd|.
+
*:ped* *:pedit*
:ped[it][!] [++opt] [+cmd] {file}
Edit {file} in the preview window. The preview window is