Browse Source

Protect src overlay during saving the src snipped

* lisp/org-src.el (org-edit-src-exit): Let overlay survive after the
buffer has been saved.
Carsten Dominik 11 years ago
parent
commit
4cd14bd2ff
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lisp/org-src.el

+ 2 - 0
lisp/org-src.el

@@ -757,6 +757,8 @@ with \",*\", \",#+\", \",,*\" and \",,#+\"."
 	(delete-region beg (max beg end))
 	(unless (string-match "\\`[ \t]*\\'" code)
 	  (insert code))
+	;; Make sure the overlay stays in place
+	(when (eq context 'save) (move-overlay ovl beg (point)))
 	(goto-char beg)
 	(if single (just-one-space))))
     (if (memq t (mapcar (lambda (overlay)