annotate runtime/doc/popup.txt @ 16896:52fc577a087d v8.1.1449

patch 8.1.1449: popup text truncated at end of screen commit https://github.com/vim/vim/commit/042fb4b449bb5d8494698803e766dfd288b458cf Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 2 14:49:56 2019 +0200 patch 8.1.1449: popup text truncated at end of screen Problem: Popup text truncated at end of screen. Solution: Move popup left if needed. Add the "fixed" property to disable that. (Ben Jackson , closes #4466)
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Jun 2019 15:00:06 +0200
parents 5131023c5728
children 9138e2c60bf1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16880
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
1 *popup.txt* For Vim version 8.1. Last change: 2019 Jun 01
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 VIM REFERENCE MANUAL by Bram Moolenaar
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
7 Displaying text in floating window. *popup* *popup-window*
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 1. Introduction |popup-intro|
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 2. Functions |popup-functions|
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 3. Examples |popup-examples|
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
16871
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
16 {not available if the |+textprop| feature was disabled at compile time}
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 ==============================================================================
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 1. Introduction *popup-intro*
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
21 We are talking about popup windows here, text that goes on top of the regular
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
22 windows and is under control of a plugin. You cannot edit the text in the
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
23 popup window like with regular windows.
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
24
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
25 A popup window can be used for such things as:
16808
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
26 - briefly show a message without overwriting the command line
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
27 - prompt the user with a dialog
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
28 - display contextual information while typing
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
29 - give extra information for auto-completion
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
30
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
31 The text in the popup window can be colored with |text-properties|. It is
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
32 also possible to use syntax highlighting.
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
33
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
34 The default color used is "Pmenu". If you prefer something else use the
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
35 "highlight" argument or the 'wincolor' option, e.g.: >
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
36 hi MyPopupColor ctermbg=lightblue guibg=lightblue
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
37 call setwinvar(winid, '&wincolor', 'MyPopupColor')
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
38
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
39 'hlsearch' and match highlighting are not displayed in a popup window.
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
40
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
41 A popup window has a window-ID like other windows, but behaves differently.
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
42 The size can be up to the whole Vim window and it overlaps other windows.
16808
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
43 Popup windows can also overlap each other.
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
44
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
45 The popup window contains a buffer, and that buffer is always associated with
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
46 the popup window. The window cannot be used in Normal, Visual or Insert mode,
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
47 it does not get keyboard focus. You can use functions like `setbufline()` to
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
48 change the text in the buffer. There are more differences from how this
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
49 window and buffer behave compared to regular windows and buffers, see
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
50 |popup-buffer|.
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
51
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
52 If this is not what you are looking for, check out other popup functionality:
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 - popup menu, see |popup-menu|
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 - balloon, see |balloon-eval|
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
56
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
57 WINDOW POSITION AND SIZE *popup-position*
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
58
16808
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
59 The height of the window is normally equal to the number of, possibly
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
60 wrapping, lines in the buffer. It can be limited with the "maxheight"
16871
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
61 property. You can use empty lines to increase the height or the "minheight"
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
62 property.
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
63
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
64 The width of the window is normally equal to the longest line in the buffer.
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
65 It can be limited with the "maxwidth" property. You can use spaces to
16871
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
66 increase the width or the "minwidth" property.
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
67
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
68 By default the 'wrap' option is set, so that no text disappears. Otherwise,
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
69 if there is not enough space then the window is shifted left in order to
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
70 display more text. This can be disabled with the "fixed" property. Also
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
71 disabled when right-aligned.
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
72
16871
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
73 Vim tries to show the popup in the location you specify. In some cases, e.g.
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
74 when the popup would go outside of the Vim window, it will show it somewhere
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
75 else. E.g. if you use `popup_atcursor()` the popup normally shows just above
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
76 the current cursor position, but if the cursor is close to the top of the Vim
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
77 window it will be placed below the cursor position.
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
78
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
79
16833
6699c03347d2 patch 8.1.1418: win_execute() is not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16829
diff changeset
80
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
81 TODO:
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
82
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
83 Scrolling: When the screen scrolls up for output of an Ex command, what
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
84 happens with popups?
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
85 1. Stay where they are. Problem: listed text may go behind and can't be read.
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
86 2. Scroll with the page. What if they get updated? Either postpone, or take
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
87 the scroll offset into account.
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
88 Probably 2. is the best choice.
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
89
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
90
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
91 IMPLEMENTATION:
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
92 - Code is in popupwin.c
16890
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
93 - Fix positioning with border and padding.
16880
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
94 - Why does 'nrformats' leak from the popup window buffer???
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
95 - Make redrawing more efficient and avoid flicker.
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
96 First draw popups, creating a mask, use the mask in screen_line() when
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
97 drawing other windows and stuff. Mask contains zindex of popups.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
98 Keep mask until next update_screen(), use when drawing status lines.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
99 Remove update_popup() calls after draw_tabline()/updating statusline
16829
5cebaecad422 patch 8.1.1416: popup_getposition() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16817
diff changeset
100 Fix redrawing problem with completion.
5cebaecad422 patch 8.1.1416: popup_getposition() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16817
diff changeset
101 Fix redrawing problem when scrolling non-current window
16880
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
102 - Disable commands, feedkeys(), CTRL-W, etc. in a popup window.
16884
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
103 Use NOT_IN_POPUP_WINDOW for more commands.
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
104 - Invoke filter with character before mapping?
16841
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
105 - Figure out the size and position better.
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
106 if wrapping splits a double-wide character
16853
e6bcccccbf7b patch 8.1.1428: popup_atcursor() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16841
diff changeset
107 if wrapping inserts indent
16829
5cebaecad422 patch 8.1.1416: popup_getposition() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16817
diff changeset
108 - Can the buffer be re-used, to avoid using up lots of buffer numbers?
16808
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
109 - Implement all the unimplemented options and features.
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
110
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 ==============================================================================
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 2. Functions *popup-functions*
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 THIS IS UNDER DESIGN - ANYTHING MAY STILL CHANGE
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116
16808
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
117 [functions to be moved to eval.txt later, keep overview of functions here]
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
118
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
119 popup_create({text}, {options}) *popup_create()*
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
120 Open a popup window showing {text}, which is either:
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
121 - a string
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
122 - a list of strings
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
123 - a list of text lines with text properties
16871
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
124
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
125 {options} is a dictionary with many possible entries.
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
126 See |popup_create-usage| for details.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
127
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
128 Returns a window-ID, which can be used with other popup
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
129 functions. Use `winbufnr()` to get the number of the buffer
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
130 in the window: >
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
131 let winid = popup_create('hello', {})
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
132 let bufnr = winbufnr(winid)
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
133 call setbufline(bufnr, 2, 'second line')
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
134 < In case of failure zero is returned.
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
135
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
136
16890
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
137 popup_close({id} [, {result}]) *popup_close()*
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
138 Close popup {id}. The window and the associated buffer will
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
139 be deleted.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
140
16890
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
141 If the popup has a callback it will be called just before the
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
142 popup window is deleted. If the optional {result} is present
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
143 it will be passed as the second argument of the callback.
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
144 Otherwise zero is passed to the callback.
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
145
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
146
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
147 popup_dialog({text}, {options}) *popup_dialog()*
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
148 {not implemented yet}
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
149 Just like |popup_create()| but with these default options: >
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
150 call popup_create({text}, {
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
151 \ 'pos': 'center',
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
152 \ 'zindex': 200,
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
153 \ 'border': [],
16890
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
154 \ 'padding': [],
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
155 \})
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
156 < Use {options} to change the properties.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
157
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
158
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
159 popup_notification({text}, {options}) *popup_notification()*
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
160 {not implemented yet}
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
161 Show the {text} for 3 seconds at the top of the Vim window.
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
162 This works like: >
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
163 call popup_create({text}, {
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
164 \ 'line': 1,
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
165 \ 'col': 10,
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
166 \ 'time': 3000,
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
167 \ 'tab': -1,
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
168 \ 'zindex': 200,
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
169 \ 'highlight': 'WarningMsg',
16800
12e3a3afdb6a patch 8.1.1402: "timer" option of popup windows not supported
Bram Moolenaar <Bram@vim.org>
parents: 16778
diff changeset
170 \ 'border': [],
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
171 \ })
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
172 < Use {options} to change the properties.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
173
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
174
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
175 popup_atcursor({text}, {options}) *popup_atcursor()*
16890
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
176 {not implemented yet: close when cursor moves}
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
177 Show the {text} above the cursor, and close it when the cursor
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
178 moves. This works like: >
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
179 call popup_create({text}, {
16853
e6bcccccbf7b patch 8.1.1428: popup_atcursor() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16841
diff changeset
180 \ 'pos': 'botleft',
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
181 \ 'line': 'cursor-1',
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
182 \ 'col': 'cursor',
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
183 \ 'moved': 'WORD',
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
184 \ })
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
185 < Use {options} to change the properties.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
186
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
187
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
188 popup_menu({text}, {options}) *popup_menu()*
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
189 {not implemented yet}
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
190 Show the {text} near the cursor, handle selecting one of the
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
191 items with cursorkeys, and close it an item is selected with
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
192 Space or Enter. {text} should have multiple lines to make this
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
193 useful. This works like: >
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
194 call popup_create({text}, {
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
195 \ 'pos': 'center',
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
196 \ 'zindex': 200,
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
197 \ 'wrap': 0,
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
198 \ 'border': [],
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
199 \ 'filter': 'popup_filter_menu',
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
200 \ })
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
201 < Use {options} to change the properties. Should at least set
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
202 "callback" to a function that handles the selected item.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
203
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
204
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
205 popup_hide({id}) *popup_hide()*
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
206 If {id} is a displayed popup, hide it now. If the popup has a
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
207 filter it will not be invoked for so long as the popup is
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
208 hidden.
16809
5ff14f96f1c9 patch 8.1.1406: popup_hide() and popup_show() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
209 If window {id} does not exist nothing happens. If window {id}
5ff14f96f1c9 patch 8.1.1406: popup_hide() and popup_show() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
210 exists but is not a popup window an error is given. *E993*
5ff14f96f1c9 patch 8.1.1406: popup_hide() and popup_show() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
211
5ff14f96f1c9 patch 8.1.1406: popup_hide() and popup_show() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
212 popup_show({id}) *popup_show()*
5ff14f96f1c9 patch 8.1.1406: popup_hide() and popup_show() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
213 If {id} is a hidden popup, show it now.
5ff14f96f1c9 patch 8.1.1406: popup_hide() and popup_show() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
214 For {id} see `popup_hide()`.
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
215
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
216 popup_move({id}, {options}) *popup_move()*
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
217 Move popup {id} to the position speficied with {options}.
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
218 {options} may contain the items from |popup_create()| that
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
219 specify the popup position: "line", "col", "pos", "maxheight",
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
220 "minheight", "maxwidth" and "minwidth".
16809
5ff14f96f1c9 patch 8.1.1406: popup_hide() and popup_show() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16808
diff changeset
221 For {id} see `popup_hide()`.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
222
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
223
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
224 popup_filter_menu({id}, {key}) *popup_filter_menu()*
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
225 {not implemented yet}
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
226 Filter that can be used for a popup. It handles the cursor
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
227 keys to move the selected index in the popup. Space and Enter
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
228 can be used to select an item. Invokes the "callback" of the
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
229 popup menu with the index of the selected line as the second
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
230 argument.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
231
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
232
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
233 popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
234 {not implemented yet}
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
235 Filter that can be used for a popup. It handles only the keys
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
236 'y', 'Y' and 'n' or 'N'. Invokes the "callback" of the
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
237 popup menu with the 1 for 'y' or 'Y' and zero for 'n' or 'N'
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
238 as the second argument. Pressing Esc and CTRL-C works like
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
239 pressing 'n'.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
240
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
241
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
242 popup_setoptions({id}, {options}) *popup_setoptions()*
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
243 {not implemented yet}
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
244 Override options in popup {id} with entries in {options}.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
245
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
246
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
247 popup_getoptions({id}) *popup_getoptions()*
16841
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
248 Return the {options} for popup {id} in a Dict.
16855
19162ff4eacd patch 8.1.1429: "pos" option of popup window not supported yet
Bram Moolenaar <Bram@vim.org>
parents: 16853
diff changeset
249 A zero value means the option was not set. For "zindex" the
19162ff4eacd patch 8.1.1429: "pos" option of popup window not supported yet
Bram Moolenaar <Bram@vim.org>
parents: 16853
diff changeset
250 default value is returned, not zero.
16841
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
251
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
252 The "highlight" entry is omitted, use the 'wincolor' option
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
253 for that: >
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
254 let hl = getwinvar(winid, '&wincolor')
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
255
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
256 < If popup window {id} is not found an empty Dict is returned.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
257
16855
19162ff4eacd patch 8.1.1429: "pos" option of popup window not supported yet
Bram Moolenaar <Bram@vim.org>
parents: 16853
diff changeset
258 popup_getpos({id}) *popup_getpos()*
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
259 Return the position and size of popup {id}. Returns a Dict
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
260 with these entries:
16841
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
261 col screen column of the popup, one-based
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
262 line screen line of the popup, one-based
16884
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
263 width width of the whole popup in screen cells
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
264 height height of the whole popup in screen cells
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
265 core_col screen column of the text box
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
266 core_line screen line of the text box
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
267 core_width width of the text box in screen cells
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
268 core_height height of the text box in screen cells
16841
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
269 visible one if the popup is displayed, zero if hidden
16829
5cebaecad422 patch 8.1.1416: popup_getposition() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16817
diff changeset
270 Note that these are the actual screen positions. They differ
5cebaecad422 patch 8.1.1416: popup_getposition() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16817
diff changeset
271 from the values in `popup_getoptions()` for the sizing and
5cebaecad422 patch 8.1.1416: popup_getposition() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16817
diff changeset
272 positioning mechanism applied.
16884
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
273
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
274 The "core_" values exclude the padding and border.
59e4148c0c73 patch 8.1.1443: popup window padding and border not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16880
diff changeset
275
16829
5cebaecad422 patch 8.1.1416: popup_getposition() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16817
diff changeset
276 If popup window {id} is not found an empty Dict is returned.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
277
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
278
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
279 *:popupclear* *:popupc*
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
280 :popupc[lear] Emergency solution to a misbehaving plugin: close all popup
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
281 windows.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
282
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
283
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
284 POPUP BUFFER AND WINDOW *popup-buffer*
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
285
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
286 A new buffer is created to hold the text and text properties of the popup
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
287 window. The buffer is always associated with the popup window and
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
288 manipulation is restricted:
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
289 - the buffer has no name
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
290 - 'buftype' is "popup"
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
291 - 'swapfile' is off
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
292 - 'bufhidden' is "hide"
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
293 - 'buflisted' is off
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
294 - 'undolevels' is -1: no undo at all
16853
e6bcccccbf7b patch 8.1.1428: popup_atcursor() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16841
diff changeset
295 - all other buffer-local and window_local options are set to their Vim default
e6bcccccbf7b patch 8.1.1428: popup_atcursor() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16841
diff changeset
296 value.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
297
16853
e6bcccccbf7b patch 8.1.1428: popup_atcursor() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16841
diff changeset
298 It is possible to change the specifically mentioned options, but anything
e6bcccccbf7b patch 8.1.1428: popup_atcursor() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16841
diff changeset
299 might break then, so better leave them alone.
16808
c002c4899529 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16806
diff changeset
300
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
301 The window does have a cursor position, but the cursor is not displayed.
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
302
16833
6699c03347d2 patch 8.1.1418: win_execute() is not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16829
diff changeset
303 To execute a command in the context of the popup window and buffer use
6699c03347d2 patch 8.1.1418: win_execute() is not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16829
diff changeset
304 `win_execute()`. Example: >
6699c03347d2 patch 8.1.1418: win_execute() is not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16829
diff changeset
305 call win_execute(winid, 'syntax enable')
6699c03347d2 patch 8.1.1418: win_execute() is not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16829
diff changeset
306
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
307 Options can be set on the window with `setwinvar()`, e.g.: >
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
308 call setwinvar(winid, '&wrap', 0)
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
309 And options can be set on the buffer with `setbufvar()`, e.g.: >
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
310 call setbufvar(winbufnr(winid), '&filetype', 'java')
16859
0154363d3b98 patch 8.1.1431: popup window listed as "Scratch"
Bram Moolenaar <Bram@vim.org>
parents: 16855
diff changeset
311 Note that this does not trigger autocommands. Use `win_execute()` if you do
0154363d3b98 patch 8.1.1431: popup window listed as "Scratch"
Bram Moolenaar <Bram@vim.org>
parents: 16855
diff changeset
312 need them.
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
313
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
314
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
315 POPUP_CREATE() ARGUMENTS *popup_create-usage*
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
316
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
317 The first argument of |popup_create()| specifies the text to be displayed, and
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
318 optionally text properties. It is in one of three forms:
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
319 - a string
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
320 - a list of strings
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
321 - a list of dictionaries, where each dictionary has these entries:
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
322 text String with the text to display.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
323 props A list of text properties. Optional.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
324 Each entry is a dictionary, like the third argument of
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
325 |prop_add()|, but specifying the column in the
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
326 dictionary with a "col" entry, see below:
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
327 |popup-props|.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
328
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
329 The second argument of |popup_create()| is a dictionary with options:
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
330 line Screen line where to position the popup. Can use a
16855
19162ff4eacd patch 8.1.1429: "pos" option of popup window not supported yet
Bram Moolenaar <Bram@vim.org>
parents: 16853
diff changeset
331 number or "cursor", "cursor+1" or "cursor-1" to use
19162ff4eacd patch 8.1.1429: "pos" option of popup window not supported yet
Bram Moolenaar <Bram@vim.org>
parents: 16853
diff changeset
332 the line of the cursor and add or subtract a number of
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
333 lines. If omitted the popup is vertically centered.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
334 The first line is 1.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
335 col Screen column where to position the popup. Can use a
16855
19162ff4eacd patch 8.1.1429: "pos" option of popup window not supported yet
Bram Moolenaar <Bram@vim.org>
parents: 16853
diff changeset
336 number or "cursor" to use the column of the cursor,
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
337 "cursor+9" or "cursor-9" to add or subtract a number
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
338 of columns. If omitted the popup is horizontally
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
339 centered. The first column is 1.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
340 pos "topleft", "topright", "botleft" or "botright":
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
341 defines what corner of the popup "line" and "col" are
16841
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
342 used for. When not set "topleft" is used.
cf630fab9fb6 patch 8.1.1422: popup_getoptions() not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16833
diff changeset
343 Alternatively "center" can be used to position the
16855
19162ff4eacd patch 8.1.1429: "pos" option of popup window not supported yet
Bram Moolenaar <Bram@vim.org>
parents: 16853
diff changeset
344 popup in the center of the Vim window, in which case
19162ff4eacd patch 8.1.1429: "pos" option of popup window not supported yet
Bram Moolenaar <Bram@vim.org>
parents: 16853
diff changeset
345 "line" and "col" are ignored.
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
346 fixed When FALSE (the default), and:
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
347 - "pos" is "botleft" or "topleft", and
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
348 - "wrap" is off, and
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
349 - the popup would be truncated at the right edge of
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
350 the screen, then
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
351 the popup is moved to the left so as to fit the
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
352 contents on the screen. Set to TRUE to disable this.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
353 flip When TRUE (the default) and the position is relative
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
354 to the cursor, flip to below or above the cursor to
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
355 avoid overlap with the |popupmenu-completion| or
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
356 another popup with a higher "zindex".
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
357 {not implemented yet}
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
358 maxheight Maximum height of the contents, excluding border and
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
359 padding.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
360 minheight Minimum height of the contents, excluding border and
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
361 padding.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
362 maxwidth Maximum width of the contents, excluding border and
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
363 padding.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
364 minwidth Minimum width of the contents, excluding border and
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
365 padding.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
366 hidden When TRUE the popup exists but is not displayed; use
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
367 `popup_show()` to unhide it.
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
368 {not implemented yet}
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
369 tab When -1: display the popup on all tabs.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
370 When 0 (the default): display the popup on the current
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
371 tab.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
372 Otherwise the number of the tab page the popup is
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
373 displayed on; when invalid the current tab is used.
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
374 {only -1 and 0 are implemented}
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
375 title Text to be displayed above the first item in the
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
376 popup, on top of any border. If there is no top
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
377 border on line of padding is added to put the title on.
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
378 {not implemented yet}
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
379 wrap TRUE to make the lines wrap (default TRUE).
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
380 highlight Highlight group name to use for the text, stored in
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
381 the 'wincolor' option.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
382 padding List with numbers, defining the padding
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
383 above/right/below/left of the popup (similar to CSS).
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
384 An empty list uses a padding of 1 all around. The
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
385 padding goes around the text, inside any border.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
386 Padding uses the 'wincolor' highlight.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
387 Example: [1, 2, 1, 3] has 1 line of padding above, 2
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
388 columns on the right, 1 line below and 3 columns on
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
389 the left.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
390 border List with numbers, defining the border thickness
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
391 above/right/below/left of the popup (similar to CSS).
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
392 Only values of zero and non-zero are recognized.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
393 An empty list uses a border all around.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
394 borderhighlight List of highlight group names to use for the border.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
395 When one entry it is used for all borders, otherwise
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
396 the highlight for the top/right/bottom/left border.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
397 Example: ['TopColor', 'RightColor', 'BottomColor,
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
398 'LeftColor']
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
399 borderchars List with characters, defining the character to use
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
400 for the top/right/bottom/left border. Optionally
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
401 followed by the character to use for the
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
402 topleft/topright/botright/botleft corner.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
403 Example: ['-', '|', '-', '|', '┌', '┐', '┘', '└']
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
404 When the list has one character it is used for all.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
405 When the list has two characters the first is used for
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
406 the border lines, the second for the corners.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
407 By default a double line is used all around when
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
408 'encoding' is "utf-8", otherwise ASCII characters are
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
409 used.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
410 zindex Priority for the popup, default 50.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
411 time Time in milliseconds after which the popup will close.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
412 When omitted |popup_close()| must be used.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
413 moved "cell": close the popup if the cursor moved at least
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
414 one screen cell.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
415 "word" allows for moving the cursor within |<cword>|
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
416 "WORD" allows for moving the cursor within |<cWORD>|
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
417 a list with two numbers specifies the start and end
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
418 column outside of which the popup will close
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
419 {not implemented yet}
16896
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
420 filter A callback that can filter typed characters, see
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
421 |popup-filter|.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
422 callback A callback that is called when the popup closes, e.g.
52fc577a087d patch 8.1.1449: popup text truncated at end of screen
Bram Moolenaar <Bram@vim.org>
parents: 16890
diff changeset
423 when using |popup_filter_menu()|, see |popup-callback|.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
424
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
425 Depending on the "zindex" the popup goes under or above other popups. The
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
426 completion menu (|popup-menu|) has zindex 100. For messages that occur for a
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
427 short time the suggestion is to use zindex 1000.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
428
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
429 By default text wraps, which causes a line in {lines} to occupy more than one
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
430 screen line. When "wrap" is FALSE then the text outside of the popup or
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
431 outside of the Vim window will not be displayed, thus truncated.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
432
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
433
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
434 POPUP TEXT PROPERTIES *popup-props*
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
435
16811
0457d49eb2d9 patch 8.1.1407: popup_create() does not support text properties
Bram Moolenaar <Bram@vim.org>
parents: 16809
diff changeset
436 These are similar to the third argument of |prop_add()| except:
0457d49eb2d9 patch 8.1.1407: popup_create() does not support text properties
Bram Moolenaar <Bram@vim.org>
parents: 16809
diff changeset
437 - "lnum" is always the current line in the list
0457d49eb2d9 patch 8.1.1407: popup_create() does not support text properties
Bram Moolenaar <Bram@vim.org>
parents: 16809
diff changeset
438 - "bufnr" is always the buffer of the popup
0457d49eb2d9 patch 8.1.1407: popup_create() does not support text properties
Bram Moolenaar <Bram@vim.org>
parents: 16809
diff changeset
439 - "col" is in the Dict instead of a separate argument
0457d49eb2d9 patch 8.1.1407: popup_create() does not support text properties
Bram Moolenaar <Bram@vim.org>
parents: 16809
diff changeset
440 - "transparent" is extra
0457d49eb2d9 patch 8.1.1407: popup_create() does not support text properties
Bram Moolenaar <Bram@vim.org>
parents: 16809
diff changeset
441 So we get:
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
442 col starting column, counted in bytes, use one for the
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
443 first column.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
444 length length of text in bytes; can be zero
16811
0457d49eb2d9 patch 8.1.1407: popup_create() does not support text properties
Bram Moolenaar <Bram@vim.org>
parents: 16809
diff changeset
445 end_lnum line number for the end of the text
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
446 end_col column just after the text; not used when "length" is
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
447 present; when {col} and "end_col" are equal, this is a
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
448 zero-width text property
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
449 id user defined ID for the property; when omitted zero is
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
450 used
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
451 type name of the text property type, as added with
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
452 |prop_type_add()|
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
453 transparent do not show these characters, show the text under it;
16871
e5dab34ded73 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 16859
diff changeset
454 if there is a border character to the right or below
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
455 it will be made transparent as well
16811
0457d49eb2d9 patch 8.1.1407: popup_create() does not support text properties
Bram Moolenaar <Bram@vim.org>
parents: 16809
diff changeset
456 {not implemented yet}
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
457
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
458
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
459 POPUP FILTER *popup-filter*
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
460
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
461 A callback that gets any typed keys while a popup is displayed. The filter is
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
462 not invoked when the popup is hidden.
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
463
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
464 The filter can return TRUE to indicate the key has been handled and is to be
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
465 discarded, or FALSE to let Vim handle the key as usual in the current state.
16778
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
466 In case it returns FALSE and there is another popup window visible, that
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
467 filter is also called. The filter of the popup window with the highest zindex
eda4d65f232c patch 8.1.1391: no popup window support
Bram Moolenaar <Bram@vim.org>
parents: 16724
diff changeset
468 is called first.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
469
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
470 The filter function is called with two arguments: the ID of the popup and the
16880
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
471 key, e.g.: >
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
472 func MyFilter(winid, key)
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
473 if a:key == "\<F2>"
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
474 " do something
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
475 return 1
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
476 endif
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
477 if a:key == 'x'
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
478 call popup_close(a:winid)
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
479 return 1
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
480 endif
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
481 return 0
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
482 endfunc
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
483
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
484 Currently the key is what results after any mapping. This may change...
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
485
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
486 Some common key actions:
16880
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
487 x close the popup (see note below)
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
488 cursor keys select another entry
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
489 Tab accept current suggestion
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
490
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
491 A mouse click arrives as <LeftMouse>. The coordinates are in
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
492 v:mouse_popup_col and v:mouse_popup_row. The top-left screen cell of the
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
493 popup is col 1, row 1 (not counting the border).
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
494
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
495 Vim provides standard filters |popup_filter_menu()| and
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
496 |popup_filter_yesno()|.
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
497
16880
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
498 Note that "x" is the normal way to close a popup. You may want to use Esc,
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
499 but since many keys start with an Esc character, there may be a delay before
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
500 Vim recognizes the Esc key. If you do use Esc, it is reecommended to set the
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
501 'ttimeoutlen' option to 100 and set 'timeout' and/or 'ttimeout'.
998603a243d7 patch 8.1.1441: popup window filter not yet implemented
Bram Moolenaar <Bram@vim.org>
parents: 16871
diff changeset
502
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
503
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
504 POPUP CALLBACK *popup-callback*
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
505
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
506 A callback that is invoked when the popup closes. Used by
16890
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
507 |popup_filter_menu()|.
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
508
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
509 The callback is invoked with two arguments: the ID of the popup window and the
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
510 result, which could be an index in the popup lines, or whatever was passed as
5131023c5728 patch 8.1.1446: popup window callback not implemented yet
Bram Moolenaar <Bram@vim.org>
parents: 16888
diff changeset
511 the second argument of `popup_close()`.
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
512
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
513 ==============================================================================
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
514 3. Examples *popup-examples*
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
515
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
516 TODO
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
517
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
518 Prompt the user to press y/Y or n/N: >
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
519
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
520 func MyDialogHandler(id, result)
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
521 if a:result
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
522 " ... 'y' or 'Y' was pressed
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
523 endif
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
524 endfunc
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
525
16724
6030631a1541 patch 8.1.1364: design for popup window support needs more details
Bram Moolenaar <Bram@vim.org>
parents: 16654
diff changeset
526 call popup_create(['Continue? y/n'], {
16654
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
527 \ 'filter': 'popup_filter_yesno',
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
528 \ 'callback': 'MyDialogHandler',
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
529 \ })
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
530 <
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
531
7d54a66c95d7 patch 8.1.1329: plans for popup window support are spread out
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
532 vim:tw=78:ts=8:noet:ft=help:norl: