diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-08-26 23:11:25 +0200 |
---|---|---|
committer | dundargoc <gocdundar@gmail.com> | 2022-10-15 13:18:46 +0200 |
commit | 04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c (patch) | |
tree | 10e5be3cf91cee35ad2150e78b2d6aaa4ce5aa13 /src/nvim/mark.c | |
parent | 433818351bc82550a1cb658f5d2ff060b9014d3c (diff) | |
download | rneovim-04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c.tar.gz rneovim-04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c.tar.bz2 rneovim-04cdea5f4ac49fa62cc4091a5c26791b80b4cc4c.zip |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/mark.c')
-rw-r--r-- | src/nvim/mark.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/mark.c b/src/nvim/mark.c index f41793c8a6..8172aec543 100644 --- a/src/nvim/mark.c +++ b/src/nvim/mark.c @@ -1698,18 +1698,18 @@ void mark_mb_adjustpos(buf_T *buf, pos_T *lp) FUNC_ATTR_NONNULL_ALL { if (lp->col > 0 || lp->coladd > 1) { - const char_u *const p = (char_u *)ml_get_buf(buf, lp->lnum, false); - if (*p == NUL || (int)STRLEN(p) < lp->col) { + const char *const p = ml_get_buf(buf, lp->lnum, false); + if (*p == NUL || (int)strlen(p) < lp->col) { lp->col = 0; } else { - lp->col -= utf_head_off((char *)p, (char *)p + lp->col); + lp->col -= utf_head_off(p, p + lp->col); } // Reset "coladd" when the cursor would be on the right half of a // double-wide character. if (lp->coladd == 1 && p[lp->col] != TAB - && vim_isprintc(utf_ptr2char((char *)p + lp->col)) - && ptr2cells((char *)p + lp->col) > 1) { + && vim_isprintc(utf_ptr2char(p + lp->col)) + && ptr2cells(p + lp->col) > 1) { lp->coladd = 0; } } |