GNU bug report logs -
#20701
25.0.50; [PATCH] (vertical-motion 0) broken at display strings after newline
Previous Next
Reported by: Wolfgang Jenkner <wjenkner <at> inode.at>
Date: Sun, 31 May 2015 14:51:04 UTC
Severity: normal
Tags: patch
Found in version 25.0.50
Fixed in version 25.1
Done: Wolfgang Jenkner <wjenkner <at> inode.at>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 20701 <at> debbugs.gnu.org (full text, mbox):
> Cc: Eli Zaretskii <eliz <at> gnu.org>
> From: Wolfgang Jenkner <wjenkner <at> inode.at>
> Date: Sun, 31 May 2015 16:19:46 +0200
>
> If you run the following snippet in emacs -Q point will end up at the
> first line of the "Test" buffer, but it should stay at the second line.
>
> (with-current-buffer (generate-new-buffer "Test")
> (pop-to-buffer (current-buffer))
> (insert "x\n")
> (save-excursion
> (insert (propertize "x" 'display "x")))
> (sit-for 1)
> (vertical-motion 0))
>
> On the other hand, non-zero arguments for vertical-motion seem to work
> correctly, as long as the buffer contains only ASCII characters before
> the propertized "x".
>
> Otherwise
>
> (with-current-buffer (generate-new-buffer "Test")
> (pop-to-buffer (current-buffer))
> (insert "\né\n")
> (save-excursion
> (insert (propertize "x" 'display "x")))
> (sit-for 1)
> (vertical-motion -1))
>
> Here, point should go to the second line but it goes to the first line.
>
> The following patch tries to fix both issues.
>
> -- >8 --
> Subject: [PATCH] * src/indent.c (Fvertical_motion): Fix a case of motion by 0
> lines.
>
> Starting from a display string after a newline, point went to the
> previous line.
>
> Also, correct an inadvertent use of a buffer position with FETCH_BYTE.
Looks good to me, please push.
Thanks.
This bug report was last modified 9 years and 359 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.