mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
refactor: use "csarg" for CharsizeArg variables (#27123)
This commit is contained in:
@@ -1755,12 +1755,12 @@ colnr_T vcol2col(win_T *wp, linenr_T lnum, colnr_T vcol, colnr_T *coladdp)
|
||||
{
|
||||
// try to advance to the specified column
|
||||
char *line = ml_get_buf(wp->w_buffer, lnum);
|
||||
CharsizeArg arg;
|
||||
CSType cstype = init_charsize_arg(&arg, wp, lnum, line);
|
||||
CharsizeArg csarg;
|
||||
CSType cstype = init_charsize_arg(&csarg, wp, lnum, line);
|
||||
StrCharInfo ci = utf_ptr2StrCharInfo(line);
|
||||
int cur_vcol = 0;
|
||||
while (cur_vcol < vcol && *ci.ptr != NUL) {
|
||||
int next_vcol = cur_vcol + win_charsize(cstype, cur_vcol, ci.ptr, ci.chr.value, &arg).width;
|
||||
int next_vcol = cur_vcol + win_charsize(cstype, cur_vcol, ci.ptr, ci.chr.value, &csarg).width;
|
||||
if (next_vcol > vcol) {
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user