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#61580: line-prefix and display text properties cause odd cursor movement Date: Thu, 02 Mar 2023 12:31:26 +0200 Message-ID: <83jzzze96p.fsf@gnu.org> References: <83h6vjyzbs.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="39141"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61580-done@debbugs.gnu.org To: darius.foo.tw@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 02 11:32:14 2023 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 1pXgEQ-000A03-Gz for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Mar 2023 11:32:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pXgEH-0001IE-3u; Thu, 02 Mar 2023 05:32:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXgEF-00019t-1W for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 05:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXgEE-0001L5-O6 for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 05:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pXgEE-0000t8-It for bug-gnu-emacs@gnu.org; Thu, 02 Mar 2023 05:32:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Mar 2023 10:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 61580 X-GNU-PR-Package: emacs Mail-Followup-To: 61580@debbugs.gnu.org, eliz@gnu.org, darius.foo.tw@gmail.com Original-Received: via spool by 61580-done@debbugs.gnu.org id=D61580.16777530943374 (code D ref 61580); Thu, 02 Mar 2023 10:32:02 +0000 Original-Received: (at 61580-done) by debbugs.gnu.org; 2 Mar 2023 10:31:34 +0000 Original-Received: from localhost ([127.0.0.1]:55891 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXgDm-0000sL-3O for submit@debbugs.gnu.org; Thu, 02 Mar 2023 05:31:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXgDk-0000s9-0Z for 61580-done@debbugs.gnu.org; Thu, 02 Mar 2023 05:31:32 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXgDe-0001Fl-9T; Thu, 02 Mar 2023 05:31:26 -0500 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=0eWe/jpb2AvqvfpsozfMEaVnSS3drJxsT1hoN3MygTI=; b=HSXVRP+tsKpl71pUTpXM 4XYiL4w0tT+gwt7nhVncRfEU9/zwMdu9clKYH4vUovOm6T3Qi5jS7Et8Cd17duAXaOvJFo0HSItzc /L0pnLY9EyRurnNT8AF0IpCAlrmgCBUv4WedINsDSNdqJ7O+W961YaAHuAUMi2aFRaoP5A3AqIQBd 2vX8ZnezqenrKJtL+TK4oVDFf1OMceIBd7LNCSQuwdsVA7ItDS7VjNCTWMpP97TUjyYrxyzN4GaNt 9juh91/6hiG4HGPGGaznLw5u0YC8o8iD/3/Fkr2tP4Zl4QwVhVXtRCntx8+qCczHnBPkT0Z/2sRHv mr91tI8W/X9/FQ==; Original-Received: from [87.69.77.57] (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 1pXgDO-0006bG-BJ; Thu, 02 Mar 2023 05:31:25 -0500 In-Reply-To: <83h6vjyzbs.fsf@gnu.org> (message from Eli Zaretskii on Sat, 18 Feb 2023 13:42:31 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257126 Archived-At: > Cc: 61580@debbugs.gnu.org > Date: Sat, 18 Feb 2023 13:42:31 +0200 > From: Eli Zaretskii > > > From: Darius Foo > > Date: Sat, 18 Feb 2023 00:39:00 +0800 > > > > When moving the cursor up and down on lines which have both line-prefix and display text properties, the > > cursor column isn't preserved, jumping ahead or back by a fixed amount. > > > > This can be reproduced with the following config > > > > (add-text-properties 12 13 '(line-prefix " ")) > > (add-text-properties 27 28 '(line-prefix " ")) > > (add-text-properties 57 58 '(line-prefix " ")) > > (add-text-properties 72 73 '(line-prefix " ")) > > > > (add-text-properties 12 13 '(display "•")) > > (add-text-properties 27 28 '(display "•")) > > (add-text-properties 57 58 '(display "•")) > > (add-text-properties 72 73 '(display "•")) > > > > and this input file (which mimics org-indent). > > > > * h1 > > ** h2 > > - a.y......... > > - x........... > > *** h3 > > **** h4 > > - ....w....... > > - z........... > > > > With the cursor on x, pressing up moves it to y instead of a, and pressing down moves it back to x. The > > amount moved depends on the indentation added by line-prefix: with the cursor on z, pressing up moves it to > > w. > > Thanks, should be fixed now on the emacs-29 branch. > > (This bug was a leftover from incomplete fix of bug#49695.) No further comments, so I'm now closing this bug as fixed.