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/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index 75b37ec..b6381a3 100644
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -1258,6 +1258,7 @@
" Preview window
call assert_fails(dir .. 'pedit Xnorfile2', 'E36:')
+ call assert_fails(dir .. 'pbuffer', 'E36:')
call setline(1, 'abc')
call assert_fails(dir .. 'psearch abc', 'E36:')
endif