summaryrefslogtreecommitdiffstats
path: root/runtime/doc/popup.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-04 22:53:05 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-04 22:53:05 +0100
commit560979ed4f0216f902a2c247e937f00a27dcb198 (patch)
tree777c300b97dc91f20ac21decb06a48bd18102cc9 /runtime/doc/popup.txt
parent80147dda4f5a25c9533bc88583c87dbbb0a0f1f1 (diff)
Update runtime files.
Diffstat (limited to 'runtime/doc/popup.txt')
-rw-r--r--runtime/doc/popup.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index ec1faf168e..6372e4d80d 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -1,4 +1,4 @@
-*popup.txt* For Vim version 8.2. Last change: 2019 Nov 30
+*popup.txt* For Vim version 8.2. Last change: 2020 Feb 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -11,6 +11,7 @@ Displaying text in a floating window. *popup* *popup-window* *popupwin*
Window position and size |popup-position|
Closing the popup window |popup-close|
Popup buffer and window |popup-buffer|
+ Terminal in popup window |popup-terminal|
2. Functions |popup-functions|
Details |popup-function-details|
3. Usage |popup-usage|
@@ -140,6 +141,22 @@ And options can be set on the buffer with `setbufvar()`, e.g.: >
You can also use `win_execute()` with a ":setlocal" command.
+TERMINAL IN POPUP WINDOW *popup-terminal*
+
+A special case is running a terminal in a popup window. Many rules are then
+different: *E863*
+- The popup window always has focus, it is not possible to switch to another
+ window.
+- When the job ends, the popup window closes.
+- The default Pmenu color is only used for the border and padding. To change
+ the color of the terminal itself set 'wincolor'.
+
+To run a terminal in a popup window, first create the terminal hidden. Then
+pass the buffer number to popup_create(). Example: >
+ let buf = term_start(['picker', 'Something'], #{hidden: 1, term_finish: 'close'})
+ let winid = popup_create(buf, #{minwidth: 50, minheight: 20})
+ set wincolor=Search
+
==============================================================================
2. Functions *popup-functions*