From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 735C63858D28 for ; Mon, 19 Jun 2023 11:55:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 735C63858D28 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-out2.suse.de (Postfix) with ESMTPS id AD6CC1F38D; Mon, 19 Jun 2023 11:55:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1687175735; 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=9XgIkGyw+EIdvIh6T0d6WnEXb2cH0jjTrfW5NCytTAc=; b=P2m8pj3DrYA0zIJNwJT6LC/rFyawp5mzO9Q6MwCNffG3BMynOlExYitJx+QSKV69js62Y9 dn2zA+a3korwmaT/fcGOxUt1xnYedZ9LOvbrbMNP3IgEiycE+fXa6qiQ7PSv0Zi45EcUFY +ptKjxmeJYyIsEURMKJsAPK+3VGi0O8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1687175735; 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=9XgIkGyw+EIdvIh6T0d6WnEXb2cH0jjTrfW5NCytTAc=; b=inwPaPP+V1ABmdYdIxkoHHb8W1LQqv0suFLHGFVQMBRAnw4zLQ8pGK8AoDPPxV1ySq8TUh pjXXfwnZ9KqXSHAw== 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 98605138E8; Mon, 19 Jun 2023 11:55:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 278pJDdCkGRSZAAAMHmgww (envelope-from ); Mon, 19 Jun 2023 11:55:35 +0000 Message-ID: Date: Mon, 19 Jun 2023 13:55:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: [PING^2][PATCH] [gdb/build] Remove dependency on _rl_term_autowrap Content-Language: en-US To: Tom Tromey , Tom de Vries via Gdb-patches References: <20230430110647.975-1-tdevries@suse.de> <878re9mbb2.fsf@tromey.com> <2cf11592-e95c-2e3e-9449-e70eafffe804@suse.de> From: Tom de Vries In-Reply-To: <2cf11592-e95c-2e3e-9449-e70eafffe804@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 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/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 >>>>>>>> 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 >