diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-03 23:33:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-03 23:33:08 +0200 |
commit | 008b604bacbbeeaf0e04f94b1d331b11ebec631a (patch) | |
tree | 45a004c00c61f0bbe84cbf291093b6dffcf0bfb1 /src/nvim/getchar.c | |
parent | e333957a1a9ae64b7daa36e08fd1df583114d4ba (diff) | |
parent | 35898cff5d1d6dc60e0d7b87bfe106539453b031 (diff) | |
download | rneovim-008b604bacbbeeaf0e04f94b1d331b11ebec631a.tar.gz rneovim-008b604bacbbeeaf0e04f94b1d331b11ebec631a.tar.bz2 rneovim-008b604bacbbeeaf0e04f94b1d331b11ebec631a.zip |
Merge #6947 from ZyX-I/consistent-get_keymap
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 4e42042959..fc1b8ccfcb 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1806,7 +1806,7 @@ static int vgetorpeek(int advance) * <M-a> and then changing 'encoding'. Beware * that 0x80 is escaped. */ char_u *p1 = mp->m_keys; - char_u *p2 = mb_unescape(&p1); + char_u *p2 = (char_u *)mb_unescape((const char **)&p1); if (has_mbyte && p2 != NULL && MB_BYTE2LEN(c1) > MB_PTR2LEN(p2)) mlen = 0; @@ -3999,12 +3999,10 @@ int put_escstr(FILE *fd, char_u *strstart, int what) return OK; } - for (; *str != NUL; ++str) { - char_u *p; - - /* Check for a multi-byte character, which may contain escaped - * K_SPECIAL and CSI bytes */ - p = mb_unescape(&str); + for (; *str != NUL; str++) { + // Check for a multi-byte character, which may contain escaped + // K_SPECIAL and CSI bytes. + const char *p = mb_unescape((const char **)&str); if (p != NULL) { while (*p != NUL) if (fputc(*p++, fd) < 0) |