summaryrefslogtreecommitdiff
path: root/lib/readline/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline/terminal.c')
-rw-r--r--lib/readline/terminal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/readline/terminal.c b/lib/readline/terminal.c
index cc61388..eb72c19 100644
--- a/lib/readline/terminal.c
+++ b/lib/readline/terminal.c
@@ -122,7 +122,7 @@ char *_rl_term_up;
static char *_rl_visible_bell;
/* Non-zero means the terminal can auto-wrap lines. */
-int _rl_term_autowrap;
+int _rl_term_autowrap = -1;
/* Non-zero means that this terminal has a meta key. */
static int term_has_meta;
@@ -274,6 +274,9 @@ void
_rl_set_screen_size (rows, cols)
int rows, cols;
{
+ if (_rl_term_autowrap == -1)
+ _rl_init_terminal_io (rl_terminal_name);
+
if (rows > 0)
_rl_screenheight = rows;
if (cols > 0)