summaryrefslogtreecommitdiff
path: root/helm.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2016-07-20 10:42:47 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2016-07-20 10:42:47 +0200
commit369d7353e2a7b41ec04f19b3f4a2c4442e3e50dc (patch)
tree0d942e66ed916dbfbe8a58a7deca66818f6b1600 /helm.el
parent02cc79fa2c608646cf52a503326618173ae97709 (diff)
Fix helm-get-current-source.
* helm.el (helm-get-current-source): Go to selection before searching headers.
Diffstat (limited to 'helm.el')
-rw-r--r--helm.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/helm.el b/helm.el
index e133648a..cfac6e20 100644
--- a/helm.el
+++ b/helm.el
@@ -1427,10 +1427,10 @@ of \(action-display . function\)."
Return nil when `helm-buffer' is empty."
(or helm-current-source
(with-helm-buffer
+ ;; This is needed to not loose selection.
+ (goto-char (overlay-start helm-selection-overlay))
(let ((header-pos (or (helm-get-previous-header-pos)
(helm-get-next-header-pos))))
- ;; This is needed to not loose selection.
- (goto-char (overlay-start helm-selection-overlay))
;; Return nil when no--candidates.
(when header-pos
(cl-loop with source-name = (save-excursion