Skip to content

Commit bcaafa4

Browse files
committed
updated for version 7.3.747
Problem: When characters are concealed text aligned with tabs are no longer aligned, e.g. at ":help :index". Solution: Compensate space for tabs for concealed characters. (Dominique Pelle)
1 parent 47db3af commit bcaafa4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/screen.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4269,7 +4269,20 @@ win_line(wp, lnum, startrow, endrow, nochange)
42694269
{
42704270
/* tab amount depends on current column */
42714271
n_extra = (int)wp->w_buffer->b_p_ts
4272-
- VCOL_HLC % (int)wp->w_buffer->b_p_ts - 1;
4272+
- vcol % (int)wp->w_buffer->b_p_ts - 1;
4273+
#ifdef FEAT_CONCEAL
4274+
/* Tab alignment should be identical regardless of
4275+
* 'conceallevel' value. So tab compensates of all
4276+
* previous concealed characters, and thus resets vcol_off
4277+
* and boguscols accumulated so far in the line. Note that
4278+
* the tab can be longer than 'tabstop' when there
4279+
* are concealed characters. */
4280+
n_extra += vcol_off;
4281+
vcol -= vcol_off;
4282+
vcol_off = 0;
4283+
col -= boguscols;
4284+
boguscols = 0;
4285+
#endif
42734286
#ifdef FEAT_MBYTE
42744287
mb_utf8 = FALSE; /* don't draw as UTF-8 */
42754288
#endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,8 @@ static char *(features[]) =
725725

726726
static int included_patches[] =
727727
{ /* Add new patch number below this line */
728+
/**/
729+
747,
728730
/**/
729731
746,
730732
/**/

0 commit comments

Comments
 (0)