summaryrefslogtreecommitdiffstats
path: root/src/drawscreen.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-03-27 19:26:55 +0100
committerBram Moolenaar <Bram@vim.org>2022-03-27 19:26:55 +0100
commit3e559cd88486ffab6b6fb4e0921b4600d137a617 (patch)
tree282c592a9ddd18ff55bbe6c4094157167f86bfda /src/drawscreen.c
parent565d1278cbbb7bc927bee207d5c2bc0bb95928fa (diff)
patch 8.2.4638: superfluous check if a redraw is needed for 'cursorline'v8.2.4639v8.2.4638
Problem: Superfluous check if a redraw is needed for 'cursorline'. Solution: Remove check_redraw_cursorline(). (closes #10030, closes #10029)
Diffstat (limited to 'src/drawscreen.c')
-rw-r--r--src/drawscreen.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/drawscreen.c b/src/drawscreen.c
index 12eed8c476..cb4757748f 100644
--- a/src/drawscreen.c
+++ b/src/drawscreen.c
@@ -3032,23 +3032,6 @@ redraw_asap(int type)
}
#endif
-#if defined(FEAT_SYN_HL) || defined(PROTO)
-/*
- * Check if the cursor moved and 'cursorline' is set. Mark for a VALID redraw
- * if needed.
- */
- void
-check_redraw_cursorline(void)
-{
- // When 'cursorlineopt' is "screenline" need to redraw always.
- if (curwin->w_p_cul
- && (curwin->w_last_cursorline != curwin->w_cursor.lnum
- || (curwin->w_p_culopt_flags & CULOPT_SCRLINE))
- && !char_avail())
- redraw_later(VALID);
-}
-#endif
-
/*
* Invoked after an asynchronous callback is called.
* If an echo command was used the cursor needs to be put back where
@@ -3093,10 +3076,9 @@ redraw_after_callback(int call_update_screen, int do_message)
}
else if (State & (NORMAL | INSERT | TERMINAL))
{
-#ifdef FEAT_SYN_HL
- // might need to update for 'cursorline'
- check_redraw_cursorline();
-#endif
+ update_topline();
+ validate_cursor();
+
// keep the command line if possible
update_screen(VALID_NO_UPDATE);
setcursor();