neatvi

[fork] simple vi-type editor with UTF-8 support
git clone git://src.adamsgaard.dk/neatvi # fast
git clone https://src.adamsgaard.dk/neatvi.git # slow
Log | Files | Refs | README Back to index

commit 1a71c8b9dd2cf614712d7ebdab0c8a8f0f624a22
parent 733ab28c663f58da7672046120e7cb1745c8fe79
Author: John Vogel <jvogel4@stny.rr.com>
Date:   Tue, 16 Jun 2015 08:32:27 +0430

ex: call term_init() before ex_init()

Diffstat:
Mex.c | 4----
Mvi.c | 6++++--
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/ex.c b/ex.c @@ -720,16 +720,12 @@ void ex_command(char *ln) /* ex main loop */ void ex(void) { - if (xled) - term_init(); while (!xquit) { char *ln = ex_read(":"); if (ln) ex_command(ln); free(ln); } - if (xled) - term_done(); } void ex_init(char **files) diff --git a/vi.c b/vi.c @@ -973,7 +973,6 @@ static void vi(void) int mark; char *ln; char *kmap = NULL; - term_init(); xtop = 0; xrow = 0; xoff = 0; @@ -1221,7 +1220,6 @@ static void vi(void) } term_pos(xrows, 0); term_kill(); - term_done(); } int main(int argc, char *argv[]) @@ -1238,11 +1236,15 @@ int main(int argc, char *argv[]) } dir_init(); syn_init(); + if (xled || xvis) + term_init(); ex_init(argv + i); if (xvis) vi(); else ex(); + if (xled || xvis) + term_done(); ex_done(); reg_done(); syn_done();