changeset 71864:b5cc4afb0853

* longlines.el (longlines-post-command-function): Handle open-line too.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 12 Jul 2006 23:52:18 +0000
parents d38f8a536fd2
children 47930f9fbcdf
files lisp/ChangeLog lisp/longlines.el
diffstat 2 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jul 12 19:07:33 2006 +0000
+++ b/lisp/ChangeLog	Wed Jul 12 23:52:18 2006 +0000
@@ -1,3 +1,8 @@
+2006-07-12  Chong Yidong  <cyd@stupidchicken.com>
+
+	* longlines.el (longlines-post-command-function): Handle open-line
+	too.
+
 2006-07-12  Richard Stallman  <rms@gnu.org>
 
 	* progmodes/grep.el (grep-last-buffer): Doc fix.
--- a/lisp/longlines.el	Wed Jul 12 19:07:33 2006 +0000
+++ b/lisp/longlines.el	Wed Jul 12 23:52:18 2006 +0000
@@ -401,11 +401,17 @@
            (longlines-decode-region (point) (mark t))
            (if longlines-showing
                (longlines-show-region (point) (mark t))))
-          ((and (eq this-command 'newline) longlines-showing)
-           (save-excursion
-             (if (search-backward "\n" nil t)
-                 (longlines-show-region
-                  (match-beginning 0) (match-end 0))))))
+	  (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))))))))
     (unless (or (eq this-command 'fill-paragraph)
                 (eq this-command 'fill-region))
       (longlines-wrap-region longlines-wrap-beg longlines-wrap-end))