Subject: bug#23570: 25.1.50; Cursor motion error with visual-line-mode

From: Eli Zaretskii <[email-masked]>
Date: Sat, 21 May 2016 12:39:09 +0300

> From: Chong Yidong <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 20 May 2016 09:54:17 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > the first word that wraps to the next screen line is followed by more
> > than one whitespace character.  In your recipe, that would be the 2
> > spaces in "ABCDEFGHIJK MOPQ".
> 
> Yes, the two whitespaces on the wrapped line seem to be necessary to
> trigger the bug.
> 
> > I wonder what your real-life use cases where
> 
> I came across this while editing a LaTeX document, and the two white
> spaces that triggered the bug were the usual two spaces after a full
> stop.  I'd previously noticed the bug on a couple of occasions, sometime
> after the Emacs 24.4 release, but didn't manage to get a reproducible
> recipe until now.

Thanks, I've pushed a fix to the master branch (commit 99848b3).
Please test.

(I think this change is too low-level to be safe for the emacs-25
branch at this late stage of pretest.)