don't do unnecessary set modes and cursor motion
authorEdward Wang <edward@ucbvax.Berkeley.EDU>
Thu, 15 Aug 1985 12:51:39 +0000 (04:51 -0800)
committerEdward Wang <edward@ucbvax.Berkeley.EDU>
Thu, 15 Aug 1985 12:51:39 +0000 (04:51 -0800)
SCCS-vsn: usr.bin/window/main.c 3.30
SCCS-vsn: usr.bin/window/wwend.c 3.8

usr/src/usr.bin/window/main.c
usr/src/usr.bin/window/wwend.c

index d56eabc..04414b4 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)main.c     3.29 %G%";
+static char sccsid[] = "@(#)main.c     3.30 %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -135,8 +135,6 @@ char **argv;
 
        mloop();
 
 
        mloop();
 
-       wwupdate();
-       wwflush();
 bad:
        wwend();
        return 0;
 bad:
        wwend();
        return 0;
index 67e0acb..eeabf3c 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)wwend.c    3.7 %G%";
+static char sccsid[] = "@(#)wwend.c    3.8 %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -13,6 +13,11 @@ static char sccsid[] = "@(#)wwend.c  3.7 %G%";
 
 wwend()
 {
 
 wwend()
 {
+       wwupdate();
+       if (tt.tt_insert)
+               (*tt.tt_setinsert)(0);
+       if (tt.tt_modes)
+               (*tt.tt_setmodes)(0);
        (*tt.tt_move)(tt.tt_nrow - 1, 0);
        (*tt.tt_end)();
        ttflush();
        (*tt.tt_move)(tt.tt_nrow - 1, 0);
        (*tt.tt_end)();
        ttflush();