aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mapping.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-02-03 10:22:11 +0800
committerGitHub <noreply@github.com>2024-02-03 10:22:11 +0800
commit9ab9cde2ca7b917a894068698ef2fec3a851fdd5 (patch)
tree8ed12c4c073cfb8ff25e062cbbbdc63a9feecd84 /src/nvim/mapping.c
parent1f40b4e22232f22551a9ae89a9f8d59b5ba0c0b6 (diff)
downloadrneovim-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.c3
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;