Ver código fonte

org.el (org-insert-heading): Don't remove whitespaces following an empty headline

* org.el (org-insert-heading): Don't remove whitespaces
following an empty headline.

Thanks to Brady Trainor for reporting this.
Bastien Guerry 11 anos atrás
pai
commit
afffe03dcf
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -7619,7 +7619,8 @@ This is important for non-interactive uses of the command."
 	  (when respect-content
 	    (org-end-of-subtree nil t)
 	    (skip-chars-backward " \r\n")
-	    (and (looking-at "[ \t]+") (replace-match ""))
+	    (and (not (looking-back "^\*+"))
+		 (looking-at "[ \t]+") (replace-match ""))
 	    (unless (eobp) (forward-char 1))
 	    (when (looking-at "^\\*")
 	      (unless (bobp) (backward-char 1))