aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.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/message.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/message.c')
-rw-r--r--src/nvim/message.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index ab667c88ac..e29bacbd17 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -420,7 +420,7 @@ void trunc_string(char *s, char *buf, int room_in, int buflen)
half = room / 2;
// First part: Start of the string.
- for (e = 0; len < half && e < buflen; ++e) {
+ for (e = 0; len < half && e < buflen; e++) {
if (s[e] == NUL) {
// text fits without truncating!
buf[e] = NUL;
@@ -1641,7 +1641,7 @@ void msg_make(char_u *arg)
}
if (i < 0) {
msg_putchar('\n');
- for (i = 0; rs[i]; ++i) {
+ for (i = 0; rs[i]; i++) {
msg_putchar(rs[i] - 3);
}
}
@@ -2817,7 +2817,7 @@ static int do_more_prompt(int typed_char)
// "g<": Find first line on the last page.
mp_last = msg_sb_start(last_msgchunk);
for (i = 0; i < Rows - 2 && mp_last != NULL
- && mp_last->sb_prev != NULL; ++i) {
+ && mp_last->sb_prev != NULL; i++) {
mp_last = msg_sb_start(mp_last->sb_prev);
}
}
@@ -2936,8 +2936,7 @@ static int do_more_prompt(int typed_char)
}
// go to start of line at top of the screen
- for (i = 0; i < Rows - 2 && mp != NULL && mp->sb_prev != NULL;
- ++i) {
+ for (i = 0; i < Rows - 2 && mp != NULL && mp->sb_prev != NULL; i++) {
mp = msg_sb_start(mp->sb_prev);
}