[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master fd7b929 078/110: Add option to display an indented goto li
From: |
Oleh Krehel |
Subject: |
[elpa] master fd7b929 078/110: Add option to display an indented goto line overlay |
Date: |
Sat, 11 May 2019 10:15:48 -0400 (EDT) |
branch: master
commit fd7b9297191ebcd630310cdff7e78698eb81495c
Author: Lane Spangler <address@hidden>
Commit: Lane Spangler <address@hidden>
Add option to display an indented goto line overlay
It may be useful to display the overlay for `avy-goto-line` next to the
first
non whitespace character on each line so that your eyes do not have to look
across from the code on the line to the left edge of the buffer.
This commit adds a defcustom for `avy-indent-line-overlay` which enables
this
new behavior when non nil.
---
avy.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/avy.el b/avy.el
index a7af8cf..dfd7995 100644
--- a/avy.el
+++ b/avy.el
@@ -1429,6 +1429,10 @@ Which one depends on variable `subword-mode'."
(defvar visual-line-mode)
+(defcustom avy-indent-line-overlay nil
+ "When non-nil, `avy-goto-line' will display the line overlay next to the
first non-whitespace character of each line."
+ :type 'boolean)
+
(defun avy--line-cands (&optional arg beg end bottom-up)
"Get candidates for selecting a line.
The window scope is determined by `avy-all-windows'.
@@ -1448,7 +1452,10 @@ When BOTTOM-UP is non-nil, display avy candidates from
top to bottom"
(push (cons
(if (eq avy-style 'post)
(line-end-position)
- (point))
+ (save-excursion
+ (when avy-indent-line-overlay
+ (skip-chars-forward " \t"))
+ (point)))
(selected-window)) candidates))
(if visual-line-mode
(progn
- [elpa] master 16482e0 089/110: avy.el (avy--generic-jump): Remove `style' arg, (continued)
- [elpa] master 16482e0 089/110: avy.el (avy--generic-jump): Remove `style' arg, Oleh Krehel, 2019/05/11
- [elpa] master 909483e 090/110: avy.el (avy--process): Make `overlay-fn' arg optional, Oleh Krehel, 2019/05/11
- [elpa] master 24b5137 087/110: Ignore mistyping when no candidates available, Oleh Krehel, 2019/05/11
- [elpa] master c4e2d50 077/110: avy.el: avy-goto-char will now display shortest overlays for cands near point, Oleh Krehel, 2019/05/11
- [elpa] master 1de6233 076/110: Add avy-goto-end-of-line, Oleh Krehel, 2019/05/11
- [elpa] master c2e2a4a 083/110: avy.el (avy--read-candidates): Custom keys for deleting last read char, Oleh Krehel, 2019/05/11
- [elpa] master 4f1b8a1 086/110: avy.el: Fix compiler warnings, Oleh Krehel, 2019/05/11
- [elpa] master e7c0fc0 088/110: avy.el (avy-pre-action): New defvar, Oleh Krehel, 2019/05/11
- [elpa] master bcc0cb0 085/110: avy.el (avy-org-refile-as-child): Don't refile when avy aborted, Oleh Krehel, 2019/05/11
- [elpa] master 6331b7a 071/110: avy.el (avy--process): Fix avy-goto-line for empty buffer, Oleh Krehel, 2019/05/11
- [elpa] master fd7b929 078/110: Add option to display an indented goto line overlay,
Oleh Krehel <=
- [elpa] master 70e384a 073/110: avy.el (avy--process-1): Extract, Oleh Krehel, 2019/05/11
- [elpa] master cd8fb10 081/110: avy.el (avy--read-candidates): Quit on ESC, Oleh Krehel, 2019/05/11
- [elpa] master df4c4ac 084/110: Show number of matches so far in prompt, Oleh Krehel, 2019/05/11
- [elpa] master 93d4bd2 066/110: avy.el: Fix indentation, Oleh Krehel, 2019/05/11
- [elpa] master 157486a 079/110: avy.el: Fix compiler warning, Oleh Krehel, 2019/05/11
- [elpa] master abe150c 082/110: Introduce single candidate jump customization, Oleh Krehel, 2019/05/11
- [elpa] master a29558d 080/110: Add C-h/DEL/RET info to README for avy-goto-char-timer, Oleh Krehel, 2019/05/11
- [elpa] master 7c40f5e 075/110: avy.el (avy--process): Fix the candidates list being modified when restarting, Oleh Krehel, 2019/05/11
- [elpa] master 58e8636 070/110: avy.el (avy-action-zap-to-char): More convenient use-cases, Oleh Krehel, 2019/05/11
- [elpa] master 34d3531 067/110: avy.el (avy-action-goto): Remove lag, Oleh Krehel, 2019/05/11