summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2008-06-20 15:31:51 +0000
committervimboss <devnull@localhost>2008-06-20 15:31:51 +0000
commit97192149a7156f5d75118f82c8588226f38c50f2 (patch)
tree0f00691e34a19fb6983812be3806cd3625991650
parentc1fa2ecf2971f554584a179f55c463bea83862b4 (diff)
downloadvim-97192149a7156f5d75118f82c8588226f38c50f2.tar.gz
updated for version 7.1-322v7.1.322v7-1-322
-rw-r--r--runtime/doc/eval.txt4
-rw-r--r--src/eval.c12
-rw-r--r--src/version.c2
3 files changed, 16 insertions, 2 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 57e2c4e4..126b98b9 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -3515,6 +3515,10 @@ line({expr}) The result is a Number, which is the line number of the file
returned)
w0 first line visible in current window
w$ last line visible in current window
+ v In Visual mode: the start of the Visual area (the
+ cursor is the end). When not in Visual mode
+ returns the cursor position. Differs from |'<| in
+ that it's updated right away.
Note that a mark in another file can be used. The line number
then applies to another buffer.
To get the column number use |col()|. To get both use
diff --git a/src/eval.c b/src/eval.c
index 1ad9cec1..54ca054c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -16907,9 +16907,17 @@ var2fpos(varp, dollar_lnum, fnum)
name = get_tv_string_chk(varp);
if (name == NULL)
return NULL;
- if (name[0] == '.') /* cursor */
+ if (name[0] == '.') /* cursor */
return &curwin->w_cursor;
- if (name[0] == '\'') /* mark */
+#ifdef FEAT_VISUAL
+ if (name[0] == 'v' && name[1] == NUL) /* Visual start */
+ {
+ if (VIsual_active)
+ return &VIsual;
+ return &curwin->w_cursor;
+ }
+#endif
+ if (name[0] == '\'') /* mark */
{
pp = getmark_fnum(name[1], FALSE, fnum);
if (pp == NULL || pp == (pos_T *)-1 || pp->lnum <= 0)
diff --git a/src/version.c b/src/version.c
index dc2d995d..c8d4958c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 322,
+/**/
321,
/**/
320,