aboutsummaryrefslogtreecommitdiff
path: root/readline
diff options
context:
space:
mode:
Diffstat (limited to 'readline')
-rw-r--r--readline/ChangeLog.gdb6
-rw-r--r--readline/display.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index 01b0839..49e9fba 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -1,3 +1,9 @@
+2019-09-18 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ PR cli/24980
+ * display.c (init_line_structures): Initialise line_state using
+ original minsize value.
+
2019-08-13 Christian Biesinger <cbiesinger@google.com>
* colors.c (_rl_print_color_indicator): Remove unnecessary
diff --git a/readline/display.c b/readline/display.c
index b39f282..89193b5 100644
--- a/readline/display.c
+++ b/readline/display.c
@@ -602,6 +602,7 @@ static void
init_line_structures (int minsize)
{
register int n;
+ int original_minsize = minsize;
if (minsize <= _rl_screenwidth) /* XXX - for gdb */
minsize = _rl_screenwidth + 1;
@@ -622,7 +623,7 @@ init_line_structures (int minsize)
invisible_line = (char *)xrealloc (invisible_line, line_size);
}
- for (n = minsize; n < line_size; n++)
+ for (n = original_minsize; n < line_size; n++)
{
visible_line[n] = 0;
invisible_line[n] = 1;