Explorar o código

org-capture.el: Use `org-buffer-narrowed-p'

* org-capture.el (org-capture-put-target-region-and-position):
Use `org-buffer-narrowed-p'.
Bastien Guerry %!s(int64=11) %!d(string=hai) anos
pai
achega
423133efe9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lisp/org-capture.el

+ 1 - 1
lisp/org-capture.el

@@ -823,7 +823,7 @@ already gone.  Any prefix argument will be passed to the refile command."
   (org-capture-put
    :initial-target-region
    ;; Check if the buffer is currently narrowed
-   (when (/= (buffer-size) (- (point-max) (point-min)))
+   (when (org-buffer-narrowed-p)
      (cons (point-min) (point-max))))
   ;; store the current point
   (org-capture-put :initial-target-position (point)))