eliminated CONFIG_FEATURE_EDITING_FANCY_KEYS. the size savings

was small, compared to the total size of the command-line editing
features, and it removed key bindings that most wouldn't consider
"fancy", like ^U, and 'l' and 'h' in vi mode, ^F and ^B in emacs
mode.
This commit is contained in:
Paul Fox
2008-01-18 20:41:24 +00:00
parent 52432f2b06
commit 518d8dd979
3 changed files with 0 additions and 17 deletions

View File

@ -57,14 +57,6 @@ config FEATURE_EDITING_MAX_LEN
You may want to decrease this parameter if your target machine You may want to decrease this parameter if your target machine
benefits from smaller stack usage. benefits from smaller stack usage.
config FEATURE_EDITING_FANCY_KEYS
bool "Additional editing keys"
default n
depends on FEATURE_EDITING
help
Enable additonal editing keys (Ctrl-E, Ctrl-U etc).
Arrow keys, Home/End/Delete and Ctrl-W work even without this option.
config FEATURE_EDITING_VI config FEATURE_EDITING_VI
bool "vi-style line editing commands" bool "vi-style line editing commands"
default n default n

View File

@ -1423,7 +1423,6 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
goto_new_line(); goto_new_line();
break_out = 1; break_out = 1;
break; break;
#if ENABLE_FEATURE_EDITING_FANCY_KEYS
case CTRL('A'): case CTRL('A'):
vi_case('0'|vbit:) vi_case('0'|vbit:)
/* Control-a -- Beginning of line */ /* Control-a -- Beginning of line */
@ -1436,7 +1435,6 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
/* Control-b -- Move back one character */ /* Control-b -- Move back one character */
input_backward(1); input_backward(1);
break; break;
#endif
case CTRL('C'): case CTRL('C'):
vi_case(CTRL('C')|vbit:) vi_case(CTRL('C')|vbit:)
/* Control-c -- stop gathering input */ /* Control-c -- stop gathering input */
@ -1457,7 +1455,6 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
input_delete(0); input_delete(0);
break; break;
#if ENABLE_FEATURE_EDITING_FANCY_KEYS
case CTRL('E'): case CTRL('E'):
vi_case('$'|vbit:) vi_case('$'|vbit:)
/* Control-e -- End of line */ /* Control-e -- End of line */
@ -1469,7 +1466,6 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
/* Control-f -- Move forward one character */ /* Control-f -- Move forward one character */
input_forward(); input_forward();
break; break;
#endif
case '\b': case '\b':
case '\x7f': /* DEL */ case '\x7f': /* DEL */
@ -1483,7 +1479,6 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
break; break;
#endif #endif
#if ENABLE_FEATURE_EDITING_FANCY_KEYS
case CTRL('K'): case CTRL('K'):
/* Control-k -- clear to end of line */ /* Control-k -- clear to end of line */
command[cursor] = 0; command[cursor] = 0;
@ -1496,7 +1491,6 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
printf("\033[H"); printf("\033[H");
redraw(0, command_len - cursor); redraw(0, command_len - cursor);
break; break;
#endif
#if MAX_HISTORY > 0 #if MAX_HISTORY > 0
case CTRL('N'): case CTRL('N'):
@ -1518,7 +1512,6 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
break; break;
#endif #endif
#if ENABLE_FEATURE_EDITING_FANCY_KEYS
case CTRL('U'): case CTRL('U'):
vi_case(CTRL('U')|vbit:) vi_case(CTRL('U')|vbit:)
/* Control-U -- Clear line before cursor */ /* Control-U -- Clear line before cursor */
@ -1528,7 +1521,6 @@ int read_line_input(const char *prompt, char *command, int maxsize, line_input_t
redraw(cmdedit_y, command_len); redraw(cmdedit_y, command_len);
} }
break; break;
#endif
case CTRL('W'): case CTRL('W'):
vi_case(CTRL('W')|vbit:) vi_case(CTRL('W')|vbit:)
/* Control-W -- Remove the last word */ /* Control-W -- Remove the last word */

View File

@ -73,7 +73,6 @@ CONFIG_FEATURE_FAST_TOP=y
# CONFIG_FEATURE_ETC_NETWORKS is not set # CONFIG_FEATURE_ETC_NETWORKS is not set
CONFIG_FEATURE_EDITING=y CONFIG_FEATURE_EDITING=y
CONFIG_FEATURE_EDITING_MAX_LEN=1024 CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_FANCY_KEYS is not set
# CONFIG_FEATURE_EDITING_VI is not set # CONFIG_FEATURE_EDITING_VI is not set
CONFIG_FEATURE_EDITING_HISTORY=15 CONFIG_FEATURE_EDITING_HISTORY=15
# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set # CONFIG_FEATURE_EDITING_SAVEHISTORY is not set