changeset 67033:1a383aa3be8a

longlines.el (longlines-wrap-line): Preserve marker positions.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 20 Nov 2005 05:17:27 +0000
parents ebf472d3ae22
children c6e50090a202
files lisp/ChangeLog lisp/longlines.el
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Nov 20 03:44:35 2005 +0000
+++ b/lisp/ChangeLog	Sun Nov 20 05:17:27 2005 +0000
@@ -5,6 +5,7 @@
 	(longlines-mode): Turn off longlines temporarily when reverting.
 	Add a message-setup-hook.
 	(longlines-decode-buffer): New function.
+	(longlines-wrap-line): Preserve marker positions.
 
 2005-11-19  Andreas Schwab  <schwab@suse.de>
 
--- a/lisp/longlines.el	Sun Nov 20 03:44:35 2005 +0000
+++ b/lisp/longlines.el	Sun Nov 20 05:17:27 2005 +0000
@@ -239,9 +239,10 @@
 If wrapping is performed, point remains on the line.  If the line does
 not need to be wrapped, move point to the next line and return t."
   (if (longlines-set-breakpoint)
-      (progn (backward-char 1)
-             (delete-char 1)
-             (insert-char ?\n 1)
+      (progn (insert-before-markers ?\n)
+	     (backward-char 1)
+             (delete-char -1)
+	     (forward-char 1)
              nil)
     (if (longlines-merge-lines-p)
         (progn (end-of-line)