summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2012-11-07 06:48:12 -0800
committerAnas Nashif <anas.nashif@intel.com>2012-11-07 06:48:12 -0800
commit1f99c936f42034b9e5a9f7e62644546af5084da8 (patch)
treeb9517572ab102cd93a45653d83dc8b786b5302ca
parentd93d4f85e18e68d3ae5da2a0b1e85e275b898b44 (diff)
downloadreadline-1f99c936f42034b9e5a9f7e62644546af5084da8.tar.gz
readline-1f99c936f42034b9e5a9f7e62644546af5084da8.tar.bz2
readline-1f99c936f42034b9e5a9f7e62644546af5084da8.zip
wrap
-rw-r--r--display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/display.c b/display.c
index 2a482ef..10bb017 100644
--- a/display.c
+++ b/display.c
@@ -677,7 +677,10 @@ rl_redisplay ()
inv_lbreaks[++newlines] = temp;
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- lpos -= _rl_col_width (local_prompt, n0, num);
+ {
+ if (local_prompt_len > 0)
+ lpos -= _rl_col_width (local_prompt, n0, num);
+ }
else
#endif
lpos -= _rl_screenwidth;