mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 05:23:05 +00:00
avy.el (avy--overlay): Avoid error on empty string
Fixes #351 Fixes #352
This commit is contained in:
parent
6f9eefadc9
commit
955c8dedd6
3
avy.el
3
avy.el
@ -1019,10 +1019,11 @@ COMPOSE-FN is a lambda that concatenates the old string at BEG with STR."
|
|||||||
(os-line-prefix (get-text-property 0 'line-prefix old-str))
|
(os-line-prefix (get-text-property 0 'line-prefix old-str))
|
||||||
(os-wrap-prefix (get-text-property 0 'wrap-prefix old-str))
|
(os-wrap-prefix (get-text-property 0 'wrap-prefix old-str))
|
||||||
other-ol)
|
other-ol)
|
||||||
|
(unless (= (length str) 0)
|
||||||
(when os-line-prefix
|
(when os-line-prefix
|
||||||
(add-text-properties 0 1 `(line-prefix ,os-line-prefix) str))
|
(add-text-properties 0 1 `(line-prefix ,os-line-prefix) str))
|
||||||
(when os-wrap-prefix
|
(when os-wrap-prefix
|
||||||
(add-text-properties 0 1 `(wrap-prefix ,os-wrap-prefix) str))
|
(add-text-properties 0 1 `(wrap-prefix ,os-wrap-prefix) str)))
|
||||||
(when (setq other-ol (cl-find-if
|
(when (setq other-ol (cl-find-if
|
||||||
(lambda (o) (overlay-get o 'goto-address))
|
(lambda (o) (overlay-get o 'goto-address))
|
||||||
(overlays-at beg)))
|
(overlays-at beg)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user