summaryrefslogtreecommitdiff
path: root/src/optionstr.c
diff options
context:
space:
mode:
authorshadmansaleh <shadmansaleh3@gmail.com>2021-05-15 17:23:28 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-15 17:23:28 +0200
commit30e3de21fc36153c5f7c9cf9db90bcc60dd67fb9 (patch)
tree009edc4fee70a74a78f74d680a58e0dd1b9ca5b3 /src/optionstr.c
parentd832c3c56ec7043322ad3e99897e312700fa1d3e (diff)
downloadvim-git-30e3de21fc36153c5f7c9cf9db90bcc60dd67fb9.tar.gz
patch 8.2.2854: custom statusline cannot contain % itemsv8.2.2854
Problem: Custom statusline cannot contain % items. Solution: Add "%{% expr %}". (closes #8190)
Diffstat (limited to 'src/optionstr.c')
-rw-r--r--src/optionstr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/optionstr.c b/src/optionstr.c
index 1ec8d05d6..f332294ed 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -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");