mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
refactor: change pre-decrement/increment to post (#19799)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
@@ -2156,14 +2156,14 @@ static int command_line_handle_key(CommandLineState *s)
|
||||
if (i > 0) {
|
||||
ccline.cmdbuff[len] = '\\';
|
||||
}
|
||||
++len;
|
||||
len++;
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
ccline.cmdbuff[len] = p[j];
|
||||
}
|
||||
}
|
||||
++len;
|
||||
len++;
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
@@ -3589,7 +3589,7 @@ void put_on_cmdline(char_u *str, int len, int redraw)
|
||||
msg_col -= i;
|
||||
if (msg_col < 0) {
|
||||
msg_col += Columns;
|
||||
--msg_row;
|
||||
msg_row--;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4135,9 +4135,9 @@ char_u *ExpandOne(expand_T *xp, char_u *str, char_u *orig, int options, int mode
|
||||
if (findex == -1) {
|
||||
findex = xp->xp_numfiles;
|
||||
}
|
||||
--findex;
|
||||
findex--;
|
||||
} else { // mode == WILD_NEXT
|
||||
++findex;
|
||||
findex++;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4877,7 +4877,7 @@ char_u *addstar(char_u *fname, size_t len, int context)
|
||||
&& vim_strchr((char *)retval, '`') == NULL) {
|
||||
retval[len++] = '*';
|
||||
} else if (len > 0 && retval[len - 1] == '$') {
|
||||
--len;
|
||||
len--;
|
||||
}
|
||||
retval[len] = NUL;
|
||||
}
|
||||
@@ -5518,7 +5518,7 @@ static void expand_shellcmd(char_u *filepat, int *num_file, char ***file, int fl
|
||||
}
|
||||
}
|
||||
if (*e != NUL) {
|
||||
++e;
|
||||
e++;
|
||||
}
|
||||
}
|
||||
*file = ga.ga_data;
|
||||
|
Reference in New Issue
Block a user