* longlines.el (longlines-post-command-function): Handle open-line
authorChong Yidong <cyd@stupidchicken.com>
Wed, 12 Jul 2006 23:52:18 +0000 (23:52 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Wed, 12 Jul 2006 23:52:18 +0000 (23:52 +0000)
too.

lisp/ChangeLog
lisp/longlines.el

index 57a5913..b23e8b5 100644 (file)
@@ -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.
index b11d4e6..943ee80 100644 (file)
@@ -401,11 +401,17 @@ This is called by `post-command-hook' after each command."
            (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))