GNU bug report logs - #7474
In latest source, icomplete-mode makes cursor disappear in minibuffer

Previous Next

Package: emacs;

Reported by: flitterio <at> gmail.com (Francis Litterio)

Date: Wed, 24 Nov 2010 20:08:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Fran <flitterio <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#7474: In latest source,	icomplete-mode
	makes cursor disappear in minibuffer
Date: Wed, 24 Nov 2010 20:21:18 +0000 (UTC)
I wrote:

> Using Emacs built from the latest source on Windows 7, the cursor
> can be made to disappear as follows:
> 
> 1. Start Emacs with: emacs -Q
> 
> 2. Type: ESC ESC : (icomplete-mode 1) RET C-h v desc
> 
> 3. The cursor is no longer visisble in the minibuffer.
> 
> 4. Type: C-b
> 
> 5. The cursor is visible over the letter 'c' in "desc".
> 
> 6. Type: C-f
> 
> 7. The cursor is once again no longer visible.
> 
> This is acting like some of the text in the minibuffer has the
> 'intangible property, but the word "intangible" doesn't appear anywhere
> in lisp/icomplete.el.

I think this has to do with the use of the 'cursor text property in this code in
src/icomplete.el (slightly elided for readability):

(defun icomplete-exhibit ()
  ...
  (when (and icomplete-mode (icomplete-simple-completing-p))
    (save-excursion
      (goto-char (point-max))
                                        ; Insert the match-status information:
      (if (and (> (point-max) (minibuffer-prompt-end))
               buffer-undo-list         ; Wait for some user input.
               ...)
          (let ((text (...)
                (buffer-undo-list t)
                deactivate-mark)
            ;; Do nothing if while-no-input was aborted.
            (when (stringp text)
              (move-overlay icomplete-overlay (point) (point) (current-buffer))
              ;; The current C cursor code doesn't know to use the overlay's
              ;; marker's stickiness to figure out whether to place the cursor
              ;; before or after the string, so let's spoon-feed it the pos.
              (put-text-property 0 1 'cursor t text)
              (overlay-put icomplete-overlay 'after-string text)))))))






This bug report was last modified 14 years and 242 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.