changeset 106106:a3ea15b56766

(describe-char-padded-string): Compose with TAB only if there's a font for CH. (describe-char): Fix the condition for detecting a trivial composition.
author Kenichi Handa <handa@m17n.org>
date Thu, 19 Nov 2009 01:11:09 +0000
parents 7e681be660d6
children a387a3328e51
files lisp/descr-text.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/descr-text.el	Wed Nov 18 21:13:07 2009 +0000
+++ b/lisp/descr-text.el	Thu Nov 19 01:11:09 2009 +0000
@@ -353,7 +353,9 @@
 ;; Return a string of CH with composition for padding on both sides.
 ;; It is displayed without overlapping with the left/right columns.
 (defsubst describe-char-padded-string (ch)
-  (compose-string (string ch) 0 1 (format "\t%c\t" ch)))
+  (if (internal-char-font nil ch)
+      (compose-string (string ch) 0 1 (format "\t%c\t" ch))
+    (string ch)))
 
 ;; Return a nicely formated list of categories; extended category
 ;; description is added to the category name as a tooltip
@@ -446,7 +448,8 @@
 				(setq glyph (lgstring-glyph components j))
 				(= (lglyph-from glyph) glyph-from))
 		      (setq j (1+ j)))
-		    (if (and (= i (1- j))
+		    (if (and (= to (1+ from))
+			     (= i (1- j))
 			     (setq glyph (lgstring-glyph components i))
 			     (= char (lglyph-char glyph)))
 			;; The composition is trivial.