Explorar o código

org.el (org-sort-entries): Restore the point location when there is nothing to sort

* org.el (org-sort-entries): Restore the point location when
there is nothing to sort.
Bastien Guerry %!s(int64=11) %!d(string=hai) anos
pai
achega
3c71ab34dd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -8637,7 +8637,7 @@ links."
       (show-all)))
 
     (setq beg (point))
-    (if (>= beg end) (user-error "Nothing to sort"))
+    (when (>= beg end) (goto-char start) (user-error "Nothing to sort"))
 
     (looking-at "\\(\\*+\\)")
     (setq stars (match-string 1)