Parcourir la source

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 il y a 11 ans
Parent
commit
423133efe9
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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)))