aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2007-04-12 14:40:46 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2007-04-12 14:40:46 +0000
commitfe4cca3e28d67256c2b8fff1a4cc2fdac6ed7bb3 (patch)
tree0409c191811dbb5e1ed449de108b0e6d02e5738d
parenta05ab6e2bb35402b2bae034a6487dd3955ede7da (diff)
downloadsrc-fe4cca3e28d67256c2b8fff1a4cc2fdac6ed7bb3.tar.gz
src-fe4cca3e28d67256c2b8fff1a4cc2fdac6ed7bb3.zip
Official patch 002 imported
Notes
Notes: svn path=/vendor/libreadline/dist/; revision=168664
-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 fe08861da73c..8097919f4e28 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() \