aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerdundargoc <gocdundar@gmail.com>2022-08-31 13:47:18 +0200
commitfb1edb2f5728d74ae811c6ab32395598cea5609b (patch)
treeb476bb9c23a02167dd74f0da65343993f134c2b8 /src/nvim/syntax.c
parent0903702634d8e5714749ea599a2f1042b3377525 (diff)
downloadrneovim-fb1edb2f5728d74ae811c6ab32395598cea5609b.tar.gz
rneovim-fb1edb2f5728d74ae811c6ab32395598cea5609b.tar.bz2
rneovim-fb1edb2f5728d74ae811c6ab32395598cea5609b.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r--src/nvim/syntax.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c
index f055cc9b0e..1319894226 100644
--- a/src/nvim/syntax.c
+++ b/src/nvim/syntax.c
@@ -610,7 +610,7 @@ static void syn_sync(win_T *wp, linenr_T start_lnum, synstate_T *last_valid)
* Skip lines that end in a backslash.
*/
for (; start_lnum > 1; start_lnum--) {
- line = ml_get(start_lnum - 1);
+ line = (char_u *)ml_get(start_lnum - 1);
if (*line == NUL || *(line + STRLEN(line) - 1) != '\\') {
break;
}
@@ -1711,7 +1711,7 @@ static int syn_current_attr(const bool syncing, const bool displaying, bool *con
const char_u *cur_pos = line + current_col;
if (vim_iswordp_buf(cur_pos, syn_buf)
&& (current_col == 0
- || !vim_iswordp_buf(cur_pos - 1 - utf_head_off(line, cur_pos - 1),
+ || !vim_iswordp_buf(cur_pos - 1 - utf_head_off((char *)line, (char *)cur_pos - 1),
syn_buf))) {
syn_id = check_keyword_id(line, (int)current_col, &endcol, &flags,
&next_list, cur_si, &cchar);