diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2023-04-26 19:40:22 +0200 |
---|---|---|
committer | Luuk van Baal <luukvbaal@gmail.com> | 2023-05-02 13:11:46 +0200 |
commit | 34a4f3729ce4a047ae945238276c8e2dabc38048 (patch) | |
tree | 8328ed2b67b7267b56bf2b84e1b2173efe9f03de /src | |
parent | 1757ffad4bc0f43d73cd12bf552c95c233d0e77e (diff) | |
download | rneovim-34a4f3729ce4a047ae945238276c8e2dabc38048.tar.gz rneovim-34a4f3729ce4a047ae945238276c8e2dabc38048.tar.bz2 rneovim-34a4f3729ce4a047ae945238276c8e2dabc38048.zip |
vim-patch:9.0.0680: tests failing with 'breakindent', 'number' and "n" in 'cpo'
Problem: Tests failing with 'breakindent', 'number' and "n" in 'cpo'.
Solution: Do count the number column in topline if 'breakindent' is set.
https://github.com/vim/vim/commit/3725116f6ec3b5c01e456b151a60c0690e04f76c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/drawline.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 1e8de1bab0..0d701f07bb 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -599,10 +599,11 @@ static void handle_lnum_col(win_T *wp, winlinevars_T *wlv, int num_signs, int si if ((wp->w_p_nu || wp->w_p_rnu) && (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. + // there is no line number in a wrapped line when "n" is in + // 'cpoptions', but 'breakindent' assumes it anyway. + && !((has_cpo_n && !wp->w_p_bri) && 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. if (*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u' && num_signs > 0) { get_sign_display_info(true, wp, wlv, sign_idx, sign_cul_attr); } else { |