diff options
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index dfb0386d0a..085f12473e 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -6418,8 +6418,10 @@ stuff_inserted ( /* may want to stuff the command character, to start Insert mode */ if (c != NUL) stuffcharReadbuff(c); - if ((esc_ptr = (char_u *)vim_strrchr(ptr, ESC)) != NULL) - *esc_ptr = NUL; /* remove the ESC */ + if ((esc_ptr = STRRCHR(ptr, ESC)) != NULL) { + // remove the ESC. + *esc_ptr = NUL; + } /* when the last char is either "0" or "^" it will be quoted if no ESC * comes after it OR if it will inserted more than once and "ptr" |