Mercurial > vim
diff 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 |
line wrap: on
line diff
--- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -70,6 +70,7 @@ By default the 'wrap' option is set, so there is not enough space, some text may be invisible. + TODO: Example how to use syntax highlighting of a code snippet. @@ -242,14 +243,6 @@ popup_getposition({id}) *popup_getpo positioning mechanism applied. If popup window {id} is not found an empty Dict is returned. -win_execute({id}, {command}) - {not implemented yet} - Like `execute()` but in the context of window {id}. - The window will temporarily be made the current window, - without triggering autocommands. - Example: > - call win_execute(winid, 'syntax enable') -< *:popupclear* *:popupc* :popupc[lear] Emergency solution to a misbehaving plugin: close all popup @@ -274,6 +267,10 @@ better leave them alone. The window does have a cursor position, but the cursor is not displayed. +To execute a command in the context of the popup window and buffer use +`win_execute()`. Example: > + call win_execute(winid, 'syntax enable') + Options can be set on the window with `setwinvar()`, e.g.: > call setwinvar(winid, '&wrap', 0) And options can be set on the buffer with `setbufvar()`, e.g.: >