diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-04-26 19:35:16 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2023-05-02 13:11:46 +0200 |
commit | 1757ffad4bc0f43d73cd12bf552c95c233d0e77e (patch) | |
tree | d9d5df24e02e9000b26830885dad7cc31fb6748f | |
parent | 7dc2c087e7c2071166772dc6b167c802612112fe (diff) | |
download | rneovim-1757ffad4bc0f43d73cd12bf552c95c233d0e77e.tar.gz rneovim-1757ffad4bc0f43d73cd12bf552c95c233d0e77e.tar.bz2 rneovim-1757ffad4bc0f43d73cd12bf552c95c233d0e77e.zip |
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>
-rw-r--r-- | src/nvim/drawline.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index c9cd08fedd..1e8de1bab0 100644 --- 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. |