GNU bug report logs -
#17585
24.4.50; vertical-motion erroneously adds points
Previous Next
Reported by: Keith David Bershatsky <esq <at> lawlist.com>
Date: Sun, 25 May 2014 07:24:02 UTC
Severity: normal
Found in version 24.4.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 17585-done <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 25 May 2014 00:23:20 -0700
> From: Keith David Bershatsky <esq <at> lawlist.com>
>
> The following test function demonstrates how vertical-motion erroneously adds points when dealing with long lines without spaces that go beyond the window-width:
>
> (defun test ()
> (interactive)
> (switch-to-buffer (get-buffer-create "foo.txt"))
> (text-mode)
> (linum-mode t)
> (visual-line-mode t)
> (dotimes (i (* (window-width) 4))
> (insert ";"))
> (dotimes (i 10)
> (insert "\n"))
> (goto-char (point-min))
> (vertical-motion 1)
> (message "Second Row + 2 points: %s" (current-column))
> (vertical-motion 1)
> (message "Third Row + 4 points: %s" (current-column)))
Fixed in revision 117154 on the emacs-24 branch. The patch is below,
in case you want to try it without waiting for it to be merged to the
trunk.
Thanks.
--- src/xdisp.c 2014-05-24 21:28:43 +0000
+++ src/xdisp.c 2014-05-25 14:18:46 +0000
@@ -8556,7 +8556,7 @@ move_it_in_display_line_to (struct it *i
}
else
{
- if (it->line_wrap == WORD_WRAP)
+ if (it->line_wrap == WORD_WRAP && it->area == TEXT_AREA)
{
if (IT_DISPLAYING_WHITESPACE (it))
may_wrap = 1;
This bug report was last modified 11 years and 54 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.