summaryrefslogtreecommitdiff
path: root/usr.bin/vim/main.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1996-10-14 03:56:09 +0000
committerJason Downs <downsj@cvs.openbsd.org>1996-10-14 03:56:09 +0000
commit0a64da4f22aa6e7dc9ce23604386381860186ad4 (patch)
tree532d8d1430151973edf5c77219a3c0c08afbd3d4 /usr.bin/vim/main.c
parent6ddf388c16e872b21b49b92394473229e943f96e (diff)
Backout a previous change that didn't work, and update to version 4.5.
Diffstat (limited to 'usr.bin/vim/main.c')
-rw-r--r--usr.bin/vim/main.c52
1 files changed, 13 insertions, 39 deletions
diff --git a/usr.bin/vim/main.c b/usr.bin/vim/main.c
index bf1b3c08665..6385399f0b9 100644
--- a/usr.bin/vim/main.c
+++ b/usr.bin/vim/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.4 1996/09/24 22:12:57 downsj Exp $ */
+/* $OpenBSD: main.c,v 1.5 1996/10/14 03:55:14 downsj Exp $ */
/* vi:set ts=4 sw=4:
*
* VIM - Vi IMproved by Bram Moolenaar
@@ -154,7 +154,6 @@ main(argc, argv)
int check_version = FALSE; /* check .vimrc version number */
int argv_idx; /* index in argv[n][] */
int invoked_as_ex = FALSE; /* argv[0] is "ex" */
- int term_inited = FALSE;
#if defined(MSDOS) || defined(WIN32) || defined(OS2)
static struct initmap
@@ -476,6 +475,16 @@ main(argc, argv)
}
}
+ /* note that we may use mch_windexit() before mch_windinit()! */
+ mch_windinit(); /* inits Rows and Columns */
+/*
+ * Set the default values for the options that use Rows and Columns.
+ */
+ set_init_2();
+
+ firstwin->w_height = Rows - 1;
+ cmdline_row = Rows - 1;
+
/*
* Process the other command line arguments.
* -e[errorfile] quickfix mode
@@ -539,24 +548,6 @@ main(argc, argv)
}
else /* must be a file name */
{
- if (!term_inited)
- {
-#ifdef USE_GUI
- if (!gui.starting)
-#endif
- termcapinit(term);
-
- /* note that we may use mch_windexit() before mch_windinit()! */
- mch_windinit(); /* inits Rows and Columns */
- /*
- * Set the default values for the options that use Rows and
- * Columns.
- */
- set_init_2();
-
- term_inited = TRUE;
- }
-
/*
* Skip a single "--" argument, used in front of a file name that
* starts with '-'.
@@ -586,23 +577,6 @@ main(argc, argv)
}
}
}
- if (!term_inited)
- {
-#ifdef USE_GUI
- if (!gui.starting)
-#endif
- termcapinit(term);
-
- /* note that we may use mch_windexit() before mch_windinit()! */
- mch_windinit(); /* inits Rows and Columns */
- /*
- * Set the default values for the options that use Rows and
- * Columns.
- */
- set_init_2();
-
- term_inited = TRUE;
- }
RedrawingDisabled = TRUE;
@@ -639,7 +613,7 @@ main(argc, argv)
curbuf->b_nwindows = 1; /* there is one window */
win_init(curwin); /* init current window */
init_yank(); /* init yank buffers */
- if (full_screen && !term_inited)
+ if (full_screen)
termcapinit(term); /* set terminal name and get terminal
capabilities */
screenclear(); /* clear screen (just inits screen structures,
@@ -1074,7 +1048,7 @@ ex */
}
}
dont_wait_return = FALSE;
- if (got_int)
+ if (got_int && !global_busy)
{
(void)vgetc(); /* flush all buffers */
got_int = FALSE;