Mercurial > vim
comparison src/move.c @ 34279:7f84a834055a v9.1.0077
patch 9.1.0077: Unnecessary call to redraw_for_cursorline() in nv_mousescroll()
Commit: https://github.com/vim/vim/commit/3f1b5312e0fa0089f255bf9c0c3b27590552119e
Author: zeertzjq <zeertzjq@outlook.com>
Date: Tue Feb 6 10:43:36 2024 +0100
patch 9.1.0077: Unnecessary call to redraw_for_cursorline() in nv_mousescroll()
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 06 Feb 2024 11:00:07 +0100 |
parents | a522c6c0127b |
children | 8079960136db |
comparison
equal
deleted
inserted
replaced
34278:e67eafbceca9 | 34279:7f84a834055a |
---|---|
17 * The 'scrolloff' option makes this a bit complicated. | 17 * The 'scrolloff' option makes this a bit complicated. |
18 */ | 18 */ |
19 | 19 |
20 #include "vim.h" | 20 #include "vim.h" |
21 | 21 |
22 static void redraw_for_cursorline(win_T *wp); | |
22 static int scrolljump_value(void); | 23 static int scrolljump_value(void); |
23 static int check_top_offset(void); | 24 static int check_top_offset(void); |
24 static void curs_rows(win_T *wp); | 25 static void curs_rows(win_T *wp); |
25 | 26 |
26 typedef struct | 27 typedef struct |
153 | 154 |
154 /* | 155 /* |
155 * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is | 156 * Redraw when w_cline_row changes and 'relativenumber' or 'cursorline' is |
156 * set. | 157 * set. |
157 */ | 158 */ |
158 void | 159 static void |
159 redraw_for_cursorline(win_T *wp) | 160 redraw_for_cursorline(win_T *wp) |
160 { | 161 { |
161 if ((wp->w_p_rnu | 162 if ((wp->w_p_rnu |
162 #ifdef FEAT_SYN_HL | 163 #ifdef FEAT_SYN_HL |
163 || wp->w_p_cul | 164 || wp->w_p_cul |