Mercurial > vim
comparison runtime/doc/popup.txt @ 16833:6699c03347d2 v8.1.1418
patch 8.1.1418: win_execute() is not implemented yet
commit https://github.com/vim/vim/commit/868b7b6712ea4f2232eeeae18c5cbbbddf2ee84d
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 29 21:44:40 2019 +0200
patch 8.1.1418: win_execute() is not implemented yet
Problem: Win_execute() is not implemented yet.
Solution: Implement it.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 May 2019 21:45:05 +0200 |
parents | 5cebaecad422 |
children | cf630fab9fb6 |
comparison
equal
deleted
inserted
replaced
16832:74537e143a88 | 16833:6699c03347d2 |
---|---|
66 It can be limited with the "maxwidth" property. You can use spaces to | 66 It can be limited with the "maxwidth" property. You can use spaces to |
67 increase the width. | 67 increase the width. |
68 | 68 |
69 By default the 'wrap' option is set, so that no text disappears. However, if | 69 By default the 'wrap' option is set, so that no text disappears. However, if |
70 there is not enough space, some text may be invisible. | 70 there is not enough space, some text may be invisible. |
71 | |
71 | 72 |
72 | 73 |
73 TODO: | 74 TODO: |
74 | 75 |
75 Example how to use syntax highlighting of a code snippet. | 76 Example how to use syntax highlighting of a code snippet. |
240 Note that these are the actual screen positions. They differ | 241 Note that these are the actual screen positions. They differ |
241 from the values in `popup_getoptions()` for the sizing and | 242 from the values in `popup_getoptions()` for the sizing and |
242 positioning mechanism applied. | 243 positioning mechanism applied. |
243 If popup window {id} is not found an empty Dict is returned. | 244 If popup window {id} is not found an empty Dict is returned. |
244 | 245 |
245 win_execute({id}, {command}) | |
246 {not implemented yet} | |
247 Like `execute()` but in the context of window {id}. | |
248 The window will temporarily be made the current window, | |
249 without triggering autocommands. | |
250 Example: > | |
251 call win_execute(winid, 'syntax enable') | |
252 < | |
253 | 246 |
254 *:popupclear* *:popupc* | 247 *:popupclear* *:popupc* |
255 :popupc[lear] Emergency solution to a misbehaving plugin: close all popup | 248 :popupc[lear] Emergency solution to a misbehaving plugin: close all popup |
256 windows. | 249 windows. |
257 | 250 |
271 | 264 |
272 It is possible to change these options, but anything might break then, so | 265 It is possible to change these options, but anything might break then, so |
273 better leave them alone. | 266 better leave them alone. |
274 | 267 |
275 The window does have a cursor position, but the cursor is not displayed. | 268 The window does have a cursor position, but the cursor is not displayed. |
269 | |
270 To execute a command in the context of the popup window and buffer use | |
271 `win_execute()`. Example: > | |
272 call win_execute(winid, 'syntax enable') | |
276 | 273 |
277 Options can be set on the window with `setwinvar()`, e.g.: > | 274 Options can be set on the window with `setwinvar()`, e.g.: > |
278 call setwinvar(winid, '&wrap', 0) | 275 call setwinvar(winid, '&wrap', 0) |
279 And options can be set on the buffer with `setbufvar()`, e.g.: > | 276 And options can be set on the buffer with `setbufvar()`, e.g.: > |
280 call setbufvar(winbufnr(winid), '&filetype', 'java') | 277 call setbufvar(winbufnr(winid), '&filetype', 'java') |