File tree 3 files changed +36
-10
lines changed
3 files changed +36
-10
lines changed Original file line number Diff line number Diff line change @@ -502,7 +502,7 @@ can_unload_buffer(buf_T *buf)
502
502
* It can be:
503
503
* 0 buffer becomes hidden
504
504
* DOBUF_UNLOAD buffer is unloaded
505
- * DOBUF_DELETE buffer is unloaded and removed from buffer list
505
+ * DOBUF_DEL buffer is unloaded and removed from buffer list
506
506
* DOBUF_WIPE buffer is unloaded and really deleted
507
507
* DOBUF_WIPE_REUSE idem, and add to buf_reuse list
508
508
* When doing all but the first one on the current buffer, the caller should
@@ -5108,14 +5108,6 @@ build_stl_str_hl(
5108
5108
STRMOVE (s + 1 , p );
5109
5109
* s = '<' ;
5110
5110
5111
- // Fill up for half a double-wide character.
5112
- while (++ width < maxwidth )
5113
- {
5114
- s = s + STRLEN (s );
5115
- MB_CHAR2BYTES (fillchar , s );
5116
- * s = NUL ;
5117
- }
5118
-
5119
5111
-- n ; // count the '<'
5120
5112
for (; l < itemcnt ; l ++ )
5121
5113
{
@@ -5124,6 +5116,14 @@ build_stl_str_hl(
5124
5116
else
5125
5117
stl_items [l ].stl_start = s ;
5126
5118
}
5119
+
5120
+ // Fill up for half a double-wide character.
5121
+ while (++ width < maxwidth )
5122
+ {
5123
+ s = s + STRLEN (s );
5124
+ MB_CHAR2BYTES (fillchar , s );
5125
+ * s = NUL ;
5126
+ }
5127
5127
}
5128
5128
width = maxwidth ;
5129
5129
}
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ func Test_tabline_empty_group()
133
133
tabnew
134
134
redraw !
135
135
136
- tabclose
136
+ bw !
137
137
set tabline =
138
138
endfunc
139
139
@@ -202,4 +202,28 @@ func Test_tabline_showcmd()
202
202
call StopVimInTerminal (buf )
203
203
endfunc
204
204
205
+ func TruncTabLine ()
206
+ return ' %1T口口%2Ta' .. repeat (' b' , &columns - 4 ) .. ' %999X%#TabLine#c'
207
+ endfunc
208
+
209
+ " Test 'tabline' with truncated double-width label at the start.
210
+ func Test_tabline_truncated_double_width ()
211
+ tabnew
212
+ redraw
213
+ call assert_match (' X$' , Screenline (1 ))
214
+ let attr_TabLineFill = screenattr (1 , &columns - 1 )
215
+ let attr_TabLine = screenattr (1 , &columns )
216
+ call assert_notequal (attr_TabLine, attr_TabLineFill)
217
+
218
+ set tabline = % ! TruncTabLine ()
219
+ redraw
220
+ call assert_equal (' <a' .. repeat (' b' , &columns - 4 ) .. ' c' , Screenline (1 ))
221
+ call assert_equal (attr_TabLineFill, screenattr (1 , &columns - 2 ))
222
+ call assert_equal (attr_TabLine, screenattr (1 , &columns - 1 ))
223
+ call assert_equal (attr_TabLine, screenattr (1 , &columns ))
224
+
225
+ bw !
226
+ set tabline =
227
+ endfunc
228
+
205
229
" vim: shiftwidth = 2 sts = 2 expandtab
Original file line number Diff line number Diff line change @@ -695,6 +695,8 @@ static char *(features[]) =
695
695
696
696
static int included_patches [] =
697
697
{ /* Add new patch number below this line */
698
+ /**/
699
+ 1672 ,
698
700
/**/
699
701
1671 ,
700
702
/**/
You can’t perform that action at this time.
0 commit comments