aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-01-22 10:39:37 +0800
committerGitHub <noreply@github.com>2024-01-22 10:39:37 +0800
commite68decab0352d553bd2463842d96379f56073a1c (patch)
treee65bdbf1cbb6752ac097ce2339b691570ad7bc1d /src/nvim/indent.c
parent8c6de9147cabbf99d18afbdbed2f11f30c1d0dfc (diff)
downloadrneovim-e68decab0352d553bd2463842d96379f56073a1c.tar.gz
rneovim-e68decab0352d553bd2463842d96379f56073a1c.tar.bz2
rneovim-e68decab0352d553bd2463842d96379f56073a1c.zip
refactor: use "csarg" for CharsizeArg variables (#27123)
Diffstat (limited to 'src/nvim/indent.c')
-rw-r--r--src/nvim/indent.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c
index 4899a025e5..8d97f2ca03 100644
--- a/src/nvim/indent.c
+++ b/src/nvim/indent.c
@@ -1248,13 +1248,13 @@ int get_lisp_indent(void)
char *line = get_cursor_line_ptr();
- 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 sci = utf_ptr2StrCharInfo(line);
amount = 0;
while (*sci.ptr != NUL && col > 0) {
- amount += win_charsize(cstype, amount, sci.ptr, sci.chr.value, &arg).width;
+ amount += win_charsize(cstype, amount, sci.ptr, sci.chr.value, &csarg).width;
sci = utfc_next(sci);
col--;
}
@@ -1274,7 +1274,7 @@ int get_lisp_indent(void)
colnr_T firsttry = amount;
while (ascii_iswhite(*that)) {
- amount += win_charsize(cstype, amount, that, (uint8_t)(*that), &arg).width;
+ amount += win_charsize(cstype, amount, that, (uint8_t)(*that), &csarg).width;
that++;
}
@@ -1303,13 +1303,13 @@ int get_lisp_indent(void)
parencount--;
}
if ((ci.value == '\\') && (*(that + 1) != NUL)) {
- amount += win_charsize(cstype, amount, that, ci.value, &arg).width;
+ amount += win_charsize(cstype, amount, that, ci.value, &csarg).width;
StrCharInfo next_sci = utfc_next((StrCharInfo){ that, ci });
that = next_sci.ptr;
ci = next_sci.chr;
}
- amount += win_charsize(cstype, amount, that, ci.value, &arg).width;
+ amount += win_charsize(cstype, amount, that, ci.value, &csarg).width;
StrCharInfo next_sci = utfc_next((StrCharInfo){ that, ci });
that = next_sci.ptr;
ci = next_sci.chr;
@@ -1317,7 +1317,7 @@ int get_lisp_indent(void)
}
while (ascii_iswhite(*that)) {
- amount += win_charsize(cstype, amount, that, (uint8_t)(*that), &arg).width;
+ amount += win_charsize(cstype, amount, that, (uint8_t)(*that), &csarg).width;
that++;
}