diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/Config.src | 2 | ||||
-rw-r--r-- | libbb/lineedit.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/libbb/Config.src b/libbb/Config.src index 80b1e0d21..09bf89246 100644 --- a/libbb/Config.src +++ b/libbb/Config.src | |||
@@ -98,7 +98,7 @@ config FEATURE_USERNAME_COMPLETION | |||
98 | 98 | ||
99 | config FEATURE_EDITING_FANCY_PROMPT | 99 | config FEATURE_EDITING_FANCY_PROMPT |
100 | bool "Fancy shell prompts" | 100 | bool "Fancy shell prompts" |
101 | default n | 101 | default y |
102 | depends on FEATURE_EDITING | 102 | depends on FEATURE_EDITING |
103 | help | 103 | help |
104 | Setting this option allows for prompts to use things like \w and | 104 | Setting this option allows for prompts to use things like \w and |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 8a2ea7974..a9b790cf7 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -1765,11 +1765,13 @@ static void cmdedit_setwidth(unsigned w, int redraw_flg) | |||
1765 | 1765 | ||
1766 | static void win_changed(int nsig) | 1766 | static void win_changed(int nsig) |
1767 | { | 1767 | { |
1768 | int sv_errno = errno; | ||
1768 | unsigned width; | 1769 | unsigned width; |
1769 | get_terminal_width_height(0, &width, NULL); | 1770 | get_terminal_width_height(0, &width, NULL); |
1770 | cmdedit_setwidth(width, nsig /* - just a yes/no flag */); | 1771 | cmdedit_setwidth(width, nsig /* - just a yes/no flag */); |
1771 | if (nsig == SIGWINCH) | 1772 | if (nsig == SIGWINCH) |
1772 | signal(SIGWINCH, win_changed); /* rearm ourself */ | 1773 | signal(SIGWINCH, win_changed); /* rearm ourself */ |
1774 | errno = sv_errno; | ||
1773 | } | 1775 | } |
1774 | 1776 | ||
1775 | static int lineedit_read_key(char *read_key_buffer) | 1777 | static int lineedit_read_key(char *read_key_buffer) |