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.

3725116f6e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
Luuk van Baal 2023-04-26 19:40:22 +02:00
parent 1757ffad4b
commit 34a4f3729c

View File

@ -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) if ((wp->w_p_nu || wp->w_p_rnu)
&& (wlv->row == wlv->startrow + wlv->filler_lines || !has_cpo_n) && (wlv->row == wlv->startrow + wlv->filler_lines || !has_cpo_n)
&& !(has_cpo_n && wp->w_skipcol > 0 && wlv->lnum == wp->w_topline)) { // there is no line number in a wrapped line when "n" is in
// If 'signcolumn' is set to 'number' and a sign is present // 'cpoptions', but 'breakindent' assumes it anyway.
// in "lnum", then display the sign instead of the line && !((has_cpo_n && !wp->w_p_bri) && wp->w_skipcol > 0 && wlv->lnum == wp->w_topline)) {
// number. // 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) { 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); get_sign_display_info(true, wp, wlv, sign_idx, sign_cul_attr);
} else { } else {