unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38131: 27.0.50; [PATCH] lisp/icomplete.el: put text property when text is not nil
@ 2019-11-08 13:17 Andrii Kolomoiets
  2019-11-08 18:03 ` Pankaj Jangid
  0 siblings, 1 reply; 6+ messages in thread
From: Andrii Kolomoiets @ 2019-11-08 13:17 UTC (permalink / raw)
  To: 38131

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

With commit 5761a1a3939e23d8e8c725241dd9398a12f191b0

1. emacs -Q
2. M-x icomplete-mode RET
3. M-x icomplete-mode

After typing last "e" there are error:

Error in post-command-hook (icomplete-post-command-hook):
(args-out-of-range -1 1)

[-- Attachment #2: 0001-lisp-icomplete.el-put-text-property-when-text-is-not.patch --]
[-- Type: application/octet-stream, Size: 1021 bytes --]

From 36d0ac2a7d8cbeedc22bf584f630498bb1f92a94 Mon Sep 17 00:00:00 2001
From: Andrii Kolomoiets <andreyk.mad@gmail.com>
Date: Fri, 8 Nov 2019 15:08:13 +0200
Subject: [PATCH] * lisp/icomplete.el: put text property when text is not nil

* lisp/icomplete.el (icomplete-completions): Don't highlight the center
part of determ if determ is nil.

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index a7f9086d82..e71f8e58dd 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -673,8 +673,9 @@ icomplete-completions
 		    (mapconcat 'identity prospects icomplete-separator)
 		    (and limit (concat icomplete-separator ellipsis))
 		    "}")
-          (put-text-property 1 (1- (length determ))
-                             'face 'icomplete-first-match determ)
+          (when determ
+            (put-text-property 1 (1- (length determ))
+                               'face 'icomplete-first-match determ))
 	  (concat determ " [Matched]"))))))
 
 ;;; Iswitchb compatibility
-- 
2.15.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-11-09 15:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-08 13:17 bug#38131: 27.0.50; [PATCH] lisp/icomplete.el: put text property when text is not nil Andrii Kolomoiets
2019-11-08 18:03 ` Pankaj Jangid
2019-11-09  1:42   ` Juanma Barranquero
2019-11-09 11:51     ` João Távora
2019-11-09 14:58       ` João Távora
2019-11-09 15:31         ` Juanma Barranquero

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).