* avy.el (avy-dowindows): Use `avy-all-windows-alt'.
(avy--regex-candidates):
(avy--read-candidates): Use `current-prefix-arg'. At some later point, it
could be passed as an argument instead.
Fixes#118
When using avy-goto-line and typing a line number with avy-style
de-bruijn, you would get an error after entering your line number and
pressing RET:
No catch for tag: done, exit
I believe this is because avy-read is wrapped with (catch 'done ...) but
avy-read-de-bruijn doesn't catch done. This adds the catch to
avy-read-de-bruijn.
* avy.el (avy--overlay-at-full): Compute line-end-position according to
`visual-line-mode'.
(avy--update-offset-and-str): Add one more arg.
Note that `visual-line-mode' is actually extremely slow. If you have a
lot of candidates, you'll get a perceptible slowdown.
If avy--read-candidates doesn't find any candidates for the current
input, the user has surely made a typo. In that case, beep at the user
to make him aware of that.
* avy.el (avy-styles-alist): Make `avy-goto-line' use the 'pre style.
(avy--overlay): Clone `line-prefix' and `wrap-prefix' text properties if
any. These are the properties that `org-indent-mode' uses.
(avy--line): Set `temporary-goal-column' to 0 - this affects
`line-move-visual'.
Fixes#110
avy.el (avy--read-candidates): For the last char in the
outline, (get-char-property (point) 'invisible) returns t, although it's
still visible.
Re #100
Previously, the candidate list would be generated twice: by
`avy--read-string-timer' and by `avy--generic-jump'.
* avy.el (avy--read-string-timer): Rename to `avy--read-candidates'.
(avy--read-candidates): Return the list of candidates instead of a
string which the candidates match.
(avy-goto-char-timer): Update.
Re #100
avy.el (avy--regex-candidates): For the last char in the outline,
(get-char-property (point) 'invisible) returns t, although it's still
visible.
Re #108
The current version of `avy--regex-candidates` first searches for the
given regex then skip the match if it's invisible. This works fine with
less than a few thousand lines of buffer, however, it takes quit time if
your have tens of thousand lines hidden, say, in org file.
This patch reverse the strategy. Find all visible regions in given the
window first, then map the original search function to that list. This
change reduced candidates search time from 10 or more seconds to instant
on my 100,000+ lines of org file.
It might be possible to have hundreds of visibility-interleaved regions
in a huge window on the 4K or 8K monitor in near the future, but this
reversed strategy should be fast enough for those system.
This fixes#108.
Fixes#109
Before this change, the highlighting was only performed in the selected
window even if avy-all-windows was true. Now it's consistent with the
value of that variable.
1. Handle DEL in order to fix typos.
2. Handle RET in order to use the current input string immediately
without waiting for another char for avy-timeout-seconds.
3. Highlight matches while reading chars.
Now you can use avy-goto-char-timer and type as many chars as you want
given each char comes before avy-timeout-seconds (and the very first
char is mandatory, i.e., there is no timeout for the first one).
* avy.el (avy-action-goto): Don't save mark here, since the window was
already changed.
(avy--process): Set mark here.
(avy-ring): New defvar.
(avy-push-mark): New defun.
(avy-pop-mark): Use `avy-ring' unless it's empty. Then use the mark ring.
Fixes#88
Re #69
Re #81