aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/longlines.el21
1 files changed, 5 insertions, 16 deletions
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 943ee80cc0b..9da3de217ab 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -396,22 +396,11 @@ that has changed."
396 "Perform line wrapping on the parts of the buffer that have changed. 396 "Perform line wrapping on the parts of the buffer that have changed.
397This is called by `post-command-hook' after each command." 397This is called by `post-command-hook' after each command."
398 (when longlines-wrap-beg 398 (when longlines-wrap-beg
399 (cond ((or (eq this-command 'yank) 399 (if (or (eq this-command 'yank)
400 (eq this-command 'yank-pop)) 400 (eq this-command 'yank-pop))
401 (longlines-decode-region (point) (mark t)) 401 (longlines-decode-region (point) (mark t)))
402 (if longlines-showing 402 (if longlines-showing
403 (longlines-show-region (point) (mark t)))) 403 (longlines-show-region longlines-wrap-beg longlines-wrap-end))
404 (longlines-showing
405 (cond ((eq this-command 'newline)
406 (save-excursion
407 (if (search-backward "\n" nil t)
408 (longlines-show-region
409 (match-beginning 0) (match-end 0)))))
410 ((eq this-command 'open-line)
411 (save-excursion
412 (if (search-forward "\n" nil t)
413 (longlines-show-region
414 (match-beginning 0) (match-end 0))))))))
415 (unless (or (eq this-command 'fill-paragraph) 404 (unless (or (eq this-command 'fill-paragraph)
416 (eq this-command 'fill-region)) 405 (eq this-command 'fill-region))
417 (longlines-wrap-region longlines-wrap-beg longlines-wrap-end)) 406 (longlines-wrap-region longlines-wrap-beg longlines-wrap-end))