summaryrefslogtreecommitdiff
path: root/lisp/longlines.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2005-11-20 05:17:27 +0000
committerChong Yidong <cyd@stupidchicken.com>2005-11-20 05:17:27 +0000
commitcee723fbf90394a695e87ef9348d2907aa1cac65 (patch)
tree5224531f3e984bd925da77773f88b09643e694c4 /lisp/longlines.el
parent1271a058af5d3290abfde5b564a41df40881f5f2 (diff)
downloademacs-cee723fbf90394a695e87ef9348d2907aa1cac65.tar.gz
longlines.el (longlines-wrap-line): Preserve marker positions.
Diffstat (limited to 'lisp/longlines.el')
-rw-r--r--lisp/longlines.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 85358207a2b..93f3daa4ee8 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -239,9 +239,10 @@ end of the buffer."
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)