summaryrefslogtreecommitdiff
path: root/cmd-line-utils/readline/display.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd-line-utils/readline/display.c')
-rw-r--r--cmd-line-utils/readline/display.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd-line-utils/readline/display.c b/cmd-line-utils/readline/display.c
index 46b57325e33..b8b7ac445e6 100644
--- a/cmd-line-utils/readline/display.c
+++ b/cmd-line-utils/readline/display.c
@@ -524,14 +524,26 @@ rl_redisplay ()
wrap_offset = prompt_invis_chars_first_line = 0;
}
+#if defined (HANDLE_MULTIBYTE)
#define CHECK_INV_LBREAKS() \
do { \
if (newlines >= (inv_lbsize - 2)) \
{ \
inv_lbsize *= 2; \
inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
+ _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \
} \
} while (0)
+#else
+#define CHECK_INV_LBREAKS() \
+ do { \
+ if (newlines >= (inv_lbsize - 2)) \
+ { \
+ inv_lbsize *= 2; \
+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
+ } \
+ } while (0)
+#endif
#if defined (HANDLE_MULTIBYTE)
#define CHECK_LPOS() \