On 4/28/10 4:47 PM, McConnaughey, Bill wrote:
> I made some additions to readline-6.1 in order to record what goes in and 
> out, so that I can
> debug a misbehaving graphical interface. The record reveals a probable bug, 
> but I don't know
> enough about curses to tell whether the bug is in there or in readline.
> 
> Consistently seen pattern, when prefer-visible-bell is On
> Left column is from the log file made by readline with my changes; 
> explanations are added at the right
> 
> i1 ^[                                   I pushed the cursor-left key
> i1 [
> i1 D
> o3 tputs[1](^H)                         readline emitted a backspace
> o1 ^H
> i1 ^[                                   I pushed the cursor-left key, but I 
> was already at the start of the line
> i1 [
> i1 D
> o10 tputs(^[[?5h^[[?5l$<200/>)          readline issued the visible bell 
> sequence via tputs in rl_ding
> o1 ^[
> o1 [
> o1 ?
> o1 5
> o1 h
> o1 ^[
> o1 [
> o1 ?
> o1 5
> o1 l
> o1 ^@                                   and it is followed by exactly 853 
> nuls's
> o1 ^@
> o1 ^@
> o1 ^@
> .....
> o1 ^@

You can test this fairly easily.  Run gdb on your program (from another
terminal using `attach', if necessary), set a breakpoint in rl_ding,
wait for it to hit, and examine the value of _rl_visible_bell.  If it
doesn't include 853 NUL characters, the problem must be tputs padding
the output.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    [email protected]    http://cnswww.cns.cwru.edu/~chet/


_______________________________________________
Bug-readline mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to