From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#37667: 27.0.50; Tab Bar display problems with more than 5 tabs Date: Thu, 17 Oct 2019 01:39:27 +0300 Organization: LINKOV.NET Message-ID: <87pniwuwj5.fsf@mail.linkov.net> References: <83o8yrvzgh.fsf@gnu.org> <87imownt6j.fsf@mail.linkov.net> <83eezjrbuj.fsf@gnu.org> <87sgnw2pz3.fsf@mail.linkov.net> <83o8yjke0u.fsf@gnu.org> <87lftnqbmg.fsf@mail.linkov.net> <83h84agytj.fsf@gnu.org> <87tv89opbh.fsf@mail.linkov.net> <83mue1g845.fsf@gnu.org> <83lftlg6zc.fsf@gnu.org> <87lftlk504.fsf@mail.linkov.net> <83eezceir2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="211892"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 37667@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 17 01:02:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iKsJ7-000t0X-CF for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Oct 2019 01:02:17 +0200 Original-Received: from localhost ([::1]:49432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKsJ5-0003y1-JR for geb-bug-gnu-emacs@m.gmane.org; Wed, 16 Oct 2019 19:02:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59802) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKsIv-0003uZ-Lg for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2019 19:02:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKsIt-0006qM-KD for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2019 19:02:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37926) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKsIs-0006pm-CR for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2019 19:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iKsIs-0006Al-3p for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2019 19:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Oct 2019 23:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37667 X-GNU-PR-Package: emacs Original-Received: via spool by 37667-submit@debbugs.gnu.org id=B37667.157126689523688 (code B ref 37667); Wed, 16 Oct 2019 23:02:02 +0000 Original-Received: (at 37667) by debbugs.gnu.org; 16 Oct 2019 23:01:35 +0000 Original-Received: from localhost ([127.0.0.1]:46747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKsIQ-00069y-AZ for submit@debbugs.gnu.org; Wed, 16 Oct 2019 19:01:35 -0400 Original-Received: from brown.elm.relay.mailchannels.net ([23.83.212.23]:42989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKsIK-00069i-L9 for 37667@debbugs.gnu.org; Wed, 16 Oct 2019 19:01:29 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 6DEE321EC8; Wed, 16 Oct 2019 23:01:27 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a26.g.dreamhost.com (100-96-171-212.trex.outbound.svc.cluster.local [100.96.171.212]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D440420D82; Wed, 16 Oct 2019 23:01:26 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a26.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Wed, 16 Oct 2019 23:01:27 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Coil-Versed: 07f30e8459a80eb0_1571266887078_2565877535 X-MC-Loop-Signature: 1571266887078:3469695171 X-MC-Ingress-Time: 1571266887078 Original-Received: from pdx1-sub0-mail-a26.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a26.g.dreamhost.com (Postfix) with ESMTP id 8C4B7800F1; Wed, 16 Oct 2019 16:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=2n6QJoPccjsY7qdMmcLp8wyNlRU=; b= Mk2q2qQlPpr4z4oPQ+WKf4DYYKisVtY39VwVZ71J+I2C91qDUFxak0n1FhLxmPn/ U1JZ38TC6kTtPC9Q4kp9os9ZZvksFWxmgWLng2FzVEwmiF+aUnnITGPVdwmvHv/a VT9tFZZ5KfYhhJ2s8VjlDVCY7yGCornJ+BO+wJ2DMPo= Original-Received: from mail.jurta.org (m91-129-98-153.cust.tele2.ee [91.129.98.153]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a26.g.dreamhost.com (Postfix) with ESMTPSA id 64A28800ED; Wed, 16 Oct 2019 16:01:18 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a26 In-Reply-To: <83eezceir2.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 16 Oct 2019 19:51:29 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:169506 Archived-At: >> But the first question popped up quickly: I don't understand >> how to detect the situation where the tab-line is truncated? > > The situation that it's truncated, or the situation that it _needs_ to > be truncated, i.e. the next tab doesn't fit on the line? > > If the former, the glyph_row->truncated_on_right_p flag should be set. > You can see it being set in display_string, which is called from > display_mode_line. > > If you mean the latter, then look how the truncated_on_right_p flag is > being set in display_line or in other similar display functions, like > display_tab_bar_line. > >> And how to find the tab that is visible partially? >> Especially when the font is variable-pitch. > > I think you will need to walk the glyphs in the tab-line looking for > the last glyph whose character position has the property you put on > tabs in tab-line (as specified in by tab-line-format). Or maybe > tab-line-format should put some special property on the last glyph of > a tab, so that you could look for it more easily? > > Let me know if the above is not detailed enough to get you off the > ground. Thanks for the explanation. One thing that I still don't understand is how to find the exact position in the mode-line string where it's truncated. For example, in the string "...abc|xyz", the part until "abc" is visible, but the rest of the string is truncated, so "xyz" is not visible. How to find this position where truncation occurs? Actually, it seems I found it, it's it.last_visible_x. Is this correct?