summaryrefslogtreecommitdiff
path: root/helm-find.el
diff options
context:
space:
mode:
authorUros Perisic <uros.m.perisic@gmail.com>2019-10-08 12:39:03 +0800
committerUros Perisic <uros.m.perisic@gmail.com>2019-10-08 12:39:03 +0800
commitab6c9aa98557de3315fdc03b2c75ae3ee47b8764 (patch)
tree1a8565f2d1620191b44494c97f3c8aa845fc1ad4 /helm-find.el
parent6e8fa9c7cfdbcf5807f46c49717a5615fa88e9ed (diff)
Extract mode-line updating functionality.
It makes the code more readable and maintainable. It also makes it possible to disable the mode-line updates with `advice-add` should a user choose to.
Diffstat (limited to 'helm-find.el')
-rw-r--r--helm-find.el16
1 files changed, 3 insertions, 13 deletions
diff --git a/helm-find.el b/helm-find.el
index 15d2b85f..9c1ab0ca 100644
--- a/helm-find.el
+++ b/helm-find.el
@@ -123,19 +123,9 @@ separator."
(helm-process-deferred-sentinel-hook
process event (helm-default-directory))
(if (string= event "finished\n")
- (with-helm-window
- (setq mode-line-format
- '(" " mode-line-buffer-identification " "
- (:eval (format "L%s" (helm-candidate-number-at-point))) " "
- (:eval (propertize
- (format "[Find process finished - (%s results)]"
- (max (1- (count-lines
- (point-min) (point-max)))
- 0))
- 'face 'helm-locate-finish))))
- (force-mode-line-update))
- (helm-log "Error: Find %s"
- (replace-regexp-in-string "\n" "" event))))))))
+ (helm-locate-update-mode-line "Find")
+ (helm-log "Error: Find %s"
+ (replace-regexp-in-string "\n" "" event))))))))
(defun helm-find-1 (dir)
(let ((default-directory (file-name-as-directory dir)))