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/src/ex_cmds.h b/src/ex_cmds.h
index 25f6914..dc5da0a 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -1145,6 +1145,9 @@
EXCMD(CMD_packloadall, "packloadall", ex_packloadall,
EX_BANG|EX_TRLBAR|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
+EXCMD(CMD_pbuffer, "pbuffer", ex_pbuffer,
+ EX_BANG|EX_RANGE|EX_BUFNAME|EX_BUFUNL|EX_COUNT|EX_EXTRA|EX_CMDARG|EX_TRLBAR,
+ ADDR_BUFFERS),
EXCMD(CMD_pclose, "pclose", ex_pclose,
EX_BANG|EX_TRLBAR,
ADDR_NONE),