fix(drawline): don't draw beyond end of window with 'rnu' (#29406)

This commit is contained in:
zeertzjq
2024-06-19 09:20:24 +08:00
committed by GitHub
parent b381b2d529
commit b1c439cef6
2 changed files with 41 additions and 1 deletions

View File

@@ -1553,7 +1553,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s
// When only updating the columns and that's done, stop here.
if (col_rows > 0) {
wlv_put_linebuf(wp, &wlv, wlv.off, false, bg_attr, 0);
wlv_put_linebuf(wp, &wlv, MIN(wlv.off, grid->cols), false, bg_attr, 0);
// Need to update more screen lines if:
// - 'statuscolumn' needs to be drawn, or
// - LineNrAbove or LineNrBelow is used, or