diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-01-22 10:39:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 10:39:37 +0800 |
commit | e68decab0352d553bd2463842d96379f56073a1c (patch) | |
tree | e65bdbf1cbb6752ac097ce2339b691570ad7bc1d /src/nvim/drawline.c | |
parent | 8c6de9147cabbf99d18afbdbed2f11f30c1d0dfc (diff) | |
download | rneovim-e68decab0352d553bd2463842d96379f56073a1c.tar.gz rneovim-e68decab0352d553bd2463842d96379f56073a1c.tar.bz2 rneovim-e68decab0352d553bd2463842d96379f56073a1c.zip |
refactor: use "csarg" for CharsizeArg variables (#27123)
Diffstat (limited to 'src/nvim/drawline.c')
-rw-r--r-- | src/nvim/drawline.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/drawline.c b/src/nvim/drawline.c index 616fd24460..7afa2493b9 100644 --- a/src/nvim/drawline.c +++ b/src/nvim/drawline.c @@ -1338,13 +1338,13 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s char *prev_ptr = ptr; CharSize cs = { 0 }; - CharsizeArg arg; - CSType cstype = init_charsize_arg(&arg, wp, lnum, line); - arg.max_head_vcol = start_col; + CharsizeArg csarg; + CSType cstype = init_charsize_arg(&csarg, wp, lnum, line); + csarg.max_head_vcol = start_col; int vcol = wlv.vcol; StrCharInfo ci = utf_ptr2StrCharInfo(ptr); while (vcol < start_col && *ci.ptr != NUL) { - cs = win_charsize(cstype, vcol, ci.ptr, ci.chr.value, &arg); + cs = win_charsize(cstype, vcol, ci.ptr, ci.chr.value, &csarg); vcol += cs.width; prev_ptr = ci.ptr; ci = utfc_next(ci); @@ -2083,11 +2083,11 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s int mb_off = utf_head_off(line, ptr - 1); char *p = ptr - (mb_off + 1); - CharsizeArg arg; + CharsizeArg csarg; // lnum == 0, do not want virtual text to be counted here - CSType cstype = init_charsize_arg(&arg, wp, 0, line); + CSType cstype = init_charsize_arg(&csarg, wp, 0, line); wlv.n_extra = win_charsize(cstype, wlv.vcol, p, utf_ptr2CharInfo(p).value, - &arg).width - 1; + &csarg).width - 1; if (on_last_col && mb_c != TAB) { // Do not continue search/match highlighting over the |