all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Fran <flitterio@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#7474: In latest source, icomplete-mode makes cursor disappear in minibuffer
Date: Wed, 24 Nov 2010 20:21:18 +0000 (UTC)	[thread overview]
Message-ID: <loom.20101124T211642-764@post.gmane.org> (raw)
In-Reply-To: <1ytyj6jxaz.fsf@gmail.com>

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







  reply	other threads:[~2010-11-24 20:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 19:56 bug#7474: In latest source, icomplete-mode makes cursor disappear in minibuffer Francis Litterio
2010-11-24 20:21 ` Fran [this message]
2010-11-24 21:16 ` Eli Zaretskii
2010-11-25 18:40   ` Eli Zaretskii

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=loom.20101124T211642-764@post.gmane.org \
    --to=flitterio@gmail.com \
    --cc=bug-gnu-emacs@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.