aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-03-14 20:33:00 +0000
committerRon Yorston <rmy@pobox.com>2015-03-14 20:33:00 +0000
commita4f58436b78fe59e57620c6e0301f213ee25f273 (patch)
tree8355f724926e605280af2d6f2b1ccc6b1bd02dee /editors/vi.c
parentba0c36cfcf84efbac6f89e27238e04bb57e9cd45 (diff)
parent49acc1a7618a28d34381cbb7661d7c981fcb238f (diff)
downloadbusybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.tar.gz
busybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.tar.bz2
busybox-w32-a4f58436b78fe59e57620c6e0301f213ee25f273.zip
Merge branch 'busybox' into merge
Conflicts: coreutils/od_bloaty.c libbb/lineedit.c
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 1fa97b568..926aef19b 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -2017,8 +2017,7 @@ static char *char_insert(char *p, char c, int undo) // insert the char c at 'p'
2017 p--; 2017 p--;
2018 } 2018 }
2019 } else if (c == erase_char || c == 8 || c == 127) { // Is this a BS 2019 } else if (c == erase_char || c == 8 || c == 127) { // Is this a BS
2020 // 123456789 2020 if (p > text) {
2021 if ((p[-1] != '\n') && (dot>text)) {
2022 p--; 2021 p--;
2023 p = text_hole_delete(p, p, ALLOW_UNDO_QUEUED); // shrink buffer 1 char 2022 p = text_hole_delete(p, p, ALLOW_UNDO_QUEUED); // shrink buffer 1 char
2024 } 2023 }
@@ -4073,8 +4072,9 @@ static void do_cmd(int c)
4073 undo_queue_commit(); 4072 undo_queue_commit();
4074 break; 4073 break;
4075 case KEYCODE_DELETE: 4074 case KEYCODE_DELETE:
4076 c = 'x'; 4075 if (dot < end - 1)
4077 // fall through 4076 dot = yank_delete(dot, dot, 1, YANKDEL, ALLOW_UNDO);
4077 break;
4078 case 'X': // X- delete char before dot 4078 case 'X': // X- delete char before dot
4079 case 'x': // x- delete the current char 4079 case 'x': // x- delete the current char
4080 case 's': // s- substitute the current char 4080 case 's': // s- substitute the current char