aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-31 18:44:41 -0500
committerGitHub <noreply@github.com>2020-12-31 18:44:41 -0500
commitf3a8c930a4b901c5313701849e7010f098bf22e6 (patch)
tree125cace41e958056812accbeb5876e154a1be85d /src/nvim/message.c
parent74b343a6f23de43590ab79750848f66e2fa9a7f7 (diff)
parentb01a60b1aaaa6152b58af96c5054f697bbc3a31e (diff)
downloadrneovim-f3a8c930a4b901c5313701849e7010f098bf22e6.tar.gz
rneovim-f3a8c930a4b901c5313701849e7010f098bf22e6.tar.bz2
rneovim-f3a8c930a4b901c5313701849e7010f098bf22e6.zip
Merge pull request #13653 from janlazo/revert-10848
Revert #10848
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 530b930fed..02a7732f5c 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1128,11 +1128,11 @@ void wait_return(int redraw)
if (p_more) {
if (c == 'b' || c == 'k' || c == 'u' || c == 'g'
|| c == K_UP || c == K_PAGEUP) {
- if (msg_scrolled > Rows) {
- // scroll back to show older messages
+ if (msg_scrolled > Rows)
+ /* scroll back to show older messages */
do_more_prompt(c);
- } else {
- msg_didout = false;
+ else {
+ msg_didout = FALSE;
c = K_IGNORE;
msg_col =
cmdmsg_rl ? Columns - 1 :
@@ -2097,17 +2097,15 @@ static void msg_puts_display(const char_u *str, int maxlen, int attr,
store_sb_text((char_u **)&sb_str, (char_u *)s, attr, &sb_col, true);
}
- if (*s == '\n') { // go to next line
- msg_didout = false; // remember that line is empty
- if (cmdmsg_rl) {
+ if (*s == '\n') { /* go to next line */
+ msg_didout = FALSE; /* remember that line is empty */
+ if (cmdmsg_rl)
msg_col = Columns - 1;
- } else {
+ else
msg_col = 0;
- }
- if (++msg_row >= Rows) { // safety check
+ if (++msg_row >= Rows) /* safety check */
msg_row = Rows - 1;
- }
- } else if (*s == '\r') { // go to column 0
+ } else if (*s == '\r') { /* go to column 0 */
msg_col = 0;
} else if (*s == '\b') { /* go to previous char */
if (msg_col)
@@ -2880,10 +2878,10 @@ void repeat_message(void)
ui_cursor_goto(msg_row, msg_col); /* put cursor back */
} else if (State == HITRETURN || State == SETWSIZE) {
if (msg_row == Rows - 1) {
- // Avoid drawing the "hit-enter" prompt below the previous one,
- // overwrite it. Esp. useful when regaining focus and a
- // FocusGained autocmd exists but didn't draw anything.
- msg_didout = false;
+ /* Avoid drawing the "hit-enter" prompt below the previous one,
+ * overwrite it. Esp. useful when regaining focus and a
+ * FocusGained autocmd exists but didn't draw anything. */
+ msg_didout = FALSE;
msg_col = 0;
msg_clr_eos();
}