summaryrefslogtreecommitdiffstats
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-11-01 14:32:36 +0000
committerBram Moolenaar <Bram@vim.org>2006-11-01 14:32:36 +0000
commit219b87038a8ae7e0731677ed265779f3273a5cfa (patch)
tree62e941e3d5c6f2bbe53bcdf7fe7bd3b9de354ba6 /runtime/doc/eval.txt
parent74c596b5a8210293292cf512930f555e2b16a3db (diff)
updated for version 7.0-155v7.0.155
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt28
1 files changed, 27 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index caafd75ac6..7c928ea84a 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0. Last change: 2006 Sep 22
+*eval.txt* For Vim version 7.0. Last change: 2006 Nov 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1374,6 +1374,21 @@ v:lnum Line number for the 'foldexpr' |fold-expr| and 'indentexpr'
'guitabtooltip'. Only valid while one of these expressions is
being evaluated. Read-only when in the |sandbox|.
+ *v:mouse_win* *mouse_win-variable*
+v:mouse_win Window number for a mouse click obtained with |getchar()|.
+ First window has number 1, like with |winnr()|. 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
+ value is zero when there was no mouse button click.
+
+ *v:mouse_col* *mouse_col-variable*
+v:mouse_col Column number for a mouse click obtained with |getchar()|.
+ This is the screen column number, like with |virtcol()|. The
+ value is zero when there was no mouse button click.
+
*v:prevcount* *prevcount-variable*
v:prevcount The count given for the last but one Normal mode command.
This is the v:count value of the previous command. Useful if
@@ -2702,6 +2717,17 @@ getchar([expr]) *getchar()*
one-byte character it is the character itself as a number.
Use nr2char() to convert it to a String.
+ 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: >
+ let c = getchar()
+ if c == "\<LeftMouse>" && v:mouse_win > 0
+ exe v:mouse_win . "wincmd w"
+ exe v:mouse_lnum
+ exe "normal " . v:mouse_col . "|"
+ endif
+<
There is no prompt, you will somehow have to make clear to the
user that a character has to be typed.
There is no mapping for the character.