diff options
author | des <des@FreeBSD.org> | 1998-05-24 13:06:38 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 1998-05-24 13:06:38 +0000 |
commit | c9dd9f41486532c8fa517b5d63ccc208e00fb8cd (patch) | |
tree | 3f25029dd49dd83a41a18e391be84671b4f9a42e /contrib | |
parent | f067668263fbff72c865c7b753105988e5dc4690 (diff) | |
download | FreeBSD-src-c9dd9f41486532c8fa517b5d63ccc208e00fb8cd.zip FreeBSD-src-c9dd9f41486532c8fa517b5d63ccc208e00fb8cd.tar.gz |
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
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libreadline/display.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 <darin@acuson.com> 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; } |