summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-03-13 10:49:48 +0100
committerBastien Guerry <bzg@altern.org>2014-03-13 10:49:48 +0100
commit423133efe9169381a8a6b3604fa25e01e1fec425 (patch)
treeeeafd9dd03c19476b2bc42580d0713d559fca1cb
parentb3bf52a1a65338af6854949402efc53f0d37d3be (diff)
downloadorg-mode-423133efe9169381a8a6b3604fa25e01e1fec425.tar.gz
org-capture.el: Use `org-buffer-narrowed-p'
* org-capture.el (org-capture-put-target-region-and-position): Use `org-buffer-narrowed-p'.
-rw-r--r--lisp/org-capture.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index d0b0f5e..e7f5e20 100644
--- a/lisp/org-capture.el
+++ b/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)))