diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-11-14 17:43:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-14 17:43:21 +0100 |
commit | 2f37ffb71920d0b50f658108736a1465e1e5f280 (patch) | |
tree | 1971f1f0f146e16cc8d0f52c97e6b9a0c21f27c6 /src/nvim/edit.c | |
parent | ede00b29d175625479060c5c52e256ec6fc445c1 (diff) | |
parent | 1450a6f7534147e3d7252594cf06e2a1cc14b79b (diff) | |
download | rneovim-2f37ffb71920d0b50f658108736a1465e1e5f280.tar.gz rneovim-2f37ffb71920d0b50f658108736a1465e1e5f280.tar.bz2 rneovim-2f37ffb71920d0b50f658108736a1465e1e5f280.zip |
Merge pull request #16316 from bfredl/macroman
refactor(macros): delete multibyte macros which just are aliases
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index c3d6b8721c..593ba4e843 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -708,7 +708,7 @@ static int insert_execute(VimState *state, int key) if (str != NULL) { for (p = str; *p != NUL; MB_PTR_ADV(p)) { - ins_compl_addleader(PTR2CHAR(p)); + ins_compl_addleader(utf_ptr2char(p)); } xfree(str); } else { @@ -1283,7 +1283,7 @@ normalchar: if (*str != NUL && stop_arrow() != FAIL) { // Insert the new value of v:char literally. for (p = str; *p != NUL; MB_PTR_ADV(p)) { - s->c = PTR2CHAR(p); + s->c = utf_ptr2char(p); if (s->c == CAR || s->c == K_KENTER || s->c == NL) { ins_eol(s->c); } else { @@ -3547,7 +3547,7 @@ static void ins_compl_addfrommatch(void) } } p += len; - c = PTR2CHAR(p); + c = utf_ptr2char(p); ins_compl_addleader(c); } @@ -5177,10 +5177,10 @@ static int ins_complete(int c, bool enable_pum) char_u *p = line + startcol; MB_PTR_BACK(line, p); - while (p > line && vim_isfilec(PTR2CHAR(p))) { + while (p > line && vim_isfilec(utf_ptr2char(p))) { MB_PTR_BACK(line, p); } - if (p == line && vim_isfilec(PTR2CHAR(p))) { + if (p == line && vim_isfilec(utf_ptr2char(p))) { startcol = 0; } else { startcol = (int)(p - line) + 1; |