fix(statusline): make nvim_eval_statusline() work with %S (#21553)

This commit is contained in:
zeertzjq
2022-12-27 18:04:42 +08:00
committed by GitHub
parent cd6ec1db06
commit 146c428a53
2 changed files with 14 additions and 1 deletions

View File

@@ -1505,7 +1505,7 @@ int build_stl_str_hl(win_T *wp, char *out, size_t outlen, char *fmt, char *opt_n
break;
case STL_SHOWCMD:
if (p_sc && strcmp(opt_name, p_sloc) == 0) {
if (p_sc && (opt_name == NULL || strcmp(opt_name, p_sloc) == 0)) {
str = showcmd_buf;
}
break;