diff options
| author | ZviRackover <zvirack@gmail.com> | 2018-08-11 17:14:10 +0300 | 
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2018-08-11 16:14:10 +0200 | 
| commit | 22311457ab60be9335f8e630c8b794340d39e466 (patch) | |
| tree | b0b1a1a32009fd80cfeb2b77ffeae9202b21bbff /src/nvim/edit.c | |
| parent | 6aefae8c4e6e273ae96f1135b74a081543b548e5 (diff) | |
| download | rneovim-22311457ab60be9335f8e630c8b794340d39e466.tar.gz rneovim-22311457ab60be9335f8e630c8b794340d39e466.tar.bz2 rneovim-22311457ab60be9335f8e630c8b794340d39e466.zip  | |
refactor: Replace vim_strrchr() with strrchar() (#8718)
ref #1474
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 0d99aa8fb2..6231ecd977 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -6398,8 +6398,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"  | 
