aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-08-19 19:15:06 +0000
committerEric Andersen <andersen@codepoet.org>2004-08-19 19:15:06 +0000
commita9eb33ddc73f2e98063798652b23d4191e7d5a0e (patch)
tree4f100a6f5bc368a0221bfe1c1987d1720502f9e4
parent807bd846b6428920eb2f10875f19a7e48d8cfdd7 (diff)
downloadbusybox-w32-a9eb33ddc73f2e98063798652b23d4191e7d5a0e.tar.gz
busybox-w32-a9eb33ddc73f2e98063798652b23d4191e7d5a0e.tar.bz2
busybox-w32-a9eb33ddc73f2e98063798652b23d4191e7d5a0e.zip
regularly update the status line display
-Erik
-rw-r--r--editors/vi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/vi.c b/editors/vi.c
index b1d7034d4..cd6cf0ea1 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -19,7 +19,7 @@
19 */ 19 */
20 20
21static const char vi_Version[] = 21static const char vi_Version[] =
22 "$Id: vi.c,v 1.37 2004/07/20 06:44:46 andersen Exp $"; 22 "$Id: vi.c,v 1.38 2004/08/19 19:15:06 andersen Exp $";
23 23
24/* 24/*
25 * To compile for standalone use: 25 * To compile for standalone use:
@@ -507,7 +507,6 @@ static void edit_file(Byte * fn)
507#endif /* CONFIG_FEATURE_VI_DOT_CMD */ 507#endif /* CONFIG_FEATURE_VI_DOT_CMD */
508 redraw(FALSE); // dont force every col re-draw 508 redraw(FALSE); // dont force every col re-draw
509 show_status_line(); 509 show_status_line();
510 fflush(stdout);
511 510
512 //------This is the main Vi cmd handling loop ----------------------- 511 //------This is the main Vi cmd handling loop -----------------------
513 while (editing > 0) { 512 while (editing > 0) {
@@ -676,7 +675,7 @@ static void colon(Byte * buf)
676 Byte c, *orig_buf, *buf1, *q, *r; 675 Byte c, *orig_buf, *buf1, *q, *r;
677 Byte *fn, cmd[BUFSIZ], args[BUFSIZ]; 676 Byte *fn, cmd[BUFSIZ], args[BUFSIZ];
678 int i, l, li, ch, st, b, e; 677 int i, l, li, ch, st, b, e;
679 int useforce, forced; 678 int useforce = FALSE, forced = FALSE;
680 struct stat st_buf; 679 struct stat st_buf;
681 680
682 // :3154 // if (-e line 3154) goto it else stay put 681 // :3154 // if (-e line 3154) goto it else stay put
@@ -693,7 +692,6 @@ static void colon(Byte * buf)
693 // :s/find/replace/ // substitute pattern "find" with "replace" 692 // :s/find/replace/ // substitute pattern "find" with "replace"
694 // :!<cmd> // run <cmd> then return 693 // :!<cmd> // run <cmd> then return
695 // 694 //
696 forced = useforce = FALSE;
697 695
698 if (strlen((char *) buf) <= 0) 696 if (strlen((char *) buf) <= 0)
699 goto vc1; 697 goto vc1;
@@ -2661,6 +2659,7 @@ static void show_status_line(void)
2661 static int last_cksum; 2659 static int last_cksum;
2662 int l, cnt, cksum; 2660 int l, cnt, cksum;
2663 2661
2662 edit_status();
2664 cnt = strlen((char *) status_buffer); 2663 cnt = strlen((char *) status_buffer);
2665 for (cksum= l= 0; l < cnt; l++) { cksum += (int)(status_buffer[l]); } 2664 for (cksum= l= 0; l < cnt; l++) { cksum += (int)(status_buffer[l]); }
2666 // don't write the status line unless it changes 2665 // don't write the status line unless it changes
@@ -2671,6 +2670,7 @@ static void show_status_line(void)
2671 clear_to_eol(); 2670 clear_to_eol();
2672 place_cursor(crow, ccol, FALSE); // put cursor back in correct place 2671 place_cursor(crow, ccol, FALSE); // put cursor back in correct place
2673 } 2672 }
2673 fflush(stdout);
2674} 2674}
2675 2675
2676//----- format the status buffer, the bottom line of screen ------ 2676//----- format the status buffer, the bottom line of screen ------