From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#37667: 27.0.50; Tab Bar display problems with more than 5 tabs Date: Thu, 17 Oct 2019 10:20:57 +0300 Message-ID: <83blufdehy.fsf@gnu.org> 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> <87pniwuwj5.fsf@mail.linkov.net> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="175893"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37667@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 17 09:22:10 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 1iL06s-000jcG-4K for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Oct 2019 09:22:10 +0200 Original-Received: from localhost ([::1]:38436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL06r-0000Ip-2E for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Oct 2019 03:22:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36819) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL06k-0000I5-Sq for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 03:22:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iL06j-0000tt-Uu for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 03:22:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38221) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iL06j-0000ti-Rn for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 03:22:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iL06j-0001Oc-Lw for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 03:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Oct 2019 07:22:01 +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.15712968845325 (code B ref 37667); Thu, 17 Oct 2019 07:22:01 +0000 Original-Received: (at 37667) by debbugs.gnu.org; 17 Oct 2019 07:21:24 +0000 Original-Received: from localhost ([127.0.0.1]:47042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iL068-0001Np-1D for submit@debbugs.gnu.org; Thu, 17 Oct 2019 03:21:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iL064-0001Na-N1 for 37667@debbugs.gnu.org; Thu, 17 Oct 2019 03:21:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:60126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iL05z-0000Va-Iw; Thu, 17 Oct 2019 03:21:15 -0400 Original-Received: from [176.228.60.248] (port=2397 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iL05y-0000Sw-Ub; Thu, 17 Oct 2019 03:21:15 -0400 In-reply-to: <87pniwuwj5.fsf@mail.linkov.net> (message from Juri Linkov on Thu, 17 Oct 2019 01:39:27 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:169531 Archived-At: > From: Juri Linkov > Cc: 37667@debbugs.gnu.org > Date: Thu, 17 Oct 2019 01:39:27 +0300 > > 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? You should look for that in the glyphs, not in the string you want to display. > Actually, it seems I found it, it's it.last_visible_x. Is this correct? it.last_visible_x is the first pixel that is _outside_ of the viewport. The last pixel that is still visible has X coordinate one less than that. Also note that when a screen line (a.k.a. "glyph row") is hscrolled, its display doesn't starts when it.current_x is zero, it starts when it.current_x is it.first_visible_x.