summaryrefslogtreecommitdiffstats
path: root/src/message.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-01 22:01:55 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-01 22:01:55 +0000
commite1438bb8d0b7a48f712458e68755ab8b66d92ace (patch)
tree94f3fc83b2f5138213f7843ac53e7cfa5179c8cc /src/message.c
parente224ffa156ce968d3e823fb8aa77d93812ca4092 (diff)
updated for version 7.0211
Diffstat (limited to 'src/message.c')
-rw-r--r--src/message.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/message.c b/src/message.c
index 5521a15b51..0cba2ccba0 100644
--- a/src/message.c
+++ b/src/message.c
@@ -932,22 +932,33 @@ wait_return(redraw)
c = K_IGNORE;
}
#endif
- if (p_more && !p_cp && (c == 'b' || c == 'k' || c == 'u'
- || c == 'g' || c == K_UP))
+ /*
+ * Allow scrolling back in the messages.
+ * Also accept scroll-down commands when messages fill the screen,
+ * to avoid that typing one 'j' too many makes the messages
+ * disappear.
+ */
+ if (p_more && !p_cp)
{
- /* scroll back to show older messages */
- do_more_prompt(c);
- if (quit_more)
+ if (c == 'b' || c == 'k' || c == 'u' || c == 'g' || c == K_UP)
{
- c = CAR; /* just pretend CR was hit */
- quit_more = FALSE;
- got_int = FALSE;
+ /* scroll back to show older messages */
+ do_more_prompt(c);
+ if (quit_more)
+ {
+ c = CAR; /* just pretend CR was hit */
+ quit_more = FALSE;
+ got_int = FALSE;
+ }
+ else
+ {
+ c = K_IGNORE;
+ hit_return_msg();
+ }
}
- else
- {
+ else if (msg_scrolled > Rows - 2
+ && (c == 'j' || c == K_DOWN || c == 'd'))
c = K_IGNORE;
- hit_return_msg();
- }
}
} while ((had_got_int && c == Ctrl_C)
|| c == K_IGNORE