From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.bugs Subject: bug#36858: 27.0.50; display bugs with display-fill-column-indicator-mode Date: Fri, 9 Aug 2019 00:29:14 +0200 Message-ID: <20190808222914.m74jdlmkkrntzzzv@Ergus> References: <83wofwexkr.fsf@gnu.org> <20190805152747.4vyzejqoiy33l4ou@Ergus> <83tvatavmh.fsf@gnu.org> <20190807162033.hpphf2pbfo4p6vam@Ergus> <83h86taq4v.fsf@gnu.org> <20190807170654.b6wsccs3b2acduff@Ergus> <83ef1wc2ae.fsf@gnu.org> <20190807194621.6ankodv7hclbvmdz@Ergus> <20190808071758.csjonc4flbh44muj@Ergus> <83zhkja7f1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="jwexlioz2rtz6jyb" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="71379"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: 36858@debbugs.gnu.org, rotim.davor@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 09 00:30:19 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 1hvqvG-000IHk-T4 for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Aug 2019 00:30:15 +0200 Original-Received: from localhost ([::1]:55424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvqvA-0005mJ-5A for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Aug 2019 18:30:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47540) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvqv5-0005lz-VQ for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2019 18:30:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvqv5-0002Hh-8p for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2019 18:30:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33027) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvqv4-0002HX-Qm for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2019 18:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hvqv4-0003EO-Lk for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2019 18:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Aug 2019 22:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36858 X-GNU-PR-Package: emacs Original-Received: via spool by 36858-submit@debbugs.gnu.org id=B36858.156530336812323 (code B ref 36858); Thu, 08 Aug 2019 22:30:02 +0000 Original-Received: (at 36858) by debbugs.gnu.org; 8 Aug 2019 22:29:28 +0000 Original-Received: from localhost ([127.0.0.1]:41848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvquV-0003Cg-UV for submit@debbugs.gnu.org; Thu, 08 Aug 2019 18:29:28 -0400 Original-Received: from sonic304-23.consmr.mail.ir2.yahoo.com ([77.238.179.148]:37123) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvquT-0003CM-Cj for 36858@debbugs.gnu.org; Thu, 08 Aug 2019 18:29:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1565303359; bh=PwtPDqqoS0yZquQAHOOIMUI6XW0FxYE38uOcHsiTe9M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=jCiDvSBIxq0jSq9Srq06gWvrw8F9miDDm4RvDtw0SytbEAg4bGyRQRpDKWMsJDWaLEdWMlWhbAX/T1fmitngToZtufhMHBXBOMnALdOpW9ed2Fi6r1Pl0jdF1MAzMk6U7rRmIEcG1FbqM7tHIuC1Z5EH71WQreXgesoFRX/iVIJFaQgOs/g+ZSN3HtiU8A7TJlCr8ra85TUqzRwjRUKQo3p4DVqU/IGQCMgt02kpLIylJ4eK7doYtKo/3zoNxlrwircred8qQuN+m2FSYBtq5y4p37gwMPzJH7M5UBl/pWvWvidNIk1BfOIdCsMsXUdFXnyMNtWACqinKZqFDcYuqA== X-YMail-OSG: 8GboX8cVM1kvGZglfCniljOFSnFBsHjF6BBHAKaRdaPLTkAgiU0gzgdiymeEDcK aAe2hxP_hqEg7aJfTvVRkQvMGbA5AKX_UBBisko..Kee8x4DvDKDT32BaVDQzF1HEK1HecFBwZd3 6sogOOLycO5ZuwMGQqpkSdn0tiYu5NMo1oLYIRDQziMX66OZrVhSEq2Zk_wG6_igau9HYKxGhhwW e7N3pETB5ESsgrT03697W81JKWNrr7W0.ozycl5jaVdFK1XsRAuZz.VYgxZt3EyEHEovfI0nzVEO _PS7pFk2254gwy_LhaA0sjhm8eXQZoyCVK5viTDkIoAs3MFxK73ulUnlSxUtpUaIlFiMUnTCboRR pLVHySHLZYrB5elbvsQSuxL2W1I6obsBYY04VPzLKaTT8Hbg5vNom_EPP03SN2.ZM_30sQipn8Rt oM6vlsE4bWhmpo6h0QbIiqQChZJBzYmPJYnVYq2u_3ajp_6ev9YC5SCJrJTxrOCLY_yz5ajRcxHF PlqoPLKFQ_Kx7KM6fNkgji7ntAeheDVSOgWs7D1RiBl9j8eU0HLF61b5LrI6qBz2Dj8_9NsqjYRE vpudfx6oD3npSeEwSD.ASwE8A.syTNOX5I1Uq0EfE8ZEKbCjRpl2SiXkM_gTBrG11PyIvgFMYu_Z vpCFbUn5owfIhSzL3rDByWAtlZpWyXn0qM6PvbzzLy7rt_sxlwTC866r6UBlqBF4Bu6XHA8wCoGB pTPznmMNejrlwA.SBYEtr6WfqodxOTYqQmj5T9Ai8sgX3u.BrQkwYjlEcmG9KE9WDij0vuKX017C PMAypNzhnC2EJUEKZaDTSaWpeO3KH5YtOoCiuKKpZa Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Thu, 8 Aug 2019 22:29:19 +0000 Original-Received: by smtp432.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 773d750f5e59415c6c3961c4c6f4ede5; Thu, 08 Aug 2019 22:29:18 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83zhkja7f1.fsf@gnu.org> 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:164782 Archived-At: --jwexlioz2rtz6jyb Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On Thu, Aug 08, 2019 at 08:33:38PM +0300, Eli Zaretskii wrote: >> Date: Thu, 8 Aug 2019 09:17:58 +0200 >> From: Ergus >> Cc: 36858@debbugs.gnu.org, rotim.davor@gmail.com >> >> After tying this solution I proposed yesterday to add the indicator also >> for the latest line (call extend_face_to_end_of_line for a no empty line >> without \n too) I get it working perfectly fine only in the tui >> interface. >> >> In gui it just doesn't work. But it seems that the issue is not due to >> the condition: >> >> if (!get_next_display_element (it)); >> >> because when I add a test glyph unconditionally there; it is not printed >> in the screen, but when I add a message to stdout it is. >> >> For sure I am missing something here, but what? >> >> Is it possible that some optimization in the gui glue code stops >> printing glyphs OR that some later code hides the extra glyphs? > >I don't think I understand what you tried well enough to answer the >question. Can you show a patch relative to the current master? > See the attachement >Thanks. --jwexlioz2rtz6jyb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="last_line.patch" diff --git a/src/xdisp.c b/src/xdisp.c index 7338d2b7d4..a39f2e0bd9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -21837,17 +21837,17 @@ display_line (struct it *it, int cursor_vpos) buffer reached. */ if (!get_next_display_element (it)) { - bool row_has_glyphs = false; + const bool row_has_glyphs = row_text_area_empty (row); /* Maybe add a space at the end of this line that is used to display the cursor there under X. Set the charpos of the first glyph of blank lines not corresponding to any text to -1. */ if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it)) row->exact_window_width_line_p = true; - else if ((append_space_for_newline (it, true) + else if (row_has_glyphs + ||(append_space_for_newline (it, true) && row->used[TEXT_AREA] == 1) - || row->used[TEXT_AREA] == 0 - || (row_has_glyphs = row_text_area_empty (row))) + || row->used[TEXT_AREA] == 0) { row->glyphs[TEXT_AREA]->charpos = -1; /* Don't reset the displays_text_p flag if we are @@ -21878,7 +21878,8 @@ display_line (struct it *it, int cursor_vpos) background color. */ if (row->reversed_p || lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID) - != DEFAULT_FACE_ID) + != DEFAULT_FACE_ID + || !row_has_glyphs) extend_face_to_end_of_line (it); break; } --jwexlioz2rtz6jyb--