changeset 67299:8aa8220db142

(completion-setup-function): Put completions-common-part face on full completion string too (i.e. completion string without completions-first-difference face).
author Juri Linkov <juri@jurta.org>
date Sun, 04 Dec 2005 02:42:29 +0000
parents 7af5860f4444
children d939be43ae67
files lisp/simple.el
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Sun Dec 04 02:39:24 2005 +0000
+++ b/lisp/simple.el	Sun Dec 04 02:42:29 2005 +0000
@@ -4970,12 +4970,13 @@
                       (< (setq element-common-end
                                (+ element-start common-string-length))
                          maxp))
-	    (when (and (get-char-property element-start 'mouse-face)
-		       (get-char-property element-common-end 'mouse-face))
-	      (put-text-property element-start element-common-end
-				 'font-lock-face 'completions-common-part)
-	      (put-text-property element-common-end (1+ element-common-end)
-				 'font-lock-face 'completions-first-difference)))))
+	    (when (get-char-property element-start 'mouse-face)
+	      (if (get-char-property (1- element-common-end) 'mouse-face)
+		  (put-text-property element-start element-common-end
+				     'font-lock-face 'completions-common-part))
+	      (if (get-char-property element-common-end 'mouse-face)
+		  (put-text-property element-common-end (1+ element-common-end)
+				     'font-lock-face 'completions-first-difference))))))
       ;; Insert help string.
       (goto-char (point-min))
       (if (display-mouse-p)