Mercurial > vim
comparison runtime/doc/popup.txt @ 17051:221d4b82bc0b v8.1.1525
patch 8.1.1525: cannot move a popup window with the mouse
commit https://github.com/vim/vim/commit/b53fb31a1e27a806396e38592055cfb3ebf43cf9
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 13 23:59:52 2019 +0200
patch 8.1.1525: cannot move a popup window with the mouse
Problem: Cannot move a popup window with the mouse.
Solution: Add the "drag" property and make it possible to drag a popup
window by its border.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 14 Jun 2019 00:00:08 +0200 |
parents | 6400d1ad5e4b |
children | dacd46fbaa90 |
comparison
equal
deleted
inserted
replaced
17050:f7293a729741 | 17051:221d4b82bc0b |
---|---|
93 window and return the window ID. The popup will then be closed when the | 93 window and return the window ID. The popup will then be closed when the |
94 mouse moves, except when it moves inside the popup. | 94 mouse moves, except when it moves inside the popup. |
95 - For the "moved" property also include mouse movement? | 95 - For the "moved" property also include mouse movement? |
96 - When selecting text in the popup with modeless selection, do not select | 96 - When selecting text in the popup with modeless selection, do not select |
97 outside of the popup and don't select the border or padding. | 97 outside of the popup and don't select the border or padding. |
98 - Allow the user to drag the popup window when the "dragging" property is set. | 98 - Add test for dragging the popup window. |
99 - Make redrawing more efficient and avoid flicker: | 99 - Make redrawing more efficient and avoid flicker: |
100 - put popup menu also put in popup_mask? | 100 - put popup menu also put in popup_mask? |
101 - Invoke filter with character before mapping? | 101 - Invoke filter with character before mapping? |
102 - Figure out the size and position better. | 102 - Figure out the size and position better. |
103 if wrapping splits a double-wide character | 103 if wrapping splits a double-wide character |
275 < Use {options} to change the properties. Should at least set | 275 < Use {options} to change the properties. Should at least set |
276 "callback" to a function that handles the selected item. | 276 "callback" to a function that handles the selected item. |
277 | 277 |
278 | 278 |
279 popup_move({id}, {options}) *popup_move()* | 279 popup_move({id}, {options}) *popup_move()* |
280 Move popup {id} to the position speficied with {options}. | 280 Move popup {id} to the position specified with {options}. |
281 {options} may contain the items from |popup_create()| that | 281 {options} may contain the items from |popup_create()| that |
282 specify the popup position: "line", "col", "pos", "maxheight", | 282 specify the popup position: "line", "col", "pos", "maxheight", |
283 "minheight", "maxwidth" and "minwidth". | 283 "minheight", "maxwidth" and "minwidth". |
284 For {id} see `popup_hide()`. | 284 For {id} see `popup_hide()`. |
285 | 285 |
291 \ 'line': 1, | 291 \ 'line': 1, |
292 \ 'col': 10, | 292 \ 'col': 10, |
293 \ 'time': 3000, | 293 \ 'time': 3000, |
294 \ 'tab': -1, | 294 \ 'tab': -1, |
295 \ 'zindex': 200, | 295 \ 'zindex': 200, |
296 \ 'drag': 1, | |
296 \ 'highlight': 'WarningMsg', | 297 \ 'highlight': 'WarningMsg', |
297 \ 'border': [], | 298 \ 'border': [], |
298 \ 'padding': [0,1,0,1], | 299 \ 'padding': [0,1,0,1], |
299 \ }) | 300 \ }) |
300 < The position will be adjusted to avoid overlap with other | 301 < The position will be adjusted to avoid overlap with other |
407 Otherwise the number of the tab page the popup is | 408 Otherwise the number of the tab page the popup is |
408 displayed on; when invalid the current tab is used. | 409 displayed on; when invalid the current tab is used. |
409 {only -1 and 0 are implemented} | 410 {only -1 and 0 are implemented} |
410 title Text to be displayed above the first item in the | 411 title Text to be displayed above the first item in the |
411 popup, on top of any border. If there is no top | 412 popup, on top of any border. If there is no top |
412 border on line of padding is added to put the title on. | 413 border one line of padding is added to put the title |
414 on. | |
413 {not implemented yet} | 415 {not implemented yet} |
414 wrap TRUE to make the lines wrap (default TRUE). | 416 wrap TRUE to make the lines wrap (default TRUE). |
417 drag TRUE to allow the popup to be dragged with the mouse | |
418 by grabbing at at the border. Has no effect if the | |
419 popup does not have a border. | |
415 highlight Highlight group name to use for the text, stored in | 420 highlight Highlight group name to use for the text, stored in |
416 the 'wincolor' option. | 421 the 'wincolor' option. |
417 padding List with numbers, defining the padding | 422 padding List with numbers, defining the padding |
418 above/right/below/left of the popup (similar to CSS). | 423 above/right/below/left of the popup (similar to CSS). |
419 An empty list uses a padding of 1 all around. The | 424 An empty list uses a padding of 1 all around. The |
440 When the list has two characters the first is used for | 445 When the list has two characters the first is used for |
441 the border lines, the second for the corners. | 446 the border lines, the second for the corners. |
442 By default a double line is used all around when | 447 By default a double line is used all around when |
443 'encoding' is "utf-8", otherwise ASCII characters are | 448 'encoding' is "utf-8", otherwise ASCII characters are |
444 used. | 449 used. |
445 zindex Priority for the popup, default 50. Mininum value is | 450 zindex Priority for the popup, default 50. Minimum value is |
446 1, maximum value is 32000. | 451 1, maximum value is 32000. |
447 time Time in milliseconds after which the popup will close. | 452 time Time in milliseconds after which the popup will close. |
448 When omitted |popup_close()| must be used. | 453 When omitted |popup_close()| must be used. |
449 moved Specifies to close the popup if the cursor moved: | 454 moved Specifies to close the popup if the cursor moved: |
450 - "any": if the cursor moved at all | 455 - "any": if the cursor moved at all |