* avy.el (avy--overlay-at-full): Account for `overlays-in' not being
returned in the buffer order sometimes: it seems to be random order.
Instead, look at the minimum of all overlay starts that are on the
current line.
Fixes#52.
This can be useful for adding mirror key. For example, one can make SPACE an
alternative of 'a', by adding:
(setq avy-translate-char-function
(lambda (c) (if (= c 32) ?a c)))
to allow typing SPACE instead of character 'a' to jump to the location
highlighted by 'a'.
Fixes#59
* avy.el (avy-lead-face-2): New face.
(avy-lead-faces): New defconst. Each element will be used to color the
corresponding depth.
(avy--overlay-at-full): Use `avy-lead-faces' to represent the current
decision depth. For `de-bruijn', prepend the old stuff, so that nothing
moves.
Fixes#53
* avy.el (avy--group-by): Remove.
(avy--path-alist-to-tree): Remove.
(avy-tree-de-bruijn): Remove.
(avy-read-de-bruijn): New defun.
(avy--process): Update.
Instead of building a tree (from a flat sequence) and traversing it,
just use the flat sequence. This has the advantage of candidates being
in proper buffer-sequential order.
Re #51
Re #5
* avy.el (avy-style): New choice option.
(avy--de-bruijn): New defun.
(avy--path-alist-1): New defun.
(avy--group-by): New defun.
(avy--path-alist-to-tree): New defun.
(avy-tree-de-bruijn): New defun, semi-compatible with `avy-tree'.
(avy--process): Use `avy-tree-de-bruijn' when `avy-style' is 'de-bruijn.
(avy--style-fn): Use `avy--overlay-at-full' when `avy-style' is
'de-bruijn.
Fixes#51
Re #5
TODO: When tree produced by `avy-tree-de-bruijn' is traversed
depth-first, the results should be in-order of their appearance in the
window. Only in this case the overlay functions will work correctly,
since they need to be applied sequentially from window end to window
start.
* avy.el (avy--overlay-at-full): There's a problem when there are two
overlays at the same point in the same buffer, but in different
windows, *only if* they are of different length. Make them the same
length to work-around this bug.
See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20607Fixes#47
* avy.el (avy-all-windows): Change the custom type to choice: this
window/this frame/all frames.
(avy-window-list): New defun.
(avy-dowindows): Use `avy-window-list'.
(avy--process): Use `avy-window-list'.
* avy.el (avy-goto-char):
(avy-goto-char-2):
(avy-goto-word-1):
(avy-goto-subword-1):
(avy-goto-word-or-subword-1): Update argument list and docstring.
* README.md: Add a "Contributing" section.
Re #44
* avy.el (avy-highlight-first): New defcustom. When non-nil, use
`avy-lead-face-0' even on terminal chars.
(avy--overlay-pre): Update.
(avy--overlay-at-full): Update.
(avy--overlay-post): Update.
Fixes#42
* avy.el (avy--line): Use the custom style. Use line end postion for
'post style.
Fixesabo-abo/ace-link#17
Any of the following do something different now:
(setq avy-styles-alist
'((avy-goto-line . post)))
(setq avy-styles-alist
'((avy-goto-line . at)))
(setq avy-styles-alist
'((avy-goto-line . at-full)))
(setq avy-styles-alist
'((avy-goto-line . pre)))
* avy.el (avy-lead-face-0): Update doc.
(avy-lead-face-1): New face.
(avy-current-path): New defvar.
(avy-read): Store the current matched chars in `avy-current-path'.
(avy--overlay-pre):
(avy--overlay-post): Extend the string with the matched part. This
prevents shifting during selection, and looks nice too.
Fixes#38
* avy.el (avy-read): Call DISPLAY-FN in buffer's reverse order.
(avy--overlay-at-full): When there's an avy overlay after point, shorten
the current overlay to one letter.
Re #5
* avy.el (avy-handler-default): New defun.
(avy-handler-function): New variable. Bind this temporarily to catch bad chars.
(avy-read): Forward to `avy-handler-default'.
* avy-jump.el (avy--goto): Consider the case of 'exit symbol being
returned.
(avy-goto-line): Bind `avy-handler-function' to catch digits and call
`goto-line' in that case.
Fixes#29