aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-12-17 11:34:30 +0800
committerGitHub <noreply@github.com>2024-12-17 03:34:30 +0000
commitb03e790cddd19b57fa91f4fbfcc30c28f3c173bf (patch)
tree9a6841d79d079ab0a052c0d72aa3bb9138033a1c /src/nvim/ex_cmds.lua
parent15153c4cd5319652bcdcd608fe5d4f0fa1eb9419 (diff)
downloadrneovim-b03e790cddd19b57fa91f4fbfcc30c28f3c173bf.tar.gz
rneovim-b03e790cddd19b57fa91f4fbfcc30c28f3c173bf.tar.bz2
rneovim-b03e790cddd19b57fa91f4fbfcc30c28f3c173bf.zip
vim-patch:9.1.0934: hard to view an existing buffer in the preview window (#31605)
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: vim/vim#16222 https://github.com/vim/vim/commit/a2a2fe841ed2efdbb1f8055f752a3a4d0988ae9d Cherry-pick Test_popup_and_previewwindow_dump() changes from patch 9.0.0625. Cherry-pick Run_noroom_for_newwindow_test() changes from patches 8.2.0432 and 9.0.0363. Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Diffstat (limited to 'src/nvim/ex_cmds.lua')
-rw-r--r--src/nvim/ex_cmds.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua
index c8574c805c..0cdc397e9c 100644
--- a/src/nvim/ex_cmds.lua
+++ b/src/nvim/ex_cmds.lua
@@ -1947,6 +1947,12 @@ M.cmds = {
func = 'ex_packloadall',
},
{
+ command = 'pbuffer',
+ flags = bit.bor(BANG, RANGE, BUFNAME, BUFUNL, COUNT, EXTRA, CMDARG, TRLBAR),
+ addr_type = 'ADDR_BUFFERS',
+ func = 'ex_pbuffer',
+ },
+ {
command = 'pclose',
flags = bit.bor(BANG, TRLBAR),
addr_type = 'ADDR_NONE',