aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-07-29 10:25:02 +0100
committerRon Yorston <rmy@pobox.com>2017-07-29 10:25:02 +0100
commit6cfb737685912925470fa89e0e084c2b49e40c81 (patch)
treea214a3e3e549146cb2938c8ee1daa92a6100f21f
parentbf35303101df45b43188bacf80840034aef40c45 (diff)
downloadbusybox-w32-6cfb737685912925470fa89e0e084c2b49e40c81.tar.gz
busybox-w32-6cfb737685912925470fa89e0e084c2b49e40c81.tar.bz2
busybox-w32-6cfb737685912925470fa89e0e084c2b49e40c81.zip
lineedit: fix incorrect conflict resolution in bb8d79ead merge
-rw-r--r--libbb/lineedit.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index a93e28975..051a39b2e 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -2724,44 +2724,6 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
2724 vi_cmdmode = 1; 2724 vi_cmdmode = 1;
2725 input_backward(1); 2725 input_backward(1);
2726 } 2726 }
2727 /* Handle a few ESC-<key> combinations the same way
2728 * standard readline bindings (IOW: bash) do.
2729 * Often, Alt-<key> generates ESC-<key>.
2730 */
2731 ic = lineedit_read_key(read_key_buffer, 20);
2732 switch (ic) {
2733 //case KEYCODE_LEFT: - bash doesn't do this
2734 case 'b':
2735 ctrl_left();
2736 break;
2737 //case KEYCODE_RIGHT: - bash doesn't do this
2738 case 'f':
2739 ctrl_right();
2740 break;
2741 //case KEYCODE_DELETE: - bash doesn't do this
2742 case 'd': /* Alt-D */
2743 {
2744 /* Delete word forward */
2745 int nc, sc = cursor;
2746 ctrl_right();
2747 nc = cursor - sc;
2748 input_backward(nc);
2749 while (--nc >= 0)
2750 input_delete(1);
2751 break;
2752 }
2753 case '\b': /* Alt-Backspace(?) */
2754 case '\x7f': /* Alt-Backspace(?) */
2755 //case 'w': - bash doesn't do this
2756 {
2757 /* Delete word backward */
2758 int sc = cursor;
2759 ctrl_left();
2760 while (sc-- > cursor)
2761 input_delete(1);
2762 break;
2763 }
2764 }
2765 break; 2727 break;
2766#endif /* FEATURE_COMMAND_EDITING_VI */ 2728#endif /* FEATURE_COMMAND_EDITING_VI */
2767 2729