diff options
author | ZyX <kp-pav@yandex.ru> | 2016-07-29 21:41:45 +0300 |
---|---|---|
committer | ZyX <kp-pav@yandex.ru> | 2017-02-15 02:48:33 +0300 |
commit | efa2682e3b513c4a33d987dc651db5913feff21a (patch) | |
tree | 46736cfd53da15a607a332afc79f8359f50bd455 /src/nvim/normal.c | |
parent | 2a50ff7e2fa724fc748068ba19012239886b74dd (diff) | |
download | rneovim-efa2682e3b513c4a33d987dc651db5913feff21a.tar.gz rneovim-efa2682e3b513c4a33d987dc651db5913feff21a.tar.bz2 rneovim-efa2682e3b513c4a33d987dc651db5913feff21a.zip |
*: Partial string handling refactoring
Main points:
- Replace `char_u` with `char` in some cases.
- Remove `str[len] = NUL` hack in some cases when `str` may be considered
`const`.
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 5d7a8faeba..641658532d 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -617,7 +617,7 @@ static void normal_redraw_mode_message(NormalState *s) update_screen(0); // now reset it, otherwise it's put in the history again keep_msg = kmsg; - msg_attr(kmsg, keep_msg_attr); + msg_attr((const char *)kmsg, keep_msg_attr); xfree(kmsg); } setcursor(); @@ -1276,7 +1276,7 @@ static void normal_redraw(NormalState *s) // msg_attr_keep() will set keep_msg to NULL, must free the string here. // Don't reset keep_msg, msg_attr_keep() uses it to check for duplicates. char *p = (char *)keep_msg; - msg_attr((uint8_t *)p, keep_msg_attr); + msg_attr(p, keep_msg_attr); xfree(p); } |