diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-03 10:22:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-03 10:22:11 +0800 |
commit | 9ab9cde2ca7b917a894068698ef2fec3a851fdd5 (patch) | |
tree | 8ed12c4c073cfb8ff25e062cbbbdc63a9feecd84 /src/nvim/mapping.c | |
parent | 1f40b4e22232f22551a9ae89a9f8d59b5ba0c0b6 (diff) | |
download | rneovim-9ab9cde2ca7b917a894068698ef2fec3a851fdd5.tar.gz rneovim-9ab9cde2ca7b917a894068698ef2fec3a851fdd5.tar.bz2 rneovim-9ab9cde2ca7b917a894068698ef2fec3a851fdd5.zip |
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)
https://github.com/vim/vim/commit/e8575988969579f9e1439181ae338b2ff74054a8
Skip list_alloc_with_items().
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/mapping.c')
-rw-r--r-- | src/nvim/mapping.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index d36fbb32d7..cb7b8aab33 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -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; |