neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 1757ffad4bc0f43d73cd12bf552c95c233d0e77e
parent 7dc2c087e7c2071166772dc6b167c802612112fe
Author: Luuk van Baal <luukvbaal@gmail.com>
Date:   Wed, 26 Apr 2023 19:35:16 +0200

vim-patch:9.0.0679: tests failing with 'smoothscroll', 'number' and "n" in 'cpo'

Problem:    Tests failing with 'smoothscroll', 'number' and "n" in 'cpo'.
Solution:   Do not count number column in topline if columns are skipped.

https://github.com/vim/vim/commit/35b251d2c2c9d415887d334473669ea886117356

Co-authored-by: Bram Moolenaar <Bram@vim.org>

Diffstat:
Msrc/nvim/drawline.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c @@ -595,9 +595,11 @@ static int get_line_number_attr(win_T *wp, winlinevars_T *wlv) static void handle_lnum_col(win_T *wp, winlinevars_T *wlv, int num_signs, int sign_idx, int sign_num_attr, int sign_cul_attr) { + bool has_cpo_n = vim_strchr(p_cpo, CPO_NUMCOL) != NULL; + if ((wp->w_p_nu || wp->w_p_rnu) - && (wlv->row == wlv->startrow + wlv->filler_lines - || vim_strchr(p_cpo, CPO_NUMCOL) == NULL)) { + && (wlv->row == wlv->startrow + wlv->filler_lines || !has_cpo_n) + && !(has_cpo_n && wp->w_skipcol > 0 && wlv->lnum == wp->w_topline)) { // If 'signcolumn' is set to 'number' and a sign is present // in "lnum", then display the sign instead of the line // number.