patch 7.4.1894
Problem: Cannot get the window ID for a mouse click.
Solution: Add v:mouse_winid.
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b3262b2..9cc854f 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2016 May 25
+*eval.txt* For Vim version 7.4. Last change: 2016 Jun 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1358,6 +1358,10 @@
window has number zero (unlike most other places where a
window gets a number).
+ *v:beval_winid* *beval_winid-variable*
+v:beval_winid The window ID of the window, over which the mouse pointer is.
+ Otherwise like v:beval_winnr.
+
*v:char* *char-variable*
v:char Argument for evaluating 'formatexpr' and used for the typed
character when using <expr> in an abbreviation |:map-<expr>|.
@@ -1591,6 +1595,10 @@
First window has number 1, like with |winnr()|. The value is
zero when there was no mouse button click.
+ *v:mouse_winid* *mouse_winid-variable*
+v:mouse_winid Window ID for a mouse click obtained with |getchar()|.
+ The value is zero when there was no mouse button click.
+
*v:mouse_lnum* *mouse_lnum-variable*
v:mouse_lnum Line number for a mouse click obtained with |getchar()|.
This is the text line number, not the screen line number. The
@@ -1821,7 +1829,7 @@
When an MS-Windows GUI is running this will be set to the
window handle.
Otherwise the value is zero.
- Note: for windows inside Vim use |winnr()|.
+ Note: for windows inside Vim use |winnr()| or |win_getid()|.
==============================================================================
4. Builtin Functions *functions*
@@ -3846,8 +3854,8 @@
When the user clicks a mouse button, the mouse event will be
returned. The position can then be found in |v:mouse_col|,
- |v:mouse_lnum| and |v:mouse_win|. This example positions the
- mouse as it would normally happen: >
+ |v:mouse_lnum|, |v:mouse_winid| and |v:mouse_win|. This
+ example positions the mouse as it would normally happen: >
let c = getchar()
if c == "\<LeftMouse>" && v:mouse_win > 0
exe v:mouse_win . "wincmd w"
@@ -4724,6 +4732,10 @@
"fail" job failed to start
"dead" job died or was stopped after running
+ On Unix a non-existing command results in "dead" instead of
+ "fail", because a fork happens before the failure can be
+ detected.
+
If an exit callback was set with the "exit_cb" option and the
job is now detected to be "dead" the callback will be invoked.
@@ -6369,10 +6381,15 @@
*E927*
If {action} is set to 'a', then the items from {list} are
added to the existing quickfix list. If there is no existing
- list, then a new list is created. If {action} is set to 'r',
- then the items from the current quickfix list are replaced
- with the items from {list}. If {action} is not present or is
- set to ' ', then a new list is created.
+ list, then a new list is created.
+
+ If {action} is set to 'r', then the items from the current
+ quickfix list are replaced with the items from {list}. This
+ can also be used to clear the list: >
+ :call setqflist([], 'r')
+<
+ If {action} is not present or is set to ' ', then a new list
+ is created.
Returns zero for success, -1 for failure.