summaryrefslogtreecommitdiff
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 80b1e0d..09bf892 100644
--- a/libbb/Config.src
+++ b/libbb/Config.src
@@ -98,7 +98,7 @@ config FEATURE_USERNAME_COMPLETION
config FEATURE_EDITING_FANCY_PROMPT
bool "Fancy shell prompts"
- default n
+ default y
depends on FEATURE_EDITING
help
Setting this option allows for prompts to use things like \w and
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 8a2ea79..a9b790c 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -1765,11 +1765,13 @@ static void cmdedit_setwidth(unsigned w, int redraw_flg)
static void win_changed(int nsig)
{
+ int sv_errno = errno;
unsigned width;
get_terminal_width_height(0, &width, NULL);
cmdedit_setwidth(width, nsig /* - just a yes/no flag */);
if (nsig == SIGWINCH)
signal(SIGWINCH, win_changed); /* rearm ourself */
+ errno = sv_errno;
}
static int lineedit_read_key(char *read_key_buffer)