;;; To reproduce the problem: ;;; * emacs -Q ;;; * visit this text in a buffer ;;; * M-x eval-buffer ;;; * C-n through the buffer until Emacs freezes, on the long "xxx...xxx" line ;;; short line ;;; long line long line long line long line long line long line long line long line long line long line ;;; short line ;;; xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ;;; short line (progn ;; (find-file "~/tmp/longline.txt-BAD-1") (visual-line-mode 1) ;; wrap-prefix for second line is 100 spaces (put-text-property 199 302 'wrap-prefix (make-string 100 32)) ;; wrap-prefix for fourth line is 100 spaces (put-text-property 318 422 'wrap-prefix (make-string 100 32)) ) ;;; Emacs freezes, uses 100% of CPU, and is unresponsive to C-g keystrokes. ;;; From cursory experimentation, the problem seems to occur when both the ;;; wrap-prefix, and a single word, are longer than the Emacs window is wide.