[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7474: In latest source, icomplete-mode makes cursor disappear in min
From: |
Fran |
Subject: |
bug#7474: In latest source, icomplete-mode makes cursor disappear in minibuffer |
Date: |
Wed, 24 Nov 2010 20:21:18 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
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)))))))