From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 5b5608c614: Fix glyph skipping optimization when a tab line is enabled Date: Mon, 18 Apr 2022 10:41:50 +0300 Message-ID: <83ilr6x2gx.fsf@gnu.org> References: <83k0bmx3ke.fsf@gnu.org> <87bkwykfs5.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1151"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 18 09:42:47 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ngM23-00009r-Cn for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Apr 2022 09:42:47 +0200 Original-Received: from localhost ([::1]:43282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ngM22-0002nQ-2r for ged-emacs-devel@m.gmane-mx.org; Mon, 18 Apr 2022 03:42:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngM1O-00023c-JQ for emacs-devel@gnu.org; Mon, 18 Apr 2022 03:42:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngM1O-0007Fy-9n; Mon, 18 Apr 2022 03:42:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=wQpD47novV6/jl/K3cFtsUM61qlsAcvVtPSIlBdSkpc=; b=X+7Mx7YCfSmi 7dF5inrNxUpzkkOzGealxEdG7BeLt8lJb9W6WrFblb3+w87y42H1xd40IE7hIVIwS9MKhZ/H87tkC zAZIGU9T9ZeN6PgQzzYU6sJdPHScihhqPeLfoGxskPnIY1eDSfMLx69nQll6ko9V31eIrwfreYmm5 L3afEmS/kG6+W3hg2IqLVU1qqiCUe7hvoHHBTuiryFgmRiHN+Gp4yKDfyEaqWd6mbO7LHiBrSBhTo 7M/zGqMJdVQ9Ba7PzJC31PncD6CAEEMZsUy1biHGlMFPWZJIUIZ9G7sWwkzMoK/EZycMB1CvN1Aj5 4N33QRCXj1vNvxz7hHyKpg==; Original-Received: from [87.69.77.57] (port=1608 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ngM1L-0003Dm-FB; Mon, 18 Apr 2022 03:42:03 -0400 In-Reply-To: <87bkwykfs5.fsf@yahoo.com> (message from Po Lu on Mon, 18 Apr 2022 15:32:42 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:288607 Archived-At: > From: Po Lu > Cc: emacs-devel@gnu.org > Date: Mon, 18 Apr 2022 15:32:42 +0800 > > >> diff --git a/src/dispnew.c b/src/dispnew.c > >> index 0d95904..3cfe1b8 100644 > >> --- a/src/dispnew.c > >> +++ b/src/dispnew.c > >> @@ -3928,9 +3928,12 @@ update_text_area (struct window *w, struct glyph_row *upd > >> However, it causes excessive flickering when mouse is moved > >> across the mode line. Luckily, turning it off for the mode > >> line doesn't seem to hurt anything. -- cyd. > >> - But it is still needed for the header line. -- kfs. */ > >> + But it is still needed for the header line. -- kfs. > >> + The header line vpos is 1 if a tab line is enabled. (18th > >> + Apr 2022) */ > >> || (current_row->mouse_face_p > >> - && !(current_row->mode_line_p && vpos > 0)) > >> + && !(current_row->mode_line_p > >> + && (vpos > w->current_matrix->tab_line_p))) > >> || current_row->x != desired_row->x) > >> { > >> output_cursor_to (w, vpos, 0, desired_row->y, desired_row->x); > > > > I'm not sure I understand this change. What exactly is the problem, > > and how to reproduce it? What if there's no header-line, but there is > > a tab-line, or vice versa, or both are displayed? > > Not sure, but the previous code would also trigger for just tab lines, > but not also the header line if there was a tab line. > > Here is how to reproduce the problem this fixes: turn on > global-tab-line-mode, open Info, type "m cl RET g Predicates RET", then > click on the "e" in the "Next: Control Structure" link on the header > line. "Next:" will continue to be displayed in the mouse face even > though the mouse is no longer on any link, due to the "glyph-skipping" > optimization that is normally disabled for the header and tab lines > being used. OK, and what about the last question I asked above? If there's no header-line, but there is a tab-line, the code will still compare vpos with 1, although the vpos of the tab-line is now zero, right?