aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/insexpand.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-08-26 23:11:25 +0200
committerdundargoc <gocdundar@gmail.com>2022-11-19 16:27:10 +0100
commit40f3f75867bf03abfd90e0389a38197a00d37af1 (patch)
treed14642161d70ef658f5b23fea1693e0be9a84804 /src/nvim/insexpand.c
parent6e8ed5abaa9c33d1d78ab7ff5b07dd5bac623a1d (diff)
downloadrneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.tar.gz
rneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.tar.bz2
rneovim-40f3f75867bf03abfd90e0389a38197a00d37af1.zip
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/insexpand.c')
-rw-r--r--src/nvim/insexpand.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c
index ed851683fd..65380b92fc 100644
--- a/src/nvim/insexpand.c
+++ b/src/nvim/insexpand.c
@@ -1463,12 +1463,12 @@ static void ins_compl_files(int count, char **files, int thesaurus, int flags, r
// Read dictionary file line by line.
// Check each line for a match.
- while (!got_int && !compl_interrupted && !vim_fgets(buf, LSIZE, fp)) {
+ while (!got_int && !compl_interrupted && !vim_fgets((char *)buf, LSIZE, fp)) {
ptr = buf;
while (vim_regexec(regmatch, (char *)buf, (colnr_T)(ptr - buf))) {
ptr = (char_u *)regmatch->startp[0];
if (ctrl_x_mode_line_or_eval()) {
- ptr = find_line_end(ptr);
+ ptr = (char_u *)find_line_end((char *)ptr);
} else {
ptr = find_word_end(ptr);
}
@@ -1529,12 +1529,13 @@ char_u *find_word_end(char_u *ptr)
}
/// Find the end of the line, omitting CR and NL at the end.
-/// Returns a pointer to just after the line.
-static char_u *find_line_end(char_u *ptr)
+///
+/// @return a pointer to just after the line.
+static char *find_line_end(char *ptr)
{
- char_u *s;
+ char *s;
- s = ptr + STRLEN(ptr);
+ s = ptr + strlen(ptr);
while (s > ptr && (s[-1] == CAR || s[-1] == NL)) {
s--;
}