summaryrefslogtreecommitdiff
path: root/helm.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-06-29 08:19:46 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-06-29 08:19:46 +0200
commita21bbc76bf395c48e5498d4e39a8de1afbf5abc5 (patch)
treec852b213f1960fd3ccab889da5942466169e3288 /helm.el
parente27cec6da9f4cf07617c8135c46fd734d3e37017 (diff)
Rewrite helm-move-end/beginning-of-source
* helm.el (helm-move--end-of-source): Do it. (helm-move--beginning-of-source): Do it.
Diffstat (limited to 'helm.el')
-rw-r--r--helm.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/helm.el b/helm.el
index bd66f623..93113de3 100644
--- a/helm.el
+++ b/helm.el
@@ -4500,12 +4500,15 @@ Key arg DIRECTION can be one of:
(goto-char (point-max)))
(defun helm-move--end-of-source ()
- (goto-char (or (helm-get-next-header-pos) (point-max)))
- (when (helm-pos-header-line-p) (forward-line -2)))
+ (helm-aif (helm-get-next-header-pos)
+ (progn (goto-char it) (forward-line -2))
+ (goto-char (point-max))))
(defun helm-move--beginning-of-source ()
- (goto-char (helm-get-previous-header-pos))
- (forward-line 1))
+ (helm-aif (helm-get-previous-header-pos)
+ (progn (goto-char it)
+ (forward-line 1))
+ (goto-char (point-min))))
(defun helm-move--previous-source-fn ()
(forward-line -1)