diff options
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index 6ec0975d7..d29f1a4f1 100644 --- a/src/eval.c +++ b/src/eval.c @@ -15509,11 +15509,13 @@ var2fpos(varp, lnum) pos.col = 0; if (name[1] == '0') /* "w0": first visible line */ { + update_topline(); pos.lnum = curwin->w_topline; return &pos; } else if (name[1] == '$') /* "w$": last visible line */ { + validate_botline(); pos.lnum = curwin->w_botline - 1; return &pos; } |