aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/move.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-10-18 10:34:55 +0800
committerGitHub <noreply@github.com>2023-10-18 10:34:55 +0800
commit366d0c7887f76f0adc40671292db46f115c9317e (patch)
tree0074f8aac664961c0bc8cb2fc8fe47c00efa7ad9 /src/nvim/move.c
parentbbc74d51ad791edad1948178736589cb181236e8 (diff)
downloadrneovim-366d0c7887f76f0adc40671292db46f115c9317e.tar.gz
rneovim-366d0c7887f76f0adc40671292db46f115c9317e.tar.bz2
rneovim-366d0c7887f76f0adc40671292db46f115c9317e.zip
fix(move): check the correct buffer (#25698)
Diffstat (limited to 'src/nvim/move.c')
-rw-r--r--src/nvim/move.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c
index 8be05aaa24..da75c79e0b 100644
--- a/src/nvim/move.c
+++ b/src/nvim/move.c
@@ -247,7 +247,7 @@ void update_topline(win_T *wp)
int old_topfill = wp->w_topfill;
// If the buffer is empty, always set topline to 1.
- if (buf_is_empty(curbuf)) { // special case - file is empty
+ if (buf_is_empty(wp->w_buffer)) { // special case - file is empty
if (wp->w_topline != 1) {
redraw_later(wp, UPD_NOT_VALID);
}