diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-09-16 08:45:31 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2017-09-16 08:50:59 +0200 |
commit | 68de4d552b21b11e6ab61c14dd7a1f88b90d9cae (patch) | |
tree | 24f48fd58cde64a351e0f3f5cbd46e3616bfade6 | |
parent | 4cd7ed8c67f63f98ba24c325a2429448789ba16b (diff) |
Filter out all unprintable character in ucs
* helm-font.el (helm-ucs-collect-symbols-alist): Do it.
(helm-ucs-collect-symbols-hash-table): Do it.
-rw-r--r-- | helm-font.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/helm-font.el b/helm-font.el index 00e5b80d..edafa108 100644 --- a/helm-font.el +++ b/helm-font.el @@ -112,8 +112,11 @@ for char = (propertize (format "%c" v) 'face 'helm-ucs-char) unless (or (string= "" n) - (= v 10) ; 10=="\n" - (not (char-displayable-p (read xcode)))) + ;; `char-displayable-p' return a font object or + ;; t for some char that are displayable but have + ;; no special font (e.g 10) so filter out char + ;; with no font. + (not (fontp (char-displayable-p (read xcode))))) collect (concat code (make-string diff ? ) char " " n) @@ -134,8 +137,7 @@ for char = (propertize (format "%c" v) 'face 'helm-ucs-char) unless (or (string= "" n) - (= v 10) ; 10=="\n" - (not (char-displayable-p (read xcode)))) + (not (fontp (char-displayable-p (read xcode))))) collect (concat code (make-string diff ? ) char " " n) |