From unknown Wed Aug 20 05:16:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61580: line-prefix and display text properties cause odd cursor movement Resent-From: Darius Foo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2023 17:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61580 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 61580@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167665407332366 (code B ref -1); Fri, 17 Feb 2023 17:15:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Feb 2023 17:14:33 +0000 Received: from localhost ([127.0.0.1]:41448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT4Jb-0008Px-Rz for submit@debbugs.gnu.org; Fri, 17 Feb 2023 12:14:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:38852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT3n4-0007EK-KF for submit@debbugs.gnu.org; Fri, 17 Feb 2023 11:40:54 -0500 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 1pT3my-0003cM-Rj for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 11:40:48 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pT3mx-0000Eq-8v for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 11:40:48 -0500 Received: by mail-pj1-x102b.google.com with SMTP id q14-20020a17090a430e00b00233d7314c1cso1936522pjg.5 for ; Fri, 17 Feb 2023 08:40:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=HwnbuVGmiSKS/OhK8x2ToicRGRnLQfkuMsPT7tJCbkE=; b=h4ZI/CPZXOr0whlTwf7xbKuuBnTzTMznp5qCLfShtkzhytLXxCAAUW81uKBWQsLP2L 1hbGBMT8j386J25lpUqYtDT89hrEaHIEUXzDagB4HosfiADmeKBmbCYxp8Wf5UsieDry iXkh7fecjYek1b1KgqQ7p704DfxhHSqMAIObh8coSb3yDm/C4KyQOKZ1LwsWOJemDaW3 lmzmzkM3rUqNJLwGPpjd7WKsb0B+tabSl35tc4IEPJZulnFsNkGIXP+CDlu2tblSlB4d /Ux9Roa0J3hyJAdJd0kQNwUFlgBt+2WoLeJrFdZ9VsbHqmEJiMxtzAvqhAK1ScdUwYfl xtJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HwnbuVGmiSKS/OhK8x2ToicRGRnLQfkuMsPT7tJCbkE=; b=GCm3nIOkYaHvGNOYtqCw/W8r0Ri9thbLbbpS1s9op2fiu+kAfw/urQ5WDEyqDalthy b3VAUFC2Kfbs33Zb/1nW4ldefywMLY4bM4/7XJaYWJuZR64iLWs8xFHSL45zkCzyAriS UTJetGyGrlTM0tu1bPIA4ZhK+fGG1Hr/OlocTiWDx/QgbLCbJowk1H/ZrW/4T8OLbzAR k4OrfLDIMqR4iVzNbKKHNKTNjUCUiMzoPxUAO30Zda2FeaolQxVUZ/pOFS/jnId9UuLx O0g/PSzxzMclrHNvoMNmHec00mFjqQFTfpCcyDMR+8xCXC+bnL2djnTaGLWwfNKkmQSx cC8g== X-Gm-Message-State: AO0yUKV5xA72OhDxXQTO5ckkIhyoj75n8QUZuKaedp/WCrTaUrfDaZAa w2yMAD8Z6jn+upckCLoDNgI8pPAduqEiCR3V/ztC03My X-Google-Smtp-Source: AK7set+zoRQ4dZ/Na+fjpLpx5Smf2mtOBdsE0ZsG510cC5VkaAIeYSfJ7vhQtBDTvin/dRu2oWBLqkdy+VNWFWuMFd4= X-Received: by 2002:a17:90b:1c90:b0:233:c5a0:7f38 with SMTP id oo16-20020a17090b1c9000b00233c5a07f38mr1916400pjb.23.1676652045515; Fri, 17 Feb 2023 08:40:45 -0800 (PST) MIME-Version: 1.0 From: Darius Foo Date: Sat, 18 Feb 2023 00:39:00 +0800 Message-ID: Content-Type: multipart/alternative; boundary="00000000000095c21105f4e7f921" Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=darius.foo.tw@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Fri, 17 Feb 2023 12:14:31 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --00000000000095c21105f4e7f921 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 "=E2=80=A2")) (add-text-properties 27 28 '(display "=E2=80=A2")) (add-text-properties 57 58 '(display "=E2=80=A2")) (add-text-properties 72 73 '(display "=E2=80=A2")) 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. --00000000000095c21105f4e7f921 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When moving the cursor up and down on lines which have bot= h line-prefix and display text properties, the cursor column isn't pres= erved, jumping ahead or back by a fixed amount.

This can be reproduc= ed with the following config

=C2=A0 =C2=A0 =C2=A0 (add-text-properti= es 12 13 '(line-prefix " =C2=A0"))
=C2=A0 =C2=A0 =C2=A0 (a= dd-text-properties 27 28 '(line-prefix " =C2=A0"))
=C2=A0 = =C2=A0 =C2=A0 (add-text-properties 57 58 '(line-prefix " =C2=A0 = =C2=A0"))
=C2=A0 =C2=A0 =C2=A0 (add-text-properties 72 73 '(lin= e-prefix " =C2=A0 =C2=A0"))

=C2=A0 =C2=A0 =C2=A0 (add-text= -properties 12 13 '(display "=E2=80=A2"))
=C2=A0 =C2=A0 = =C2=A0 (add-text-properties 27 28 '(display "=E2=80=A2"))
= =C2=A0 =C2=A0 =C2=A0 (add-text-properties 57 58 '(display "=E2=80= =A2"))
=C2=A0 =C2=A0 =C2=A0 (add-text-properties 72 73 '(displa= y "=E2=80=A2"))

and this input file (which mimics org-inde= nt).

=C2=A0 =C2=A0 * h1
=C2=A0 =C2=A0 ** h2
=C2=A0 =C2=A0 - a.= y.........
=C2=A0 =C2=A0 - x...........
=C2=A0 =C2=A0 *** h3
=C2= =A0 =C2=A0 **** h4
=C2=A0 =C2=A0 - ....w.......
=C2=A0 =C2=A0 - 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 ind= entation added by line-prefix: with the cursor on z, pressing up moves it t= o w.
--00000000000095c21105f4e7f921-- From unknown Wed Aug 20 05:16:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61580: line-prefix and display text properties cause odd cursor movement Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2023 11:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61580 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Darius Foo Cc: 61580@debbugs.gnu.org Received: via spool by 61580-submit@debbugs.gnu.org id=B61580.16767205564402 (code B ref 61580); Sat, 18 Feb 2023 11:43:01 +0000 Received: (at 61580) by debbugs.gnu.org; 18 Feb 2023 11:42:36 +0000 Received: from localhost ([127.0.0.1]:42660 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTLbw-00018w-EN for submit@debbugs.gnu.org; Sat, 18 Feb 2023 06:42:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTLbv-00018j-90 for 61580@debbugs.gnu.org; Sat, 18 Feb 2023 06:42:35 -0500 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 1pTLbp-0001Sj-WE; Sat, 18 Feb 2023 06:42:30 -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=qjlyNZOk0TIrgJQguZtAe2DzP/PB2wq3rYmQnt9pG9I=; b=QPO26LH39DeXwWZdAD9T 4muWLxZPbY54nyu8p9J7SCIJmGBCDMr3jEVK94ZRelteX+Pyrpf4liTEws+e9hoo+f+QvowlGPdCc zaBySnXx57fM/LwGeeyl8cD7EtM0gI9VQOqD9bLL/+1QQPjBniNoG7tAsb8gJvW2DlTngxlRznhLa /gjya+n8LvyOV7G2bMxYsq5/qD45/XNgg2e7UJzE7ek4VJZ5v1sHlLt+fhO+GCcs0otZrCU5Q94Rg V6zChOLE2WHXMYPta9rpGVv2LLkTjV15LL0Yvi3EKNDM5OmRQUGcQ0ujuEHv7+N1+gsQ14V5YQaHQ sM3O3tjWpvcpCg==; 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 1pTLbp-00085K-Fz; Sat, 18 Feb 2023 06:42:29 -0500 Date: Sat, 18 Feb 2023 13:42:31 +0200 Message-Id: <83h6vjyzbs.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Darius Foo on Sat, 18 Feb 2023 00:39:00 +0800) References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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.) From unknown Wed Aug 20 05:16:40 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Darius Foo Subject: bug#61580: closed (Re: bug#61580: line-prefix and display text properties cause odd cursor movement) Message-ID: References: <83jzzze96p.fsf@gnu.org> X-Gnu-PR-Message: they-closed 61580 X-Gnu-PR-Package: emacs Reply-To: 61580@debbugs.gnu.org Date: Thu, 02 Mar 2023 10:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1677753122-3409-1" This is a multi-part message in MIME format... ------------=_1677753122-3409-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #61580: line-prefix and display text properties cause odd cursor movement which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 61580@debbugs.gnu.org. --=20 61580: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D61580 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1677753122-3409-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 61580-done) by debbugs.gnu.org; 2 Mar 2023 10:31:34 +0000 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 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 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==; 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 Date: Thu, 02 Mar 2023 12:31:26 +0200 Message-Id: <83jzzze96p.fsf@gnu.org> From: Eli Zaretskii To: darius.foo.tw@gmail.com In-Reply-To: <83h6vjyzbs.fsf@gnu.org> (message from Eli Zaretskii on Sat, 18 Feb 2023 13:42:31 +0200) Subject: Re: bug#61580: line-prefix and display text properties cause odd cursor movement References: <83h6vjyzbs.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61580-done Cc: 61580-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. ------------=_1677753122-3409-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 17 Feb 2023 17:14:33 +0000 Received: from localhost ([127.0.0.1]:41448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT4Jb-0008Px-Rz for submit@debbugs.gnu.org; Fri, 17 Feb 2023 12:14:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:38852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pT3n4-0007EK-KF for submit@debbugs.gnu.org; Fri, 17 Feb 2023 11:40:54 -0500 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 1pT3my-0003cM-Rj for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 11:40:48 -0500 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pT3mx-0000Eq-8v for bug-gnu-emacs@gnu.org; Fri, 17 Feb 2023 11:40:48 -0500 Received: by mail-pj1-x102b.google.com with SMTP id q14-20020a17090a430e00b00233d7314c1cso1936522pjg.5 for ; Fri, 17 Feb 2023 08:40:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=HwnbuVGmiSKS/OhK8x2ToicRGRnLQfkuMsPT7tJCbkE=; b=h4ZI/CPZXOr0whlTwf7xbKuuBnTzTMznp5qCLfShtkzhytLXxCAAUW81uKBWQsLP2L 1hbGBMT8j386J25lpUqYtDT89hrEaHIEUXzDagB4HosfiADmeKBmbCYxp8Wf5UsieDry iXkh7fecjYek1b1KgqQ7p704DfxhHSqMAIObh8coSb3yDm/C4KyQOKZ1LwsWOJemDaW3 lmzmzkM3rUqNJLwGPpjd7WKsb0B+tabSl35tc4IEPJZulnFsNkGIXP+CDlu2tblSlB4d /Ux9Roa0J3hyJAdJd0kQNwUFlgBt+2WoLeJrFdZ9VsbHqmEJiMxtzAvqhAK1ScdUwYfl xtJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HwnbuVGmiSKS/OhK8x2ToicRGRnLQfkuMsPT7tJCbkE=; b=GCm3nIOkYaHvGNOYtqCw/W8r0Ri9thbLbbpS1s9op2fiu+kAfw/urQ5WDEyqDalthy b3VAUFC2Kfbs33Zb/1nW4ldefywMLY4bM4/7XJaYWJuZR64iLWs8xFHSL45zkCzyAriS UTJetGyGrlTM0tu1bPIA4ZhK+fGG1Hr/OlocTiWDx/QgbLCbJowk1H/ZrW/4T8OLbzAR k4OrfLDIMqR4iVzNbKKHNKTNjUCUiMzoPxUAO30Zda2FeaolQxVUZ/pOFS/jnId9UuLx O0g/PSzxzMclrHNvoMNmHec00mFjqQFTfpCcyDMR+8xCXC+bnL2djnTaGLWwfNKkmQSx cC8g== X-Gm-Message-State: AO0yUKV5xA72OhDxXQTO5ckkIhyoj75n8QUZuKaedp/WCrTaUrfDaZAa w2yMAD8Z6jn+upckCLoDNgI8pPAduqEiCR3V/ztC03My X-Google-Smtp-Source: AK7set+zoRQ4dZ/Na+fjpLpx5Smf2mtOBdsE0ZsG510cC5VkaAIeYSfJ7vhQtBDTvin/dRu2oWBLqkdy+VNWFWuMFd4= X-Received: by 2002:a17:90b:1c90:b0:233:c5a0:7f38 with SMTP id oo16-20020a17090b1c9000b00233c5a07f38mr1916400pjb.23.1676652045515; Fri, 17 Feb 2023 08:40:45 -0800 (PST) MIME-Version: 1.0 From: Darius Foo Date: Sat, 18 Feb 2023 00:39:00 +0800 Message-ID: Subject: line-prefix and display text properties cause odd cursor movement To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="00000000000095c21105f4e7f921" Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=darius.foo.tw@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 17 Feb 2023 12:14:31 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --00000000000095c21105f4e7f921 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 "=E2=80=A2")) (add-text-properties 27 28 '(display "=E2=80=A2")) (add-text-properties 57 58 '(display "=E2=80=A2")) (add-text-properties 72 73 '(display "=E2=80=A2")) 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. --00000000000095c21105f4e7f921 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When moving the cursor up and down on lines which have bot= h line-prefix and display text properties, the cursor column isn't pres= erved, jumping ahead or back by a fixed amount.

This can be reproduc= ed with the following config

=C2=A0 =C2=A0 =C2=A0 (add-text-properti= es 12 13 '(line-prefix " =C2=A0"))
=C2=A0 =C2=A0 =C2=A0 (a= dd-text-properties 27 28 '(line-prefix " =C2=A0"))
=C2=A0 = =C2=A0 =C2=A0 (add-text-properties 57 58 '(line-prefix " =C2=A0 = =C2=A0"))
=C2=A0 =C2=A0 =C2=A0 (add-text-properties 72 73 '(lin= e-prefix " =C2=A0 =C2=A0"))

=C2=A0 =C2=A0 =C2=A0 (add-text= -properties 12 13 '(display "=E2=80=A2"))
=C2=A0 =C2=A0 = =C2=A0 (add-text-properties 27 28 '(display "=E2=80=A2"))
= =C2=A0 =C2=A0 =C2=A0 (add-text-properties 57 58 '(display "=E2=80= =A2"))
=C2=A0 =C2=A0 =C2=A0 (add-text-properties 72 73 '(displa= y "=E2=80=A2"))

and this input file (which mimics org-inde= nt).

=C2=A0 =C2=A0 * h1
=C2=A0 =C2=A0 ** h2
=C2=A0 =C2=A0 - a.= y.........
=C2=A0 =C2=A0 - x...........
=C2=A0 =C2=A0 *** h3
=C2= =A0 =C2=A0 **** h4
=C2=A0 =C2=A0 - ....w.......
=C2=A0 =C2=A0 - 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 ind= entation added by line-prefix: with the cursor on z, pressing up moves it t= o w.
--00000000000095c21105f4e7f921-- ------------=_1677753122-3409-1-- From unknown Wed Aug 20 05:16:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#61580: line-prefix and display text properties cause odd cursor movement Resent-From: Darius Foo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2023 04:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61580 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 61580-done@debbugs.gnu.org Received: via spool by 61580-done@debbugs.gnu.org id=D61580.167781845823148 (code D ref 61580); Fri, 03 Mar 2023 04:41:02 +0000 Received: (at 61580-done) by debbugs.gnu.org; 3 Mar 2023 04:40:58 +0000 Received: from localhost ([127.0.0.1]:59405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXxE1-00061H-HT for submit@debbugs.gnu.org; Thu, 02 Mar 2023 23:40:57 -0500 Received: from mail-pj1-f50.google.com ([209.85.216.50]:36650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXwoe-0005MW-1Z for 61580-done@debbugs.gnu.org; Thu, 02 Mar 2023 23:14:45 -0500 Received: by mail-pj1-f50.google.com with SMTP id cp7-20020a17090afb8700b0023756229427so4936765pjb.1 for <61580-done@debbugs.gnu.org>; Thu, 02 Mar 2023 20:14:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677816878; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eS8wdUJ7i8QiWRsL6rR5vJ5VwiWcEZrTtpKc3hs5GkQ=; b=ikqD67qOStGNVQNgSEgFIvfogom+rB9DH5RVoSllfhPD9LzGNgANbytRZzLUnSzOP3 p9KEu3vIVd2ZMtPNBzRkLqaBCwPamnTGxVASsQBYRON5Je4eW6JL/kAzgESKMWiencHS RO8Yx9MqQYNgxmZMiHYec+k2hHELjyCUrbCnjLsyxKwDYQpmMDZgppAcusVerQqlXIYX nHmgqk5qDi+sQoBvMpm9CTj2Nv/PWTYt1zGCtB3WyE5FvjuQtwf5xKq6iKv5aeFv3iXd agFQOWAo4XHVEslGiGZhTo3v5GlWIh+pYnmDeNQ4dDtHLParRdzFUJyMvzQjMgRvXz5w +5XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677816878; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eS8wdUJ7i8QiWRsL6rR5vJ5VwiWcEZrTtpKc3hs5GkQ=; b=mKGwjYYuqmhG5Vs8+581g6Tfgssh22bmUXOcLQ5w54WatjKNyTSy3DskihlmTvpDS+ IkeQvvumNaQnHquZiiDNpEj2onC44J1n9ZLSHw+ktG0obJ43hfdC47+ecONb1TrDJLN2 aUGHHM9utfDdbGDAC85sYLvWeFNrfGpan+I444tIMQin+BThcCPW6AJ0zwxuJaZQnkB5 RK6U50aco00SpnpSx5+S84qt6duCTKY4tP4BkzxFNP92f5HHVjtuqTQJVyfWUp938Hs/ wJpZ4bpUP1kOJs9TDUWdLYfsgeuxhxDigh5XuVzi3LHHe55UDDGWczUPCU10BejWOxjY 0kCQ== X-Gm-Message-State: AO0yUKXTqZNF11APxBi54RoBn0kFNT8EXRq+3AcQ8XQPrCgB6Pdk9W3I obyOqf9H0oekevFrZIv2pxpZeUTUCkkIPud32YFrT+rk5Ds= X-Google-Smtp-Source: AK7set9O7rJemnvcdzqT7FU02HRBb1p5rhztcHFXWTbF0gKa/D7jty1GeR2VoRjezJ8h8jK6CAvX7kMVbb9Z5VQcr9w= X-Received: by 2002:a17:902:ef95:b0:19b:8be:33dc with SMTP id iz21-20020a170902ef9500b0019b08be33dcmr222475plb.6.1677816878050; Thu, 02 Mar 2023 20:14:38 -0800 (PST) MIME-Version: 1.0 References: <83h6vjyzbs.fsf@gnu.org> <83jzzze96p.fsf@gnu.org> In-Reply-To: <83jzzze96p.fsf@gnu.org> From: Darius Foo Date: Fri, 3 Mar 2023 12:14:00 +0800 Message-ID: Content-Type: multipart/alternative; boundary="00000000000003b21b05f5f72f61" X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Thu, 02 Mar 2023 23:40:57 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --00000000000003b21b05f5f72f61 Content-Type: text/plain; charset="UTF-8" > No further comments, so I'm now closing this bug as fixed. Yes, it works now. Thanks for fixing it so quickly! --00000000000003b21b05f5f72f61 Content-Type: text/html; charset="UTF-8"
> No further comments, so I'm now closing this bug as fixed.

Yes, it works now. Thanks for fixing it so quickly!
--00000000000003b21b05f5f72f61--