diff options
author | Shadman <shadmansaleh3@gmail.com> | 2021-05-15 23:10:41 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 13:10:41 -0400 |
commit | d67dcaba02d76fe92ba818dde7b672fe6956a100 (patch) | |
tree | e03e0cc41d3744fdc57c20393508bf18a472b0b6 /src/nvim/option.c | |
parent | 0cd14303162df99bbd796002a44588aface2bad8 (diff) | |
download | rneovim-d67dcaba02d76fe92ba818dde7b672fe6956a100.tar.gz rneovim-d67dcaba02d76fe92ba818dde7b672fe6956a100.tar.bz2 rneovim-d67dcaba02d76fe92ba818dde7b672fe6956a100.zip |
vim-patch:8.2.2854: custom statusline cannot contain % items (#14558)
Problem: Custom statusline cannot contain % items.
Solution: Add "%{% expr %}". (closes vim/vim#8190)
https://github.com/vim/vim/commit/30e3de21fc36153c5f7c9cf9db90bcc60dd67fb9
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 6f28f37d2b..ad481af7fa 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3641,9 +3641,11 @@ char_u *check_stl_option(char_u *s) return illegal_char(errbuf, sizeof(errbuf), *s); } if (*s == '{') { + int reevaluate = (*s == '%'); s++; - while (*s != '}' && *s) + while ((*s != '}' || (reevaluate && s[-1] != '%')) && *s) { s++; + } if (*s != '}') { return (char_u *)N_("E540: Unclosed expression sequence"); } |