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
This commit is contained in:
Dag-Erling Smørgrav 1998-05-24 13:06:38 +00:00
parent b76bc509b9
commit d8ddb9a0ed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36328

View File

@ -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;
}