Put goto-line paths in the margin

Moreover, get rid of funky backgrounds (such as visible marks and
such)
master
Jacopo De Simoi 3 years ago
parent 955c8dedd6
commit 8a8a333ded
  1. 19
      avy.el

@ -1032,12 +1032,19 @@ COMPOSE-FN is a lambda that concatenates the old string at BEG with STR."
`(face ,(overlay-get other-ol 'face)) old-str))
(overlay-put ol 'window wnd)
(overlay-put ol 'category 'avy)
(overlay-put ol (if (eq beg eob)
'after-string
'display)
(funcall
(or compose-fn #'concat)
str old-str))
; here i should write in the margin IF I am doing at the bol
(if (eq avy-command 'avy-goto-line)
(let ((str-margin (concat " " str)))
(add-face-text-property 0 (length str-margin) `(:background ,(face-attribute 'default :background)) nil str-margin)
(overlay-put ol 'before-string
(propertize str 'display
`((margin left-margin) ,str-margin))))
(overlay-put ol (if (eq beg eob)
'after-string
'display)
(funcall
(or compose-fn #'concat)
str old-str)))
(push ol avy--overlays-lead)))))
(defcustom avy-highlight-first nil

Loading…
Cancel
Save