From c9dd9f41486532c8fa517b5d63ccc208e00fb8cd Mon Sep 17 00:00:00 2001 From: des Date: Sun, 24 May 1998 13:06:38 +0000 Subject: Hopefully fix behaviour of libreadline when prompt is longer than screen width and contains invisible characters. PR: gnu/6701 Submitted-by: Chet Ramey chet@po.cwru.edu --- contrib/libreadline/display.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'contrib') diff --git a/contrib/libreadline/display.c b/contrib/libreadline/display.c index edb5b20..e9d4277 100644 --- a/contrib/libreadline/display.c +++ b/contrib/libreadline/display.c @@ -423,7 +423,14 @@ rl_redisplay () contents of the command line? */ while (lpos >= screenwidth) { +#if 0 temp = ((newlines + 1) * screenwidth) - ((newlines == 0) ? wrap_offset : 0); +#else + /* XXX - possible fix from Darin Johnson for prompt + string with invisible characters that is longer than the screen + width. */ + temp = ((newlines + 1) * screenwidth) + ((newlines == 0) ? wrap_offset : 0); +#endif inv_lbreaks[++newlines] = temp; lpos -= screenwidth; } -- cgit v1.1