Mercurial > vim
comparison runtime/doc/popup.txt @ 19303:51bc26d4a393
Update runtime files.
Commit: https://github.com/vim/vim/commit/560979ed4f0216f902a2c247e937f00a27dcb198
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Feb 4 22:53:05 2020 +0100
Update runtime files.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 04 Feb 2020 23:00:04 +0100 |
parents | af69c9335223 |
children | 7be3663e2f2b |
comparison
equal
deleted
inserted
replaced
19302:5060698bf8a8 | 19303:51bc26d4a393 |
---|---|
1 *popup.txt* For Vim version 8.2. Last change: 2019 Nov 30 | 1 *popup.txt* For Vim version 8.2. Last change: 2020 Feb 03 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
9 | 9 |
10 1. Introduction |popup-intro| | 10 1. Introduction |popup-intro| |
11 Window position and size |popup-position| | 11 Window position and size |popup-position| |
12 Closing the popup window |popup-close| | 12 Closing the popup window |popup-close| |
13 Popup buffer and window |popup-buffer| | 13 Popup buffer and window |popup-buffer| |
14 Terminal in popup window |popup-terminal| | |
14 2. Functions |popup-functions| | 15 2. Functions |popup-functions| |
15 Details |popup-function-details| | 16 Details |popup-function-details| |
16 3. Usage |popup-usage| | 17 3. Usage |popup-usage| |
17 popup_create() arguments |popup_create-arguments| | 18 popup_create() arguments |popup_create-arguments| |
18 Popup text properties |popup-props| | 19 Popup text properties |popup-props| |
137 call setwinvar(winid, '&wrap', 0) | 138 call setwinvar(winid, '&wrap', 0) |
138 And options can be set on the buffer with `setbufvar()`, e.g.: > | 139 And options can be set on the buffer with `setbufvar()`, e.g.: > |
139 call setbufvar(winbufnr(winid), '&filetype', 'java') | 140 call setbufvar(winbufnr(winid), '&filetype', 'java') |
140 You can also use `win_execute()` with a ":setlocal" command. | 141 You can also use `win_execute()` with a ":setlocal" command. |
141 | 142 |
143 | |
144 TERMINAL IN POPUP WINDOW *popup-terminal* | |
145 | |
146 A special case is running a terminal in a popup window. Many rules are then | |
147 different: *E863* | |
148 - The popup window always has focus, it is not possible to switch to another | |
149 window. | |
150 - When the job ends, the popup window closes. | |
151 - The default Pmenu color is only used for the border and padding. To change | |
152 the color of the terminal itself set 'wincolor'. | |
153 | |
154 To run a terminal in a popup window, first create the terminal hidden. Then | |
155 pass the buffer number to popup_create(). Example: > | |
156 let buf = term_start(['picker', 'Something'], #{hidden: 1, term_finish: 'close'}) | |
157 let winid = popup_create(buf, #{minwidth: 50, minheight: 20}) | |
158 set wincolor=Search | |
142 | 159 |
143 ============================================================================== | 160 ============================================================================== |
144 2. Functions *popup-functions* | 161 2. Functions *popup-functions* |
145 | 162 |
146 Creating a popup window: | 163 Creating a popup window: |