refactor: Replace vim_strrchr() with strrchar() (#8718)

ref #1474
This commit is contained in:
ZviRackover
2018-08-11 17:14:10 +03:00
committed by Justin M. Keyes
parent 6aefae8c4e
commit 22311457ab
7 changed files with 28 additions and 36 deletions

View File

@@ -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"