summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-29 21:44:40 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-29 21:44:40 +0200
commit868b7b6712ea4f2232eeeae18c5cbbbddf2ee84d (patch)
treebec62dd676992d5c152d3fc6df333f95f0393a98 /runtime
parent1bbebab5255b5300d727c9b3f1b308205847dafd (diff)
patch 8.1.1418: win_execute() is not implemented yetv8.1.1418
Problem: Win_execute() is not implemented yet. Solution: Implement it.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt13
-rw-r--r--runtime/doc/popup.txt13
2 files changed, 17 insertions, 9 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 15ffed343b..f3aab923e3 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2739,6 +2739,8 @@ values({dict}) List values in {dict}
virtcol({expr}) Number screen column of cursor or mark
visualmode([expr]) String last visual mode used
wildmenumode() Number whether 'wildmenu' mode is active
+win_execute({id}, {command} [, {silent}])
+ String execute {command} in window {id}
win_findbuf({bufnr}) List find windows containing {bufnr}
win_getid([{win} [, {tab}]]) Number get window ID for {win} in {tab}
win_gotoid({expr}) Number go to window with ID {expr}
@@ -4012,7 +4014,10 @@ execute({command} [, {silent}]) *execute()*
To get a list of lines use |split()| on the result: >
split(execute('args'), "\n")
-< When used recursively the output of the recursive call is not
+< To execute a command in another window than the current one
+ use `win_execute()`.
+
+ When used recursively the output of the recursive call is not
included in the output of the higher level call.
exepath({expr}) *exepath()*
@@ -10310,6 +10315,12 @@ wildmenumode() *wildmenumode()*
<
(Note, this needs the 'wildcharm' option set appropriately).
+win_execute({id}, {command} [, {silent}]) *win_execute()*
+ 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')
win_findbuf({bufnr}) *win_findbuf()*
Returns a list with |window-ID|s for windows that contain
diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt
index 1954754548..c573e77390 100644
--- a/runtime/doc/popup.txt
+++ b/runtime/doc/popup.txt
@@ -70,6 +70,7 @@ By default the 'wrap' option is set, so that no text disappears. However, if
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_getposition()*
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.: >