mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 05:23:05 +00:00
Add padding for wide-width character
Add padding for wide-width character (ex. Japanese and Chinese).
This commit is contained in:
parent
b1ef1f8f8c
commit
ac162279f2
10
avy.el
10
avy.el
@ -649,7 +649,10 @@ LEAF is normally ((BEG . END) . WND)."
|
||||
(overlay-put ol 'window wnd)
|
||||
(overlay-put ol 'display (if (string= old-str "\n")
|
||||
(concat str "\n")
|
||||
str))
|
||||
;; add padding for wide-width character
|
||||
(if (eq (string-width old-str) 2)
|
||||
(concat str " ")
|
||||
str)))
|
||||
(push ol avy--overlays-lead)))
|
||||
|
||||
(defun avy--overlay-at-full (path leaf)
|
||||
@ -727,7 +730,10 @@ LEAF is normally ((BEG . END) . WND)."
|
||||
((string= old-str "\t")
|
||||
(concat str (make-string (- tab-width len) ?\ )))
|
||||
(t
|
||||
str)))
|
||||
;; add padding for wide-width character
|
||||
(if (eq (string-width old-str) 2)
|
||||
(concat str " ")
|
||||
str))))
|
||||
(push ol avy--overlays-lead))))))
|
||||
|
||||
(defun avy--overlay-post (path leaf)
|
||||
|
Loading…
x
Reference in New Issue
Block a user