diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2020-08-03 07:40:52 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2020-08-03 07:40:52 +0200 |
commit | b09cbf452b08e44768c3ef17e7d93b78cde5e91d (patch) | |
tree | 87b127af3b4491e6c6bdd68129d02c9e9f2b29b4 /helm-utils.el | |
parent | c99c6d5170e307dce32ddaac521bb371eb701136 (diff) |
Don't enter the loop when *-highlight-matches-around-point-max-lines is 'never
Diffstat (limited to 'helm-utils.el')
-rw-r--r-- | helm-utils.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/helm-utils.el b/helm-utils.el index dafb3e54..d42443fe 100644 --- a/helm-utils.el +++ b/helm-utils.el @@ -864,7 +864,7 @@ Inlined here for compatibility." (defvar helm-match-line-overlay nil) (defvar helm--match-item-overlays nil) -(defun helm-highlight-current-line (&optional start end buf face) +(cl-defun helm-highlight-current-line (&optional start end buf face) "Highlight and underline current position" (let* ((start (or start (line-beginning-position))) (end (or end (1+ (line-end-position)))) @@ -886,8 +886,7 @@ Inlined here for compatibility." ;; `helm-highlight-matches-around-point-max-lines' is ;; compared as a number by other clauses and return an error. (eq helm-highlight-matches-around-point-max-lines 'never) - (setq start-match start - end-match start)) + (cl-return-from helm-highlight-current-line)) ((consp helm-highlight-matches-around-point-max-lines) (setq start-match (save-excursion |