diff options
author | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:42:39 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:45:21 +0100 |
commit | 517cf74f6265ec4308b790b637b3f9778cbdc6e0 (patch) | |
tree | be9337069b60ca1bb03565d8575bacfc71181003 /editors/vi.c | |
parent | ae65dc37bcc9b1d9cef0b111131c79dc4ba1bf51 (diff) | |
parent | ac78f2ac96b3efd6551a08e7dc609efa1fb69481 (diff) | |
download | busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.gz busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.bz2 busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editors/vi.c b/editors/vi.c index 70c8f3daf..4676db2b2 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -1067,7 +1067,7 @@ static int readit(void) // read (maybe cursor) key from stdin | |||
1067 | goto again; | 1067 | goto again; |
1068 | go_bottom_and_clear_to_eol(); | 1068 | go_bottom_and_clear_to_eol(); |
1069 | cookmode(); // terminal to "cooked" | 1069 | cookmode(); // terminal to "cooked" |
1070 | bb_error_msg_and_die("can't read user input"); | 1070 | bb_simple_error_msg_and_die("can't read user input"); |
1071 | } | 1071 | } |
1072 | return c; | 1072 | return c; |
1073 | } | 1073 | } |
@@ -1360,7 +1360,7 @@ static char what_reg(void) | |||
1360 | char c; | 1360 | char c; |
1361 | 1361 | ||
1362 | c = 'D'; // default to D-reg | 1362 | c = 'D'; // default to D-reg |
1363 | if (0 <= YDreg && YDreg <= 25) | 1363 | if (YDreg <= 25) |
1364 | c = 'a' + (char) YDreg; | 1364 | c = 'a' + (char) YDreg; |
1365 | if (YDreg == 26) | 1365 | if (YDreg == 26) |
1366 | c = 'D'; | 1366 | c = 'D'; |
@@ -2616,7 +2616,7 @@ static void colon(char *buf) | |||
2616 | free(reg[Ureg]); // free orig line reg- for 'U' | 2616 | free(reg[Ureg]); // free orig line reg- for 'U' |
2617 | reg[Ureg] = NULL; | 2617 | reg[Ureg] = NULL; |
2618 | } | 2618 | } |
2619 | if (YDreg >= 0 && YDreg < 28) { | 2619 | /*if (YDreg < 28) - always true*/ { |
2620 | free(reg[YDreg]); // free default yank/delete register | 2620 | free(reg[YDreg]); // free default yank/delete register |
2621 | reg[YDreg] = NULL; | 2621 | reg[YDreg] = NULL; |
2622 | } | 2622 | } |