summaryrefslogtreecommitdiffstats
path: root/contrib/libreadline
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2007-04-12 14:40:46 +0000
committerache <ache@FreeBSD.org>2007-04-12 14:40:46 +0000
commit0248be3adabadb1c2affdd61f665e5d6299438e1 (patch)
tree0409c191811dbb5e1ed449de108b0e6d02e5738d /contrib/libreadline
parent3b508ff372ed3c4f0015f13e243db9b97770cf2a (diff)
downloadFreeBSD-src-0248be3adabadb1c2affdd61f665e5d6299438e1.zip
FreeBSD-src-0248be3adabadb1c2affdd61f665e5d6299438e1.tar.gz
Official patch 002 imported
Diffstat (limited to 'contrib/libreadline')
-rw-r--r--contrib/libreadline/display.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/libreadline/display.c b/contrib/libreadline/display.c
index fe08861..8097919 100644
--- a/contrib/libreadline/display.c
+++ b/contrib/libreadline/display.c
@@ -561,14 +561,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 /* HANDLE_MULTIBYTE */
#if defined (HANDLE_MULTIBYTE)
#define CHECK_LPOS() \
OpenPOWER on IntegriCloud