From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#28936: move_it_in_display_line_to returns MOVE_POS_MATCH_OR_ZV before ZV Date: Sun, 22 Oct 2017 22:20:32 -0700 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: blaine.gmane.org 1508736096 857 195.159.176.226 (23 Oct 2017 05:21:36 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Oct 2017 05:21:36 +0000 (UTC) Cc: 28936@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 23 07:21:32 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6VAy-00078g-Ka for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Oct 2017 07:21:25 +0200 Original-Received: from localhost ([::1]:36896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6VB5-0005JP-Qk for geb-bug-gnu-emacs@m.gmane.org; Mon, 23 Oct 2017 01:21:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6VAf-00057l-R3 for bug-gnu-emacs@gnu.org; Mon, 23 Oct 2017 01:21:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6VAc-0000jF-Lg for bug-gnu-emacs@gnu.org; Mon, 23 Oct 2017 01:21:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47817) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6VAc-0000j6-Hn for bug-gnu-emacs@gnu.org; Mon, 23 Oct 2017 01:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e6VAc-0004LN-87 for bug-gnu-emacs@gnu.org; Mon, 23 Oct 2017 01:21:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 23 Oct 2017 05:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28936 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28936-submit@debbugs.gnu.org id=B28936.150873603816654 (code B ref 28936); Mon, 23 Oct 2017 05:21:02 +0000 Original-Received: (at 28936) by debbugs.gnu.org; 23 Oct 2017 05:20:38 +0000 Original-Received: from localhost ([127.0.0.1]:56498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6VAE-0004KY-5e for submit@debbugs.gnu.org; Mon, 23 Oct 2017 01:20:38 -0400 Original-Received: from gateway22.websitewelcome.com ([192.185.47.65]:12933) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e6VAB-0004KQ-VK for 28936@debbugs.gnu.org; Mon, 23 Oct 2017 01:20:36 -0400 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 59A251DC6D for <28936@debbugs.gnu.org>; Mon, 23 Oct 2017 00:20:34 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id 6VA9e9HCypOTv6VAAexf9U; Mon, 23 Oct 2017 00:20:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EaE/IHZ4rXUq5BbtzWRY7GVjCO9l+bDgXO7SPXOjxh4=; b=EoKBLc0j5UwIz4yJSbGxO22AWt Np8JAfa1ow0ew12QkxQ0EC8z0GZhKw1+tFFQnzwHAPCCuxt1zDPbhETpOEW/nelwRzh+N7gzOnAIB In7icK4bxN1nrSqMblzDZbUO0MZFIKGgWn/ybhVvadetZE8/fV3bb1kgQ3W0BDPZpMV/J6QGo/Xf2 elVY0Ba6qtFR1kBUy9uMXdZq7sUf0fBKNYf7PKjzCkApH5IKCqGKJajLiUdiUAvIte9vkGa9Md3Th k8JCmQg9hN2DmKsto7XzLlzIyml/fHyImlbQAYp555IvSTahV0ZcJkdEv1c/RveuB4RwL55Q5Ixxi 10ZwxRyQ==; Original-Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:50949 helo=server.private) by gator3053.hostgator.com with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.87) (envelope-from ) id 1e6VA9-002bt0-IT; Mon, 23 Oct 2017 00:20:33 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.239.195 X-Exim-ID: 1e6VA9-002bt0-IT X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: cpe-45-48-239-195.socal.res.rr.com (server.private) [45.48.239.195]:50949 X-Source-Auth: lawlist X-Email-Count: 1 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes 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: 208.118.235.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:138876 Archived-At: I was able to verify this evening that it.current_x is indeed 0 immediately following a call to `move_it_by_lines (&it, 0)` when the issue is present. It may be that move_it_in_display_line_to is reaching the correct X, but is merely throwing the wrong label/result in this situation -- i.e., it is not really reaching a POS or ZV. Since my loop was relying on the label/result, the loop exited too early. To test the correct X and wrong label/result theory, would take some time for me to work on because I would like to find the precise location inside move_it_in_display_line_to where the label/result is being returned. I will continue to think about this and tinker ... Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DATE: [10-22-2017 12:53:47] <22 Oct 2017 22:53:47 +0300> FROM: Eli Zaretskii > > > Date: Sun, 22 Oct 2017 11:05:45 -0700 > > From: Keith David Bershatsky > > Cc: 28936@debbugs.gnu.org > > > > SET_TEXT_POS_FROM_MARKER (start_text_position, w->start); > > start_display (&it, w, start_text_position); > > move_it_to (&it, PT, it.last_visible_x, it.last_visible_y - 1, -1, MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); > > target_x = it.current_x; > > move_it_by_lines (&it, 0); > > Did you verify that it.current_x is zero after this line? If not, you > will not get to the right X coordnate here: > > > rc = move_it_in_display_line_to_x (w, &it, target_x);