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: Sat, 02 Nov 2019 21:28:44 +0200 Message-ID: <83lfsyhyc3.fsf@gnu.org> References: <83o8yrvzgh.fsf@gnu.org> <87lftlk504.fsf@mail.linkov.net> <83eezceir2.fsf@gnu.org> <87pniwuwj5.fsf@mail.linkov.net> <83blufdehy.fsf@gnu.org> <878spj57dk.fsf@mail.linkov.net> <83v9sm8rs3.fsf@gnu.org> <87blubaw63.fsf@mail.linkov.net> <83zhhu34xz.fsf@gnu.org> <8736fl91vp.fsf@mail.linkov.net> <834l0024lr.fsf@gnu.org> <87eez4pjfk.fsf@mail.linkov.net> <83ftjjzbln.fsf@gnu.org> <87d0egpjec.fsf@mail.linkov.net> <83sgnbpxq6.fsf@gnu.org> <871ruvax4p.fsf@mail.linkov.net> <835zk6p6ki.fsf@gnu.org> <87v9s53h6o.fsf@mail.linkov.net> <83imo5ng1d.fsf@gnu.org> <87o8xwskw6.fsf@mail.linkov.net> <83o8xwm484.fsf@gnu.org> <874kzm2j4y.fsf@mail.linkov.net> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="244498"; 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 Sat Nov 02 20:29:13 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 1iQz5E-0011Ve-V9 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Nov 2019 20:29:13 +0100 Original-Received: from localhost ([::1]:50212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQz5D-0004x7-1V for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Nov 2019 15:29:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33210) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQz56-0004wE-H5 for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2019 15:29:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQz55-0007DX-GX for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2019 15:29:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52539) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQz55-0007DS-Dd for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2019 15:29:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQz54-00054B-8L for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2019 15:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Nov 2019 19:29: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.157272293019451 (code B ref 37667); Sat, 02 Nov 2019 19:29:02 +0000 Original-Received: (at 37667) by debbugs.gnu.org; 2 Nov 2019 19:28:50 +0000 Original-Received: from localhost ([127.0.0.1]:33127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQz4r-00053f-L6 for submit@debbugs.gnu.org; Sat, 02 Nov 2019 15:28:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52333) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQz4p-00053Q-Vv for 37667@debbugs.gnu.org; Sat, 02 Nov 2019 15:28:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQz4k-0006yp-7W; Sat, 02 Nov 2019 15:28:42 -0400 Original-Received: from [176.228.60.248] (port=2142 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQz4j-0000Bo-2M; Sat, 02 Nov 2019 15:28:42 -0400 In-reply-to: <874kzm2j4y.fsf@mail.linkov.net> (message from Juri Linkov on Sat, 02 Nov 2019 21:06:05 +0200) 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:170844 Archived-At: > From: Juri Linkov > Cc: 37667@debbugs.gnu.org > Date: Sat, 02 Nov 2019 21:06:05 +0200 > > > . Always display both of them, but make one or both of them do > > nothing when scrolling in that direction makes no sense. > > Or maybe to disable (visually using a grey shadow) the button > that can't do scrolling? Yes, possible. > > . Display one arrow on the left and another on the right, and decide > > whether or not to display the right one in display_mode_line, > > depending on whether you hit (last_visible_x - arrow_width) while > > producing glyphs. > > Do you mean displaying the arrow on the right using fringe? No, I meant displaying them like you do now, just move the right arrow to the right of the last visible tab. > > The first one sounds the easiest to me. > > The first one is easy to implement, but it can't do auto-scrolling, > i.e. when the current tab becomes invisible, automattically reduce > the number of tabs in front of it to make it visible. Is that such a serious problem? Browsers don't auto-scroll. > > If you want to implement the last one, then you need a function > > that calls display_mode_line and returns a truncation indication > > depending on the state of it.glyph_row->truncated_on_right_p. The > > simplest way to achieve that is to add a new argument to > > display_mode_line, which, when non-NULL, will be a pointer to the flag > > where to return to the caller the truncation indication; then make > > display_mode_line set that flag according to the truncated_on_right_p > > flag. > > Modifying display_mode_line is one way. I thought maybe simpler > would be to copy some relevant code from display_mode_line > to a new function. I think you end up copying almost all of it. But if I'm wrong, sure, that's possible.