Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] readline woes?

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Lyon Lemmens <redlemon AT knoware.nl>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] readline woes?
  • Date: Mon, 30 Aug 2004 22:47:29 +0200

Not in the habit of talking to myself, but I sent this messages to the
readline/bash bug list and got the following answer:

<quote>
> Since the last update of the readline library to 5.0 I'm experiencing
> random line wraps in my bash sessions.

Try this patch from Chet.

diff -ur readline-5.0-orig/display.c readline-5.0/display.c
--- readline-5.0-orig/display.c 2004-05-27 22:57:29.000000000 -0400
+++ readline-5.0/display.c 2004-07-28 19:32:42.110683600 -0400
@@ -351,14 +351,14 @@
local_prompt = expand_prompt (p, &prompt_visible_length,
&prompt_last_invisible,
(int *)NULL,
- (int *)NULL);
+ &prompt_physical_chars);
c = *t; *t = '\0';
/* The portion of the prompt string up to and including the
final newline is now null-terminated. */
local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length,
(int *)NULL,

&prompt_invis_chars_first_lin
e,
- &prompt_physical_chars);
+ (int *)NULL);
*t = c;
return (prompt_prefix_length);
}

> my PS1 is set as follows:
> PS1='\e[1m[\h:$PWD]\e[0m\n\u> '

Escape sequences such as \e[1m should be wrapped in \[...\] so as not
to confuse readline about the cursor position.


paul
</quote>


I tried this and it solved the problem.


On Monday 30 August 2004 14:17, Lyon Lemmens wrote:
> fellow SMGL users,
>
> is anybody experiencing wierd line wraps since the last update of the
> readline library?
>
> my xterm, konsole and even a normal console window will wrap the first
> line at some arbitrary point:
>
> wraps here
> [obelix:/home/llemmens] V
> llemmens> lllllllllllllllllllllllllllllllllllllllllllllll
> lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
>l
>
> It appears to depend on the length of the prompt: If I go to a deep
> directory:
>
> [obelix:/usr/lib/mozilla/chrome/calendar/skin/classic/calendar]
> llemmens> lllllll
> lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
>l
>
> And then if I go even further it looks as if my stack is overwritten:
>
> [obelix:/usr/lib/mozilla/chrome/calendar/skin/classic/calendar/timepicker
>] fd /wapsw-setcabs cd ..lllemmens> lllllllllllll
> ^^^^^^^^^^^^^^^^^^^^^^^^
> this is junk that appears out of the blue and changes on each next
> character entry.

--
Lyon Lemmens
redlemon AT knoware.nl




Archive powered by MHonArc 2.6.24.

Top of Page