avy.el (avy--overlay-at-full): Avoid negative length

Fixes #102
This commit is contained in:
Oleh Krehel 2015-09-22 11:50:48 +02:00
parent acdd9e8b3d
commit d439b9d44f

2
avy.el
View File

@ -732,7 +732,7 @@ LEAF is normally ((BEG . END) . WND)."
(cond ((string= old-str "\n") (cond ((string= old-str "\n")
(concat str "\n")) (concat str "\n"))
((string= old-str "\t") ((string= old-str "\t")
(concat str (make-string (- tab-width len) ?\ ))) (concat str (make-string (max (- tab-width len) 0) ?\ )))
(t (t
;; add padding for wide-width character ;; add padding for wide-width character
(if (eq (string-width old-str) 2) (if (eq (string-width old-str) 2)