diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-19 09:20:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-19 09:20:24 +0800 |
commit | b1c439cef6cae54745f3bf446596c1b7e417c80e (patch) | |
tree | 5afb90a872d358ba1307672ebdface70be9e7401 /src | |
parent | b381b2d529741ddd4f3664959640917a10cd91b5 (diff) | |
download | rneovim-b1c439cef6cae54745f3bf446596c1b7e417c80e.tar.gz rneovim-b1c439cef6cae54745f3bf446596c1b7e417c80e.tar.bz2 rneovim-b1c439cef6cae54745f3bf446596c1b7e417c80e.zip |
fix(drawline): don't draw beyond end of window with 'rnu' (#29406)
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/drawline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 6109652f7d..579b237af6 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -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 |