diff options
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index b47517b1a2..918443db9f 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -2191,7 +2191,11 @@ static const char *did_set_statustabline_rulerformat(optset_T *args, bool rulerf if (wid && *s == '(' && (errmsg = check_stl_option(p_ruf)) == NULL) { ru_wid = wid; } else { - errmsg = check_stl_option(p_ruf); + // Validate the flags in 'rulerformat' only if it doesn't point to + // a custom function ("%!" flag). + if ((*varp)[1] != '!') { + errmsg = check_stl_option(p_ruf); + } } } else if (rulerformat || s[0] != '%' || s[1] != '!') { // check 'statusline', 'winbar', 'tabline' or 'statuscolumn' |