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_statusline.vim b/src/testdir/test_statusline.vim
index 22fd78c..73c3bee 100644
--- a/src/testdir/test_statusline.vim
+++ b/src/testdir/test_statusline.vim
@@ -220,6 +220,10 @@
wincmd j
call assert_match('^\[Preview\],PRV\s*$', s:get_statusline())
pclose
+ pbuffer
+ wincmd j
+ call assert_match('^\[Preview\],PRV\s*$', s:get_statusline())
+ pclose
" %y: Type of file in the buffer, e.g., "[vim]". See 'filetype'.
" %Y: Type of file in the buffer, e.g., ",VIM". See 'filetype'.