Mercurial > vim
diff src/eval.c @ 666:0137e7c3d31b v7.0196
updated for version 7.0196
author | vimboss |
---|---|
date | Fri, 10 Feb 2006 23:23:57 +0000 |
parents | d6a69271cb9a |
children | 9090f866cd57 |
line wrap: on
line diff
--- 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) {