ace-window.el (aw-display-mode-overlay): New defcustom

Fixes #173
old-master
Oleh Krehel 7 years ago
parent cd82d83345
commit 196382b5c8
  1. 11
      ace-window.el

@ -498,6 +498,12 @@ The new frame is set to the same size as the previous frame, offset by
(let ((avy-dispatch-alist))
(avy-handler-default char)))))))
(defcustom aw-display-mode-overlay t
"When nil, don't display overlays. Rely on the mode line instead."
:type 'boolean)
(defvar ace-window-display-mode)
(defun aw-select (mode-line &optional action)
"Return a selected other window.
Amend MODE-LINE to the mode line for the duration of the selection."
@ -543,7 +549,10 @@ Amend MODE-LINE to the mode line for the duration of the selection."
(let* ((avy-handler-function aw-dispatch-function)
(avy-translate-char-function aw-translate-char-function)
(res (avy-read (avy-tree candidate-list aw-keys)
#'aw--lead-overlay
(if (and ace-window-display-mode
aw-display-mode-overlay)
#'aw--lead-overlay
(lambda (_path _leaf)))
#'avy--remove-leading-chars)))
(if (eq res 'exit)
(setq aw-action nil)

Loading…
Cancel
Save