# HG changeset patch # User Chong Yidong # Date 1152801910 0 # Node ID 0048306da39ef461dde43c7deefd080bbc0dfe9b # Parent b20203b004f8243769e52f08a303a5cbc0b16b07 simplify last fix. diff -r b20203b004f8 -r 0048306da39e lisp/longlines.el --- a/lisp/longlines.el Thu Jul 13 13:43:50 2006 +0000 +++ b/lisp/longlines.el Thu Jul 13 14:45:10 2006 +0000 @@ -396,22 +396,11 @@ "Perform line wrapping on the parts of the buffer that have changed. This is called by `post-command-hook' after each command." (when longlines-wrap-beg - (cond ((or (eq this-command 'yank) - (eq this-command 'yank-pop)) - (longlines-decode-region (point) (mark t)) - (if longlines-showing - (longlines-show-region (point) (mark t)))) - (longlines-showing - (cond ((eq this-command 'newline) - (save-excursion - (if (search-backward "\n" nil t) - (longlines-show-region - (match-beginning 0) (match-end 0))))) - ((eq this-command 'open-line) - (save-excursion - (if (search-forward "\n" nil t) - (longlines-show-region - (match-beginning 0) (match-end 0)))))))) + (if (or (eq this-command 'yank) + (eq this-command 'yank-pop)) + (longlines-decode-region (point) (mark t))) + (if longlines-showing + (longlines-show-region longlines-wrap-beg longlines-wrap-end)) (unless (or (eq this-command 'fill-paragraph) (eq this-command 'fill-region)) (longlines-wrap-region longlines-wrap-beg longlines-wrap-end))