[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-readline] nul's from tputs(called by rl_ding) when prefer_visib
From: |
Chet Ramey |
Subject: |
Re: [Bug-readline] nul's from tputs(called by rl_ding) when prefer_visible_bell is On |
Date: |
Thu, 29 Apr 2010 22:49:19 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1 |
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 address@hidden http://cnswww.cns.cwru.edu/~chet/