From: Daniel Jacobowitz <drow@false.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Denis PILAT <denis.pilat@st.com>,
Andrew STUBBS <andrew.stubbs@st.com>,
gdb-patches@sources.redhat.com, bash-maintainers@gnu.org
Subject: Re: [readline-mingw] backspace key and TUI size
Date: Fri, 24 Feb 2006 18:44:00 -0000 [thread overview]
Message-ID: <20060224140144.GA24232@nevyn.them.org> (raw)
In-Reply-To: <ud5hd9mtw.fsf@gnu.org>
On Fri, Feb 24, 2006 at 10:34:51AM +0200, Eli Zaretskii wrote:
> > First, GDB disables paging because tgetnum ("li") fails, so it assumes
> > we're in a non-console environment.
>
> You will see that the DJGPP port ifdef's around that code in utils.c.
>
> > Next, readline sets cols to 79 instead of 80 because we don't have
> > both automatic margins ("am") and ignored newlines beyond the automatic
> > margins ("xn"). This causes utils.c to start printing the prompt
> > at the last column of the previous line instead of the first column
> > of the next line.
>
> This part I don't understand: it doesn't happen with DJGPP, AFAICS,
> but I don't see any ifdefs in the code to explain the difference. Can
> you post a short test case that exhibits this problem, and show the
> code that causes utils.c to print the prompt at the wrong place?
This happens because you bypass rl_get_screen_size. Therefore you
use the "real" screen size, rather than readline's adjusted view of it.
Therefore you print the prompt when you've filled column 80, instead
of column 79. The relevant bit of code in readline is:
if (_rl_term_autowrap == 0)
_rl_screenwidth--;
and:
_rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
Readline decreases the screen width by one every time you cal
rl_set_screen_size, and supplies the decremented value back for
rl_get_screen_size; GDB relies on (A) having automatic margins,
and (B) having the full screen size.
I guess there are some ways I could get around this...
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-02-24 14:01 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-08 8:03 Denis PILAT
2006-02-08 13:43 ` Daniel Jacobowitz
2006-02-08 16:03 ` Denis PILAT
2006-02-08 16:05 ` Bob Rossi
2006-02-08 16:14 ` Daniel Jacobowitz
2006-02-08 16:30 ` Chet Ramey
2006-02-08 16:48 ` Andrew STUBBS
2006-02-08 16:51 ` Daniel Jacobowitz
2006-02-08 17:04 ` Chet Ramey
2006-02-08 17:13 ` Daniel Jacobowitz
2006-02-08 17:54 ` Eli Zaretskii
2006-02-08 17:09 ` Eli Zaretskii
2006-02-08 17:30 ` Andrew STUBBS
2006-02-08 17:40 ` Daniel Jacobowitz
2006-02-09 9:36 ` Denis PILAT
2006-02-09 13:49 ` Daniel Jacobowitz
2006-02-10 15:41 ` Denis PILAT
2006-02-10 18:52 ` Eli Zaretskii
2006-02-20 15:36 ` Daniel Jacobowitz
2006-02-23 18:25 ` Daniel Jacobowitz
2006-02-24 8:36 ` Eli Zaretskii
2006-02-24 18:44 ` Daniel Jacobowitz [this message]
2006-02-24 18:48 ` Eli Zaretskii
2006-02-24 19:29 ` Daniel Jacobowitz
2006-02-25 11:35 ` Eli Zaretskii
2006-02-08 17:56 ` Eli Zaretskii
2006-02-08 18:03 ` Daniel Jacobowitz
2006-02-08 16:28 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060224140144.GA24232@nevyn.them.org \
--to=drow@false.org \
--cc=andrew.stubbs@st.com \
--cc=bash-maintainers@gnu.org \
--cc=denis.pilat@st.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox