mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 05:23:05 +00:00
avy.el (avy--overlay-at-full): Work-around 20607
* 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=20607 Fixes #47
This commit is contained in:
parent
a4f4015db4
commit
be74714fd4
15
avy.el
15
avy.el
@ -466,6 +466,21 @@ LEAF is normally ((BEG . END) . WND)."
|
|||||||
(line-end-position))))
|
(line-end-position))))
|
||||||
(setq str (substring str 0 1))
|
(setq str (substring str 0 1))
|
||||||
(setq len 1))
|
(setq len 1))
|
||||||
|
(let ((other-ov (cl-find-if
|
||||||
|
(lambda (o)
|
||||||
|
(and (eq (overlay-get o 'category) 'avy)
|
||||||
|
(eq (overlay-start o) beg)
|
||||||
|
(not (eq (overlay-get o 'window) wnd))))
|
||||||
|
(overlays-in (point) (min (+ (point) len)
|
||||||
|
(line-end-position))))))
|
||||||
|
(when (and other-ov
|
||||||
|
(> (overlay-end other-ov)
|
||||||
|
(+ beg len)))
|
||||||
|
(setq str (concat str (buffer-substring
|
||||||
|
(+ beg len)
|
||||||
|
(overlay-end other-ov))))
|
||||||
|
(setq len (- (overlay-end other-ov)
|
||||||
|
beg))))
|
||||||
(let* ((end (if (= beg (line-end-position))
|
(let* ((end (if (= beg (line-end-position))
|
||||||
(1+ beg)
|
(1+ beg)
|
||||||
(min (+ beg
|
(min (+ beg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user