aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c2
1 files changed, 2 insertions, 0 deletions
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)