diff --git a/src/charset.c b/src/charset.c index 829ad37201..74c5913eed 100644 --- a/src/charset.c +++ b/src/charset.c @@ -773,7 +773,7 @@ chartabsize(char_u *p, colnr_T col) RET_WIN_BUF_CHARTABSIZE(curwin, curbuf, p, col) } -#if defined(FEAT_LINEBREAK) +#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP) int win_chartabsize(win_T *wp, char_u *p, colnr_T col) { @@ -1226,11 +1226,11 @@ win_lbr_chartabsize( win_T *wp = cts->cts_win; #if defined(FEAT_PROP_POPUP) || defined(FEAT_LINEBREAK) char_u *line = cts->cts_line; // start of the line + int size; #endif char_u *s = cts->cts_ptr; colnr_T vcol = cts->cts_vcol; #ifdef FEAT_LINEBREAK - int size; int mb_added = 0; int n; char_u *sbr; @@ -1269,20 +1269,23 @@ win_lbr_chartabsize( * First get the normal size, without 'linebreak' or text properties */ size = win_chartabsize(wp, s, vcol); +# ifdef FEAT_LINEBREAK if (*s == NUL) { // 1 cell for EOL list char (if present), as opposed to the two cell ^@ // for a NUL character in the text. size = has_lcs_eol ? 1 : 0; } -# ifdef FEAT_LINEBREAK + int is_doublewidth = has_mbyte && size == 2 && MB_BYTE2LEN(*s) > 1; # endif # ifdef FEAT_PROP_POPUP if (cts->cts_has_prop_with_text) { +# ifdef FEAT_LINEBREAK int tab_size = size; +# endif int charlen = *s == NUL ? 1 : mb_ptr2len(s); int i; int col = (int)(s - line); @@ -1338,6 +1341,7 @@ win_lbr_chartabsize( else size += cells; cts->cts_start_incl = tp->tp_flags & TP_FLAG_START_INCL; +# ifdef FEAT_LINEBREAK if (*s == TAB) { // tab size changes because of the inserted text @@ -1345,6 +1349,7 @@ win_lbr_chartabsize( tab_size = win_chartabsize(wp, s, vcol + size); size += tab_size; } +# endif if (tp->tp_col == MAXCOL && (tp->tp_flags & (TP_FLAG_ALIGN_ABOVE | TP_FLAG_ALIGN_BELOW))) // count extra line for property above/below @@ -1520,8 +1525,8 @@ win_lbr_chartabsize( # ifdef FEAT_PROP_POPUP size += cts->cts_first_char; # endif - return size; # endif + return size; #endif } diff --git a/src/drawline.c b/src/drawline.c index 5ad45c6c3c..59d725d2ad 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -1755,7 +1755,7 @@ win_line( } #endif -#if defined(FEAT_LINEBREAK) || defined(FEAT_PROP_POPUP) +#if defined(FEAT_LINEBREAK) && defined(FEAT_PROP_POPUP) colnr_T vcol_first_char = 0; if (wp->w_p_lbr && number_only == 0) { @@ -2775,7 +2775,9 @@ win_line( } wlv.extra_for_textprop = FALSE; +# ifdef FEAT_LINEBREAK in_linebreak = FALSE; +# endif } #endif } diff --git a/src/optionstr.c b/src/optionstr.c index 84f9734428..153d2baa3f 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -4035,6 +4035,7 @@ did_set_signcolumn(optset_T *args) { char_u **varp = (char_u **)args->os_varp; +#if defined(FEAT_LINEBREAK) if (check_opt_strings(*varp, p_scl_values, FALSE) != OK) return e_invalid_argument; // When changing the 'signcolumn' to or from 'number', recompute the @@ -4043,6 +4044,7 @@ did_set_signcolumn(optset_T *args) || (*curwin->w_p_scl == 'n' && *(curwin->w_p_scl + 1) =='u')) && (curwin->w_p_nu || curwin->w_p_rnu)) curwin->w_nrwidth_line_count = 0; +#endif return NULL; } diff --git a/src/sign.c b/src/sign.c index 550bb25af5..c90856812a 100644 --- a/src/sign.c +++ b/src/sign.c @@ -1159,6 +1159,7 @@ sign_list_by_name(char_u *name) static void may_force_numberwidth_recompute(buf_T *buf, int unplace) { +# if defined(FEAT_LINEBREAK) tabpage_T *tp = NULL; win_T *wp = NULL; @@ -1169,6 +1170,7 @@ may_force_numberwidth_recompute(buf_T *buf, int unplace) (*wp->w_p_scl == 'n' && *(wp->w_p_scl + 1) == 'u')) wp->w_nrwidth_line_count = 0; } +# endif } /* diff --git a/src/version.c b/src/version.c index ce0ef75de1..f904ac16d8 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2052, /**/ 2051, /**/