[BusyBox-cvs] CVS update of busybox/editors (vi.c)

Erik Andersen andersen at codepoet.org
Thu Aug 19 19:15:07 UTC 2004


    Date: Thursday, August 19, 2004 @ 13:15:07
  Author: andersen
    Path: /var/cvs/busybox/editors

Modified: vi.c (1.37 -> 1.38)

regularly update the status line display
 -Erik


Index: busybox/editors/vi.c
diff -u busybox/editors/vi.c:1.37 busybox/editors/vi.c:1.38
--- busybox/editors/vi.c:1.37	Tue Jul 20 00:44:46 2004
+++ busybox/editors/vi.c	Thu Aug 19 13:15:06 2004
@@ -507,7 +507,6 @@
 #endif							/* CONFIG_FEATURE_VI_DOT_CMD */
 	redraw(FALSE);			// dont force every col re-draw
 	show_status_line();
-	fflush(stdout);
 
 	//------This is the main Vi cmd handling loop -----------------------
 	while (editing > 0) {
@@ -676,7 +675,7 @@
 	Byte c, *orig_buf, *buf1, *q, *r;
 	Byte *fn, cmd[BUFSIZ], args[BUFSIZ];
 	int i, l, li, ch, st, b, e;
-	int useforce, forced;
+	int useforce = FALSE, forced = FALSE;
 	struct stat st_buf;
 
 	// :3154	// if (-e line 3154) goto it  else stay put
@@ -693,7 +692,6 @@
 	// :s/find/replace/ // substitute pattern "find" with "replace"
 	// :!<cmd>	// run <cmd> then return
 	//
-	forced = useforce = FALSE;
 
 	if (strlen((char *) buf) <= 0)
 		goto vc1;
@@ -2661,6 +2659,7 @@
 	static int last_cksum;
 	int l, cnt, cksum;
 
+	edit_status();
 	cnt = strlen((char *) status_buffer);
 	for (cksum= l= 0; l < cnt; l++) { cksum += (int)(status_buffer[l]); }
 	// don't write the status line unless it changes
@@ -2671,6 +2670,7 @@
 		clear_to_eol();
 		place_cursor(crow, ccol, FALSE);	// put cursor back in correct place
 	}
+	fflush(stdout);
 }
 
 //----- format the status buffer, the bottom line of screen ------



More information about the busybox-cvs mailing list