diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2018-03-31 11:12:27 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-03-31 11:12:27 +0200 |
commit | 98e71123900fbdf26a16a43297a1f58118cde41b (patch) | |
tree | 6150b62965361020e20c6d0c0dde285a1d1f0ffb /src/nvim/screen.c | |
parent | 362346f56334d05d080be05ae4b8c9902dbdc3f7 (diff) | |
download | rneovim-98e71123900fbdf26a16a43297a1f58118cde41b.tar.gz rneovim-98e71123900fbdf26a16a43297a1f58118cde41b.tar.bz2 rneovim-98e71123900fbdf26a16a43297a1f58118cde41b.zip |
msg: do not scroll entire screen (#8088)
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 22de08041a..05ad126fa0 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -300,13 +300,25 @@ void update_screen(int type) * if the screen was scrolled up when displaying a message, scroll it down */ if (msg_scrolled) { - clear_cmdline = TRUE; - if (msg_scrolled > Rows - 5) /* clearing is faster */ + clear_cmdline = true; + if (dy_flags & DY_MSGSEP) { + FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { + int valid = Rows - msg_scrollsize(); + if (wp->w_winrow + wp->w_height > valid) { + wp->w_redr_type = NOT_VALID; + wp->w_lines_valid = 0; + } + if (wp->w_winrow + wp->w_height + wp->w_status_height > valid) { + wp->w_redr_status = true; + } + } + } else if (msg_scrolled > Rows - 5) { // clearing is faster type = CLEAR; - else if (type != CLEAR) { - check_for_delay(FALSE); - if (screen_ins_lines(0, 0, msg_scrolled, (int)Rows, NULL) == FAIL) + } else if (type != CLEAR) { + check_for_delay(false); + if (screen_ins_lines(0, 0, msg_scrolled, (int)Rows, NULL) == FAIL) { type = CLEAR; + } FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { if (wp->w_winrow < msg_scrolled) { if (wp->w_winrow + wp->w_height > msg_scrolled |