aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/strings.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-08-25 14:30:12 +0100
committerGitHub <noreply@github.com>2022-08-25 14:30:12 +0100
commit99f8d34c8a7128a9adb43168ca5364ccbd568333 (patch)
tree0a28a1505debe6e4d1025f9c518a7b0fe1ab769c /src/nvim/strings.c
parentcd2d3aa48f3531103a3a355d76394301e7b074df (diff)
parent93f24403f8cc760ff47979c596976b53a8b16358 (diff)
downloadrneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.tar.gz
rneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.tar.bz2
rneovim-99f8d34c8a7128a9adb43168ca5364ccbd568333.zip
Merge pull request #19934 from lewis6991/prepostincr
Diffstat (limited to 'src/nvim/strings.c')
-rw-r--r--src/nvim/strings.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c
index 78312c738c..ac9d414be2 100644
--- a/src/nvim/strings.c
+++ b/src/nvim/strings.c
@@ -107,7 +107,7 @@ char_u *vim_strsave_escaped_ext(const char_u *string, const char_u *esc_chars, c
if (vim_strchr((char *)esc_chars, *p) != NULL || (bsl && rem_backslash(p))) {
length++; // count a backslash
}
- ++length; // count an ordinary char
+ length++; // count an ordinary char
}
char_u *escaped_string = xmalloc(length);
@@ -222,13 +222,13 @@ char_u *vim_strsave_shellescape(const char_u *string, bool do_special, bool do_n
}
if ((*p == '\n' && (csh_like || do_newline))
|| (*p == '!' && (csh_like || do_special))) {
- ++length; // insert backslash
+ length++; // insert backslash
if (csh_like && do_special) {
- ++length; // insert backslash
+ length++; // insert backslash
}
}
if (do_special && find_cmdline_var(p, &l) >= 0) {
- ++length; // insert backslash
+ length++; // insert backslash
p += l - 1;
}
if (*p == '\\' && fish_like) {
@@ -516,7 +516,7 @@ bool has_non_ascii(const char_u *s)
const char_u *p;
if (s != NULL) {
- for (p = s; *p != NUL; ++p) {
+ for (p = s; *p != NUL; p++) {
if (*p >= 128) {
return true;
}