diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-06 10:43:36 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-02-06 10:43:36 +0100 |
commit | 3f1b5312e0fa0089f255bf9c0c3b27590552119e (patch) | |
tree | 0afd6d3931b392dea02d2229af6491b5215b2363 /src | |
parent | 0f4054feb66ea55414f97add63b3070d7d7b5295 (diff) |
patch 9.1.0077: Unnecessary call to redraw_for_cursorline() in nv_mousescroll()v9.1.0077
Problem: The call to redraw_for_cursorline() in nv_mousescroll() is
unnecessary because redraw_for_cursorline() only sets redraw
type to UPD_VALID, and all code paths in do_mousescroll()
already set redraw type to at least UPD_VALID.
Solution: Remove call to redraw_for_cursorline() in nv_mousescroll().
(zeertzjq)
closes: #13979
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mouse.c | 4 | ||||
-rw-r--r-- | src/move.c | 3 | ||||
-rw-r--r-- | src/proto/move.pro | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/src/mouse.c b/src/mouse.c index b0db60f11f..e5f06874f8 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -2224,10 +2224,6 @@ nv_mousescroll(cmdarg_T *cap) // Call the common mouse scroll function shared with other modes. do_mousescroll(cap); -#ifdef FEAT_SYN_HL - if (curwin != old_curwin && curwin->w_p_cul) - redraw_for_cursorline(curwin); -#endif curwin->w_redr_status = TRUE; curwin = old_curwin; curbuf = curwin->w_buffer; diff --git a/src/move.c b/src/move.c index 5d2fece63a..9ea24c8ed2 100644 --- a/src/move.c +++ b/src/move.c @@ -19,6 +19,7 @@ #include "vim.h" +static void redraw_for_cursorline(win_T *wp); static int scrolljump_value(void); static int check_top_offset(void); static void curs_rows(win_T *wp); @@ -155,7 +156,7 @@ comp_botline(win_T *wp) * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is * set. */ - void + static void redraw_for_cursorline(win_T *wp) { if ((wp->w_p_rnu diff --git a/src/proto/move.pro b/src/proto/move.pro index b96b86d0fa..bc9c025635 100644 --- a/src/proto/move.pro +++ b/src/proto/move.pro @@ -1,6 +1,5 @@ /* move.c */ int adjust_plines_for_skipcol(win_T *wp); -void redraw_for_cursorline(win_T *wp); int sms_marker_overlap(win_T *wp, int extra2); void update_topline_redraw(void); void update_topline(void); diff --git a/src/version.c b/src/version.c index efde1b57f8..3e4102da9e 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 77, +/**/ 76, /**/ 75, |