aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--readline/ChangeLog.gdb7
-rw-r--r--readline/display.c5
2 files changed, 12 insertions, 0 deletions
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index c59329e..e71ee96 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,3 +1,10 @@
+2019-07-12 Tom de Vries <tdevries@suse.de>
+ Chet Ramey <chet.ramey@case.edu>
+
+ PR cli/24514
+ * readline/display.c (init_line_structures, rl_redisplay): Ensure
+ line_size is at least _rl_screenwidth + 1.
+
2019-01-31 Alan Hayward <alan.hayward@arm.com>
* config.h.in: Add SOURCE/EXTENSION macros.
diff --git a/readline/display.c b/readline/display.c
index 9044305..842adf5 100644
--- a/readline/display.c
+++ b/readline/display.c
@@ -450,6 +450,9 @@ init_line_structures (minsize)
{
register int n;
+ if (minsize <= _rl_screenwidth) /* XXX - for gdb */
+ minsize = _rl_screenwidth + 1;
+
if (invisible_line == 0) /* initialize it */
{
if (line_size < minsize)
@@ -526,6 +529,8 @@ rl_redisplay ()
init_line_structures (0);
rl_on_new_line ();
}
+ else if (line_size <= _rl_screenwidth)
+ init_line_structures (_rl_screenwidth + 1);
/* Draw the line into the buffer. */
cpos_buffer_position = -1;