mirror of
https://github.com/vim/vim.git
synced 2025-10-28 09:27:14 -04:00
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>
This commit is contained in:
committed by
Christian Brabandt
parent
3920bb4356
commit
a2a2fe841e
@@ -2044,16 +2044,27 @@ def Test_lambda_crash()
|
||||
v9.CheckScriptFailureList(lines, ["E1356:", "E1405:"])
|
||||
enddef
|
||||
|
||||
def s:check_previewpopup(expected_title: string)
|
||||
var id = popup_findpreview()
|
||||
assert_notequal(id, 0)
|
||||
assert_match(expected_title, popup_getoptions(id).title)
|
||||
popup_clear()
|
||||
bw Xppfile
|
||||
set previewpopup&
|
||||
enddef
|
||||
|
||||
" Test for the 'previewpopup' option
|
||||
def Test_previewpopup()
|
||||
set previewpopup=height:10,width:60
|
||||
pedit Xppfile
|
||||
var id = popup_findpreview()
|
||||
assert_notequal(id, 0)
|
||||
assert_match('Xppfile', popup_getoptions(id).title)
|
||||
popup_clear()
|
||||
bw Xppfile
|
||||
set previewpopup&
|
||||
s:check_previewpopup('Xppfile')
|
||||
enddef
|
||||
|
||||
def Test_previewpopup_pbuffer()
|
||||
set previewpopup=height:10,width:60
|
||||
edit Xppfile
|
||||
pbuffer
|
||||
s:check_previewpopup('')
|
||||
enddef
|
||||
|
||||
def Test_syntax_enable_clear()
|
||||
|
||||
Reference in New Issue
Block a user