Browse 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 6 years ago
parent
commit
423133efe9
1 changed files with 1 additions and 1 deletions
  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)))