diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-10-15 18:17:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 18:17:07 +0200 |
commit | d4841e24dac9a16b8b90b212df20872badc4468e (patch) | |
tree | 921d79e13daf44adbfbc5585f7dc405b6429ed19 /src/nvim/syntax.c | |
parent | 0434f732a696248c24e111b558406f9534db6ca3 (diff) | |
parent | 04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c (diff) | |
download | rneovim-d4841e24dac9a16b8b90b212df20872badc4468e.tar.gz rneovim-d4841e24dac9a16b8b90b212df20872badc4468e.tar.bz2 rneovim-d4841e24dac9a16b8b90b212df20872badc4468e.zip |
Merge pull request #20140 from dundargoc/refactor/char_u/12
refactor: replace char_u with char 12: remove `STRLEN` part 2
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index ea78397d8c..527cca05f5 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -504,7 +504,7 @@ static void syn_sync(win_T *wp, linenr_T start_lnum, synstate_T *last_valid) bool had_sync_point; stateitem_T *cur_si; synpat_T *spp; - char_u *line; + char *line; int found_flags = 0; int found_match_idx = 0; linenr_T found_current_lnum = 0; @@ -554,8 +554,8 @@ 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 = (char_u *)ml_get(start_lnum - 1); - if (*line == NUL || *(line + STRLEN(line) - 1) != '\\') { + line = ml_get(start_lnum - 1); + if (*line == NUL || *(line + strlen(line) - 1) != '\\') { break; } } @@ -2366,7 +2366,7 @@ static void find_endpos(int idx, lpos_T *startpos, lpos_T *m_endpos, lpos_T *hl_ regmmatch_T regmatch; regmmatch_T best_regmatch; // startpos/endpos of best match lpos_T pos; - char_u *line; + char *line; bool had_match = false; char_u buf_chartab[32]; // chartab array for syn option iskeyword @@ -2471,8 +2471,8 @@ static void find_endpos(int idx, lpos_T *startpos, lpos_T *m_endpos, lpos_T *hl_ break; } - line = (char_u *)ml_get_buf(syn_buf, startpos->lnum, false); - int line_len = (int)STRLEN(line); + line = ml_get_buf(syn_buf, startpos->lnum, false); + int line_len = (int)strlen(line); // take care of an empty match or negative offset if (pos.col <= matchcol) { |