From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id D45593851AB9 for ; Tue, 16 May 2023 08:53:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D45593851AB9 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1874321B4A; Tue, 16 May 2023 08:53:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684227224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xe4c7QW8pTfqZyNvlt09LQv56/m78BIhfqZhuyxnBLc=; b=XAl4R60lecjanokjiFu6BmXg12zZIa1XDUiTfbbP4HYlLIgq7G11CJ253g0oIjtM9kDtio RIfvltJ/hNR2OjDCitftuiYgI1hVHc8N+9RfGmo7JdffT9U4Be5ls2FkU7rxZmDEeEUGvS VVqYx+vUa62XhtwGGq8CV1t8IUSrMQA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684227224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xe4c7QW8pTfqZyNvlt09LQv56/m78BIhfqZhuyxnBLc=; b=eMeqmquAlWuSjsReMAm816BWT7lAj2Cja2vAA4v9zaoUB2JsoReFhkZDXxfe1dKBtH1nXm u53wYY0myADCtQDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E808F138F5; Tue, 16 May 2023 08:53:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id glWBN5dEY2RKOAAAMHmgww (envelope-from ); Tue, 16 May 2023 08:53:43 +0000 Message-ID: <2cf11592-e95c-2e3e-9449-e70eafffe804@suse.de> Date: Tue, 16 May 2023 10:53:43 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: [PING][PATCH] [gdb/build] Remove dependency on _rl_term_autowrap From: Tom de Vries To: Tom Tromey , Tom de Vries via Gdb-patches References: <20230430110647.975-1-tdevries@suse.de> <878re9mbb2.fsf@tromey.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 >>>>>>> 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. 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