vim-patch:partial:9.0.1196: code is indented more than necessary (#27315)

Problem:    Code is indented more than necessary.
Solution:   Use an early return where it makes sense. (Yegappan Lakshmanan,
            closes vim/vim#11813)

e857598896

Skip list_alloc_with_items().

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
This commit is contained in:
zeertzjq
2024-02-03 10:22:11 +08:00
committed by GitHub
parent 1f40b4e222
commit 9ab9cde2ca
5 changed files with 74 additions and 60 deletions

View File

@@ -311,7 +311,8 @@ static bool set_maparg_lhs_rhs(const char *const orig_lhs, const size_t orig_lhs
// replace_termcodes() may move the result to allocated memory, which
// needs to be freed later (*lhs_buf and *rhs_buf).
// replace_termcodes() also removes CTRL-Vs and sometimes backslashes.
// If something like <C-H> is simplified to 0x08 then mark it as simplified.
// If something like <C-H> is simplified to 0x08 then mark it as simplified
// and also add en entry with a modifier.
bool did_simplify = false;
const int flags = REPTERM_FROM_PART | REPTERM_DO_LT;
char *bufarg = lhs_buf;