Subject: bug#30432: 26.0.91; freeze when text wrap-prefix exceeds window text width

From: Eli Zaretskii <[email-masked]>
Date: Tue, 20 Mar 2018 19:10:28 +0200

> From: Paul Rankin <[email-masked]>
> Date: Tue, 13 Feb 2018 15:57:16 +1000
> Cc: [email-masked]
> 
> > I agree the result is not good even if Emacs behaves like it does on
> > my system, which is not a total freeze.  I'll try to see if I can find
> > some reasonable way out of this situation.
> 
> A few more bits of info:
> 
> - I think the freeze is entirely temporary, however the time frozen *seems* to increase linearly depending on the number of offending lines, so a buffer with only one or two extending lines might recover in a second or two, but a buffer with many offending lines will appear permanently frozen.
> 
> - Move attempted point motion on offending lines appears to prolong the freeze.
> 
> - The freeze will be very minimal (a second or two) if point skips over the wrap-prefix text entirely, e.g. apply wrap-prefix to lines in the middle of buffer, then M-> to eobp.
> 
> - No freeze occurs if point is at eobp and moves back to bobp with M-< in the same circumstances as above.
> 
> - The freeze will occur if the wrapped text is scrolled into view from below, e.g. same circumstances as above, move point to eobp then mouse wheel up.
> 
> - When point moves to an affected position and things become frozen, the line number in the mode line will display as "??"

Thanks, I think I fixed this.  Please try the latest master branch.

(It turns out wrap-prefix handling already had a smart defense against
such calamities, but it needed help when the prefix was created by the
likes of (space ...) properties.)