summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-02 18:40:06 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-02 18:40:06 +0200
commit3397f74ac2ac27f1eef48e950c3c8eeb0338fe55 (patch)
tree7ca95e2cfc692c2d90830948c4a4a6c1b620cd22 /runtime
parentb0ebbda06cf1a4a7c40cb274529c4c53de534e32 (diff)
patch 8.1.1453: popup window "moved" property not implemented yetv8.1.1453
Problem: Popup window "moved" property not implemented yet. Solution: Implement it.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/popup.txt19
1 files changed, 11 insertions, 8 deletions
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index 86476d0d80..7fa172c88b 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -90,7 +90,6 @@ Probably 2. is the best choice.
IMPLEMENTATION:
- Code is in popupwin.c
-- Fix positioning with border and padding.
- Why does 'nrformats' leak from the popup window buffer???
- Make redrawing more efficient and avoid flicker.
First draw popups, creating a mask, use the mask in screen_line() when
@@ -410,13 +409,14 @@ The second argument of |popup_create()| is a dictionary with options:
zindex Priority for the popup, default 50.
time Time in milliseconds after which the popup will close.
When omitted |popup_close()| must be used.
- moved "cell": close the popup if the cursor moved at least
- one screen cell.
- "word" allows for moving the cursor within |<cword>|
- "WORD" allows for moving the cursor within |<cWORD>|
- a list with two numbers specifies the start and end
- column outside of which the popup will close
- {not implemented yet}
+ moved Specifies to close the popup if the cursor moved:
+ - "any": if the cursor moved at all
+ - "word": if the cursor moved outside |<cword>|
+ - "WORD": if the cursor moved outside |<cWORD>|
+ - [{start}, {end}]: if the cursor moved before column
+ {start} or after {end}
+ The popup also closes if the cursor moves to another
+ line or to another window.
filter A callback that can filter typed characters, see
|popup-filter|.
callback A callback that is called when the popup closes, e.g.
@@ -510,6 +510,9 @@ The callback is invoked with two arguments: the ID of the popup window and the
result, which could be an index in the popup lines, or whatever was passed as
the second argument of `popup_close()`.
+If the popup is closed because the cursor moved, the number -1 is passed to
+the callback.
+
==============================================================================
3. Examples *popup-examples*