summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2013-02-15 18:32:47 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2013-02-15 18:32:47 +0100
commit68ab722a499995e1b18a60e9851e57f6fe7fbe8e (patch)
tree8858c8ad97b804767773b918cf152535e53f2cd9
parent4f2fccefc54b03fc68ba6efa833464d3045211b9 (diff)
downloadorg-mode-68ab722a499995e1b18a60e9851e57f6fe7fbe8e.tar.gz
ox: Small improvement to scrolling
* lisp/ox.el (org-export--dispatch-action): Small improvement to line by line scrolling.
-rw-r--r--lisp/ox.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ox.el b/lisp/ox.el
index d6fdc0f..bd1a150 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -5509,8 +5509,14 @@ options as CDR."
(not expertp)
(memq key '(? ? ?\s ?\d)))
(case key
- (? (ignore-errors (scroll-up-line)))
- (? (ignore-errors (scroll-down-line)))
+ (? (if (not (pos-visible-in-window-p (point-max)))
+ (ignore-errors (scroll-up-line))
+ (message "End of buffer")
+ (sit-for 1)))
+ (? (if (not (pos-visible-in-window-p (point-min)))
+ (ignore-errors (scroll-down-line))
+ (message "Beginning of buffer")
+ (sit-for 1)))
(?\s (if (not (pos-visible-in-window-p (point-max)))
(scroll-up nil)
(message "End of buffer")