summaryrefslogtreecommitdiff
path: root/usr.bin/vim/message.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-09-22 01:18:21 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-09-22 01:18:21 +0000
commit80eddc88a7f881b7952a49a23f25677f09e6b4ba (patch)
treee8bff9fae669ff7d0df46d220225e67dd7927d49 /usr.bin/vim/message.c
parent668eaf227d07b7361ec35e886a1de97ad5188c55 (diff)
Add ex mode to vim, from eric@rainbow.uchicago.edu via mool@oce.nl.
Diffstat (limited to 'usr.bin/vim/message.c')
-rw-r--r--usr.bin/vim/message.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/usr.bin/vim/message.c b/usr.bin/vim/message.c
index 07b07a32aa0..bbd32768b87 100644
--- a/usr.bin/vim/message.c
+++ b/usr.bin/vim/message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: message.c,v 1.2 1996/09/21 06:23:09 downsj Exp $ */
+/* $OpenBSD: message.c,v 1.3 1996/09/22 01:18:03 downsj Exp $ */
/* vi:set ts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
@@ -23,7 +23,7 @@
static void msg_screen_outchar __ARGS((int c));
static int msg_check_screen __ARGS((void));
-static int lines_left = -1; /* lines left for listing */
+/* lines_left moved to globals so do_exmode could see it */
/*
* msg(s) - displays the string 's' on the status line
@@ -245,6 +245,12 @@ wait_return(redraw)
quit_more = FALSE;
got_int = FALSE;
}
+ else if (exmode_active)
+ {
+ MSG_OUTSTR(" "); /* make sure the cursor is on the right line */
+ c = CR; /* no need for a return in ex mode */
+ got_int = FALSE;
+ }
else
{
State = HITRETURN;
@@ -547,6 +553,16 @@ msg_prt_line(s)
char_u *p = NULL; /* init to make SASC shut up */
int n;
+ /*
+ * if it's a blank line, echo a space, because otherwise if we're
+ * in ex mode, the : for the next command will end up on the wrong
+ * line. I don't know why -- hooray for cargo cult programming!
+ */
+
+ if (*s == 0) {
+ msg_outchar(' ');
+ }
+
for (;;)
{
if (n_extra)