vim-patch:8.2.4644: redrawing too often when 'relativenumber' is set (#17756)

Problem:  Redrawing too often when 'relativenumber' is set.
Solution: Only redraw when the cursor line changed. (Lewis Russell,
          closes vim/vim#10040)
1624639ec8
This commit is contained in:
Lewis Russell
2022-03-29 12:37:42 +01:00
committed by GitHub
parent d89a80fafc
commit 81d7628c3f
3 changed files with 8 additions and 4 deletions

View File

@@ -287,7 +287,7 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, long xtra
}
// Relative numbering may require updating more.
if (wp->w_p_rnu) {
if (wp->w_p_rnu && xtra != 0) {
redraw_later(wp, SOME_VALID);
}