1
0
forked from aniani/vim

patch 8.1.1714: cannot preview a file in a popup window

Problem:    Cannot preview a file in a popup window.
Solution:   Add the 'previewpopup' option.
This commit is contained in:
Bram Moolenaar
2019-07-18 21:43:07 +02:00
parent df9c6cad8c
commit 7964873afe
12 changed files with 322 additions and 69 deletions

View File

@@ -5627,7 +5627,16 @@ A jump table for the options with a short description can be found at |Q_op|.
{not available when compiled without the |+windows| or
|+quickfix| features}
Default height for a preview window. Used for |:ptag| and associated
commands. Used for |CTRL-W_}| when no count is given.
commands. Used for |CTRL-W_}| when no count is given. Not used when
'previewpopup' is set.
*'previewpopup'* *'pvp'*
'previewpopup' 'pvp' string (default empty)
global
{not available when compiled without the |+windows|,
|+textprop| or |+quickfix| feature}
When not empty a popup window is used for commands that would open a
preview window. See |preview-popup|.
*'previewwindow'* *'nopreviewwindow'*
*'pvw'* *'nopvw'* *E590*

View File

@@ -864,7 +864,15 @@ height of the preview window when it's opened. The 'previewwindow' option is
set in the preview window to be able to recognize it. The 'winfixheight'
option is set to have it keep the same height when opening/closing other
windows.
*preview-popup*
Alternatively, a popup window can be used by setting the 'previewpopup'
option. When set, it overrules the 'previewwindow' and 'previewheight'
settings. The option is a comma separated list of values:
height maximum height of the popup
width maximu width of the popup
Example: >
:set previewpopup=height:10,width:60
<
*:pta* *:ptag*
:pta[g][!] [tagname]
Does ":tag[!] [tagname]" and shows the found tag in a