summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-02-10 23:23:57 +0000
committerBram Moolenaar <Bram@vim.org>2006-02-10 23:23:57 +0000
commitf52c725c4739f2d3368029d67218d6cae0d87995 (patch)
tree15779b49216c2561112b3454c36020b879ee6876 /src/eval.c
parentc7453f52d4eb5a5259b6b587d62b7e99e1ebdd10 (diff)
downloadvim-git-f52c725c4739f2d3368029d67218d6cae0d87995.tar.gz
updated for version 7.0196v7.0196
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 3044ef892..50f688a76 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -15378,7 +15378,21 @@ var2fpos(varp, lnum)
return NULL;
return pp;
}
- if (name[0] == '$') /* last column or line */
+ if (name[0] == 'w' && lnum)
+ {
+ pos.col = 0;
+ if (name[1] == '0') /* "w0": first visible line */
+ {
+ pos.lnum = curwin->w_topline;
+ return &pos;
+ }
+ else if (name[1] == '$') /* "w$": last visible line */
+ {
+ pos.lnum = curwin->w_botline - 1;
+ return &pos;
+ }
+ }
+ else if (name[0] == '$') /* last column or line */
{
if (lnum)
{