all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrii Kolomoiets <andreyk.mad@gmail.com>
To: 38131@debbugs.gnu.org
Subject: bug#38131: 27.0.50; [PATCH] lisp/icomplete.el: put text property when text is not nil
Date: Fri, 8 Nov 2019 15:17:31 +0200	[thread overview]
Message-ID: <AB5F82CA-E0BB-481F-92A7-6A5E3DF9ECF1@gmail.com> (raw)

[-- 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


             reply	other threads:[~2019-11-08 13:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 13:17 Andrii Kolomoiets [this message]
2019-11-08 18:03 ` bug#38131: 27.0.50; [PATCH] lisp/icomplete.el: put text property when text is not nil 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AB5F82CA-E0BB-481F-92A7-6A5E3DF9ECF1@gmail.com \
    --to=andreyk.mad@gmail.com \
    --cc=38131@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.