aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/Config.src2
-rw-r--r--libbb/lineedit.c2
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
99config FEATURE_EDITING_FANCY_PROMPT 99config 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
1766static void win_changed(int nsig) 1766static 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
1775static int lineedit_read_key(char *read_key_buffer) 1777static int lineedit_read_key(char *read_key_buffer)