Skip to content

Commit

Permalink
Avoid adding face properties to ido-matches
Browse files Browse the repository at this point in the history
Fixes #26
  • Loading branch information
Milan Stanojevic committed Apr 2, 2015
1 parent c3e0514 commit 2b5e814
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ido-vertical-mode.el
Expand Up @@ -133,6 +133,12 @@ so we can restore it when turning `ido-vertical-mode' off")
(setq comps (append comps (make-list (- (1+ ido-max-prospects) lencomps) "")))))

(when ido-use-faces
;; Make a copy of [ido-matches], otherwise the selected string
;; could contain text properties which could lead to weird
;; artifacts, e.g. buffer-file-name having text properties.
(when (eq comps ido-matches)
(setq comps (copy-sequence ido-matches)))

(dotimes (i ido-max-prospects)
(setf (nth i comps) (substring (if (listp (nth i comps))
(car (nth i comps))
Expand Down

0 comments on commit 2b5e814

Please sign in to comment.