public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>,
	Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Subject: [PING^2][PATCH] [gdb/build] Remove dependency on _rl_term_autowrap
Date: Mon, 19 Jun 2023 13:55:31 +0200	[thread overview]
Message-ID: <d016d3de-dc58-5934-8094-d9e5e5b70b7f@suse.de> (raw)
In-Reply-To: <2cf11592-e95c-2e3e-9449-e70eafffe804@suse.de>

On 5/16/23 10:53, Tom de Vries via Gdb-patches wrote:
> On 5/1/23 09:45, Tom de Vries wrote:
>> [ was: Re: [pushed] [gdb/tui] Fix TUI resizing for TERM=ansi ]
>>
>> On 4/30/23 21:15, Tom Tromey wrote:
>>>>>>>> "Tom" == Tom de Vries via Gdb-patches 
>>>>>>>> <gdb-patches@sourceware.org> writes:
>>>
>>> Tom> As it happens, when TERM is set to ansi, readline decides that 
>>> the terminal
>>> Tom> cannot auto-wrap lines, and reserves one column to deal with 
>>> that, and as a
>>> Tom> result reports back one less than the actual screen width:
>>> ...
>>> Tom> This is currently not causing trouble in testing because we have 
>>> a workaround
>>> Tom> in place in proc Term::resize.  If we disable the workaround:
>>>
>>> Thank you for tracking this down.
>>> I never even considered this might be a readline issue.
>>>
>>> Tom> +      readline_hidden_cols = _rl_term_autowrap ? 0 : 1;
>>>
>>> I hate to have a new dependency on a readline internal variable.
>>
>> Agreed, it's ugly.
>>
>>> Don't some distros mark these as hidden in libreadline.so?
>>> I feel like there was another bug along these lines.
>>>
>>
>> That's probably PR10723 - "Dependency on readline internal variable" ( 
>> https://sourceware.org/bugzilla/show_bug.cgi?id=10723 ).
>>
>>> However, I don't see another way to do it.
>>
>> I had an earlier version of the patch that used the COLUMNS env 
>> variable instead.  It felt a bit hacky, so I went for 
>> _rl_term_autowrap, but patch attached below goes back to the COLUMNS 
>> approach.  WDYT?
>>
> 

Ping^2.

Thanks,
- Tom

> 
> If this is not acceptable, I'll bring up making the variable public on 
> the readline mailing list.
> 
> Thanks,
> - Tom
> 
>>> Maybe some official API could be added by the upstream readline.
>>> Would you want to bring it up there?
>>>
>>
>> If we commit the patch below, then this is solved for 
>> _rl_term_autowrap, but not for the other instances.
>>
>> I expect bringing it up will will need to be done per instance, with a 
>> detailed explanation of why we need it, so that sounds like project I 
>> don't have time for atm.
>>
>>> Anyway it seems ok to me.
>>
>> Thanks for the review.
>>
>> - Tom
> 


  reply	other threads:[~2023-06-19 11:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30 11:06 [pushed] [gdb/tui] Fix TUI resizing for TERM=ansi Tom de Vries
2023-04-30 19:15 ` Tom Tromey
2023-05-01  7:45   ` [PATCH] [gdb/build] Remove dependency on _rl_term_autowrap Tom de Vries
2023-05-16  8:53     ` [PING][PATCH] " Tom de Vries
2023-06-19 11:55       ` Tom de Vries [this message]
2023-12-15 19:46     ` [PATCH] " Tom Tromey

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=d016d3de-dc58-5934-8094-d9e5e5b70b7f@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).