summaryrefslogtreecommitdiffstats
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-02-17 17:26:10 +0100
committerBram Moolenaar <Bram@vim.org>2015-02-17 17:26:10 +0100
commit8fc6bc71266e342d339c851b3ee472357f917597 (patch)
tree46e4320feaeea87b455b948953f4dba627f3fdd2 /src/screen.c
parent46538ee46cb04ed47c546d92583d6eb023e51b32 (diff)
updated for version 7.4.639v7.4.639
Problem: Combination of linebreak and conceal doesn't work well. Solution: Fix the display problems. (Christian Brabandt)
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/screen.c b/src/screen.c
index f735552b04..6816503871 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4571,7 +4571,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
int saved_nextra = n_extra;
#ifdef FEAT_CONCEAL
- if ((is_concealing || boguscols > 0) && vcol_off > 0)
+ if (vcol_off > 0)
/* there are characters to conceal */
tab_len += vcol_off;
/* boguscols before FIX_FOR_BOGUSCOLS macro from above
@@ -4609,25 +4609,30 @@ win_line(wp, lnum, startrow, endrow, nochange)
#ifdef FEAT_CONCEAL
/* n_extra will be increased by FIX_FOX_BOGUSCOLS
* macro below, so need to adjust for that here */
- if ((is_concealing || boguscols > 0) && vcol_off > 0)
+ if (vcol_off > 0)
n_extra -= vcol_off;
#endif
}
#endif
#ifdef FEAT_CONCEAL
- /* Tab alignment should be identical regardless of
- * 'conceallevel' value. So tab compensates of all
- * previous concealed characters, and thus resets vcol_off
- * and boguscols accumulated so far in the line. Note that
- * the tab can be longer than 'tabstop' when there
- * are concealed characters. */
- FIX_FOR_BOGUSCOLS;
- /* Make sure, the highlighting for the tab char will be
- * correctly set further below (effectively reverts the
- * FIX_FOR_BOGSUCOLS macro */
- if (old_boguscols > 0 && n_extra > tab_len && wp->w_p_list
+ {
+ int vc_saved = vcol_off;
+
+ /* Tab alignment should be identical regardless of
+ * 'conceallevel' value. So tab compensates of all
+ * previous concealed characters, and thus resets
+ * vcol_off and boguscols accumulated so far in the
+ * line. Note that the tab can be longer than
+ * 'tabstop' when there are concealed characters. */
+ FIX_FOR_BOGUSCOLS;
+
+ /* Make sure, the highlighting for the tab char will be
+ * correctly set further below (effectively reverts the
+ * FIX_FOR_BOGSUCOLS macro */
+ if (n_extra == tab_len + vc_saved && wp->w_p_list
&& lcs_tab1)
- tab_len += n_extra - tab_len;
+ tab_len += vc_saved;
+ }
#endif
#ifdef FEAT_MBYTE
mb_utf8 = FALSE; /* don't draw as UTF-8 */