1
0
forked from aniani/vim

patch 8.2.2854: custom statusline cannot contain % items

Problem:    Custom statusline cannot contain % items.
Solution:   Add "%{% expr %}". (closes #8190)
This commit is contained in:
shadmansaleh
2021-05-15 17:23:28 +02:00
committed by Bram Moolenaar
parent d832c3c56e
commit 30e3de21fc
5 changed files with 106 additions and 5 deletions

View File

@@ -618,8 +618,10 @@ check_stl_option(char_u *s)
}
if (*s == '{')
{
int reevaluate = (*s == '%');
s++;
while (*s != '}' && *s)
while ((*s != '}' || (reevaluate && s[-1] != '%')) && *s)
s++;
if (*s != '}')
return N_("E540: Unclosed expression sequence");