diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-18 14:17:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-18 21:17:11 +0800 |
commit | 8a4285d5637c146a0ae606918a8e77063c6a5f0d (patch) | |
tree | 4cf13b388ec19fcded4be0648dd75eeea506baf1 /src/nvim/mapping.c | |
parent | 2c1e7242f9bed345e520e9060e5e13fe48a023eb (diff) | |
download | rneovim-8a4285d5637c146a0ae606918a8e77063c6a5f0d.tar.gz rneovim-8a4285d5637c146a0ae606918a8e77063c6a5f0d.tar.bz2 rneovim-8a4285d5637c146a0ae606918a8e77063c6a5f0d.zip |
refactor: replace char_u with char 24 (#21823)
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/mapping.c')
-rw-r--r-- | src/nvim/mapping.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index 29c6bb6723..2a943db5d5 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -1851,9 +1851,9 @@ int makemap(FILE *fd, buf_T *buf) } if (putc(' ', fd) < 0 - || put_escstr(fd, (char_u *)mp->m_keys, 0) == FAIL + || put_escstr(fd, mp->m_keys, 0) == FAIL || putc(' ', fd) < 0 - || put_escstr(fd, (char_u *)mp->m_str, 1) == FAIL + || put_escstr(fd, mp->m_str, 1) == FAIL || put_eol(fd) < 0) { return FAIL; } @@ -1879,9 +1879,9 @@ int makemap(FILE *fd, buf_T *buf) // "what": 0 for :map lhs, 1 for :map rhs, 2 for :set // // return FAIL for failure, OK otherwise -int put_escstr(FILE *fd, char_u *strstart, int what) +int put_escstr(FILE *fd, char *strstart, int what) { - char_u *str = strstart; + char_u *str = (char_u *)strstart; int c; // :map xx <Nop> @@ -1958,7 +1958,7 @@ int put_escstr(FILE *fd, char_u *strstart, int what) } } else if (c < ' ' || c > '~' || c == '|' || (what == 0 && c == ' ') - || (what == 1 && str == strstart && c == ' ') + || (what == 1 && str == (char_u *)strstart && c == ' ') || (what != 2 && c == '<')) { if (putc(Ctrl_V, fd) < 0) { return FAIL; |