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.bugs Subject: bug#56683: 29.0.50; long lines fix doesn't work correctly when lines are truncated Date: Fri, 22 Jul 2022 14:54:37 +0300 Message-ID: <835yjpl5vm.fsf@gnu.org> References: <87h73ab8bo.fsf@gmail.com> <83zgh2kzlo.fsf@gnu.org> <83y1wlllnc.fsf@gnu.org> <83mtd1li6o.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1762"; mail-complaints-to="usenet@ciao.gmane.io" Cc: andreyorst@gmail.com, 56683@debbugs.gnu.org, gregory@heytings.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jul 22 13:55:11 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oErFP-0000Hq-2S for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 13:55:11 +0200 Original-Received: from localhost ([::1]:33782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oErFO-00038c-4B for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 22 Jul 2022 07:55:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oErFG-00037w-9A for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 07:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oErFG-0003cu-0T for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 07:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oErFF-0000hl-R7 for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2022 07:55: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: Fri, 22 Jul 2022 11:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56683 X-GNU-PR-Package: emacs Original-Received: via spool by 56683-submit@debbugs.gnu.org id=B56683.16584908992695 (code B ref 56683); Fri, 22 Jul 2022 11:55:01 +0000 Original-Received: (at 56683) by debbugs.gnu.org; 22 Jul 2022 11:54:59 +0000 Original-Received: from localhost ([127.0.0.1]:40317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oErFD-0000hO-4I for submit@debbugs.gnu.org; Fri, 22 Jul 2022 07:54:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oErFA-0000h6-R4 for 56683@debbugs.gnu.org; Fri, 22 Jul 2022 07:54:57 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34464) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oErF5-0003bE-7f; Fri, 22 Jul 2022 07:54:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=AV/Bo6egeu+C5jRWmzjDEePRxLmYNxH0FnNDurgTLWA=; b=p51iWCoHoIF4NpTcZmvZ lONZaI5dlndf7cIbXNLQ2JAsBYzm9+KGHikBpRzOmazl3AdwBZMcqajWsriTFobi63ELrvDNeJVqZ 6P9T2J0mH8yPI8lKkXzjr3p64XyUZgk1DtS0n0W+DcmxyrRiVZa35ben+mi8yZN1D6v4ppAoBoZyZ AuTAPxir1poAisL9Ov96ganhzgeGqqZ6WZkZFf9IDU9l6R7T42DWHKQ7XInuupcbk1CzVr74WaWhg c6H7kPereXY6sRbqH/9+UOpyVKGGqSsiNOERHvc7dbIW+6kqFPP/ZzX/6u7WZf36wifpmY4/rspJo iwTYtZ3RJgjM8Q==; Original-Received: from [87.69.77.57] (port=1243 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 1oErEw-0000Bf-Jo; Fri, 22 Jul 2022 07:54:49 -0400 In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Fri, 22 Jul 2022 09:52:16 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237615 Archived-At: > From: Gerd Möllmann > Cc: andreyorst@gmail.com, 56683@debbugs.gnu.org, gregory@heytings.org > Date: Fri, 22 Jul 2022 09:52:16 +0200 > > Eli Zaretskii writes: > > >> From: Gerd Möllmann > >> If we really want infinity, how about setting last_visible_x to -1 in > >> that case. But that requires checking/changing some places where > >> the iterator pisition is tested against last_visible_x. > > > > I don't really see how this could help in general, because the > > current_x member (what you call the "iterator position") will still > > overflow at some point, and we can no longer do any layout decisions > > for the X coordinate after that. > > > > Or what am I missing? > > You were asking for a good value of DISP_OMEGA, that's at least what I > understood. My answer is -1, plus code changes. > > That current_x can overflow is something completely different, IMO. But > now I'm cautious enough to ask what do you mean? Overflowing which > bound? I read this as integer overflow, integer = the data type. Yes, integer overflow. This code: init_to_row_start (&it, w, cursor_row); if (hscl) it.first_visible_x = window_hscroll_limited (w, it.f) * FRAME_COLUMN_WIDTH (it.f); it.last_visible_x = DISP_INFINITY; move_it_in_display_line_to (&it, pt, -1, MOVE_TO_POS); will keep producing glyphs inside move_it_in_display_line_to until it gets to the position of point. While producing glyphs, it.current_x is incremented by the pixel-width of each produced glyph. After a large enough number of produced glyphs, it.current_x will overflow INT_MAX. > >> Your "ticks" check kicks in should be burn to much time because of the > >> infinite last x, right? > > > > Sorry, I don't think I understand what you are asking here. Please > > elaborate or rephrase. > > The thing you implemented in set_iterator_to_next we talked about. > > if (max_redisplay_ticks > 0) > update_redisplay_ticks (1, it->w); I understood that part, but not the "should be burn to much time because of the infinite last x" part, even if I replace "to" with "too".