aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/normal.c
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-03-09 11:45:20 +0100
committerbfredl <bjorn.linse@gmail.com>2023-03-12 10:18:57 +0100
commit846a056744bf458d4376cd7638c94f7c82862046 (patch)
tree96121391a4fec3845248eab7571819c9ebbda1a6 /src/nvim/normal.c
parentd15abd1be4ae85b10174e3ee139d3b7605e87577 (diff)
downloadrneovim-846a056744bf458d4376cd7638c94f7c82862046.tar.gz
rneovim-846a056744bf458d4376cd7638c94f7c82862046.tar.bz2
rneovim-846a056744bf458d4376cd7638c94f7c82862046.zip
refactor(redraw): make cursor position redraw use the "redraw later" pattern
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r--src/nvim/normal.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 890215e754..2a8fbbb962 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1306,16 +1306,20 @@ static void normal_redraw(NormalState *s)
update_topline(curwin);
validate_cursor();
+ show_cursor_info_later(false);
+
if (VIsual_active) {
redraw_curbuf_later(UPD_INVERTED); // update inverted part
- update_screen();
- } else if (must_redraw) {
- update_screen();
- } else if (redraw_cmdline || clear_cmdline || redraw_mode) {
- showmode();
}
- redraw_statuslines();
+ if (must_redraw) {
+ update_screen();
+ } else {
+ redraw_statuslines();
+ if (redraw_cmdline || clear_cmdline || redraw_mode) {
+ showmode();
+ }
+ }
if (need_maketitle) {
maketitle();
@@ -1348,7 +1352,6 @@ static void normal_redraw(NormalState *s)
did_emsg = false;
msg_didany = false; // reset lines_left in msg_start()
may_clear_sb_text(); // clear scroll-back text on next msg
- show_cursor_info(false);
setcursor();
}