aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2016-04-26 15:23:38 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-10-31 12:51:51 +0100
commit552796791f8c5aa12dfb790e3a94c2d905f367ee (patch)
tree8d9824804b7121e6b1635b220f4fe5d6caeec3a7
parent656ca7bdd992f6aabbdd5cadbac5241f6e1971a1 (diff)
downloadbusybox-w32-552796791f8c5aa12dfb790e3a94c2d905f367ee.tar.gz
busybox-w32-552796791f8c5aa12dfb790e3a94c2d905f367ee.tar.bz2
busybox-w32-552796791f8c5aa12dfb790e3a94c2d905f367ee.zip
vi: remove duplicated code
At worst show_status_line() might be called needlessly when the user presses ^L/^R, but I don't think we'll get many complaints about that. function old new delta do_cmd 4592 4558 -34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-34) Total: -34 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--editors/vi.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/editors/vi.c b/editors/vi.c
index f103e0dc0..2aa0ad9dd 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -3586,12 +3586,7 @@ static void do_cmd(int c)
3586 break; 3586 break;
3587 case 12: // ctrl-L force redraw whole screen 3587 case 12: // ctrl-L force redraw whole screen
3588 case 18: // ctrl-R force redraw 3588 case 18: // ctrl-R force redraw
3589 place_cursor(0, 0); 3589 redraw(TRUE); // this will redraw the entire display
3590 clear_to_eos();
3591 //mysleep(10); // why???
3592 screen_erase(); // erase the internal screen buffer
3593 last_status_cksum = 0; // force status update
3594 refresh(TRUE); // this will redraw the entire display
3595 break; 3590 break;
3596 case 13: // Carriage Return ^M 3591 case 13: // Carriage Return ^M
3597 case '+': // +- goto next line 3592 case '+': // +- goto next line