File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4028,9 +4028,14 @@ build_stl_str_hl(
40284028 /* remove group if all items are empty and highlight group
40294029 * doesn't change */
40304030 group_start_userhl = group_end_userhl = 0 ;
4031- for (n = 0 ; n < groupitem [groupdepth ]; n ++ )
4031+ for (n = groupitem [groupdepth ] - 1 ; n >= 0 ; n -- )
4032+ {
40324033 if (item [n ].type == Highlight )
4033- group_start_userhl = item [n ].minwid ;
4034+ {
4035+ group_start_userhl = group_end_userhl = item [n ].minwid ;
4036+ break ;
4037+ }
4038+ }
40344039 for (n = groupitem [groupdepth ] + 1 ; n < curitem ; n ++ )
40354040 {
40364041 if (item [n ].type == Normal )
Original file line number Diff line number Diff line change @@ -312,6 +312,12 @@ func Test_statusline()
312312 call assert_equal (sa1, sa3)
313313 call assert_equal (sa1, sa4)
314314
315+ let g: a = ' '
316+ set statusline = % #Error #{% (\ % {g: a }\ % )}
317+ call assert_match (' ^{}\s*$' , s: get_statusline ())
318+ let g: a = ' X'
319+ call assert_match (' ^{ X }\s*$' , s: get_statusline ())
320+
315321 " %%: a percent sign.
316322 set statusline = 10 %%
317323 call assert_match (' ^10%\s*$' , s: get_statusline ())
Original file line number Diff line number Diff line change @@ -761,6 +761,8 @@ static char *(features[]) =
761761
762762static int included_patches [] =
763763{ /* Add new patch number below this line */
764+ /**/
765+ 1220 ,
764766/**/
765767 1219 ,
766768/**/
You can’t perform that action at this time.
0 commit comments