refactor: use "csarg" for CharsizeArg variables (#27123)

This commit is contained in:
zeertzjq
2024-01-22 10:39:37 +08:00
committed by GitHub
parent 8c6de9147c
commit e68decab03
9 changed files with 132 additions and 130 deletions

View File

@@ -141,12 +141,12 @@ static int coladvance2(pos_T *pos, bool addspaces, bool finetune, colnr_T wcol_a
}
}
CharsizeArg arg;
CSType cstype = init_charsize_arg(&arg, curwin, pos->lnum, line);
CharsizeArg csarg;
CSType cstype = init_charsize_arg(&csarg, curwin, pos->lnum, line);
StrCharInfo ci = utf_ptr2StrCharInfo(line);
col = 0;
while (col <= wcol && *ci.ptr != NUL) {
CharSize cs = win_charsize(cstype, col, ci.ptr, ci.chr.value, &arg);
CharSize cs = win_charsize(cstype, col, ci.ptr, ci.chr.value, &csarg);
csize = cs.width;
head = cs.head;
col += cs.width;