GNU bug report logs -
#24372
25.1.50; After losing focus, cursor is hidden when moving point
Previous Next
Full log
Message #32 received at 24372 <at> debbugs.gnu.org (full text, mbox):
> From: Philipp Stephani <p.stephani2 <at> gmail.com>
> Date: Fri, 09 Sep 2016 17:18:12 +0000
> Cc: 24372 <at> debbugs.gnu.org
>
> A simpler recipe that doesn't need explicit focus events is
>
> emacs -Q -eval '(progn (setq blink-cursor-delay 0.0) (blink-cursor-suspend) (blink-cursor-check))'
>
> and then start moving point.
>
> OK, I guess one issue is that setting blink-cursor-delay doesn't restart blink-cursor-idle-timer. (Similarly,
> changing blink-cursor-interval doesn't restart blink-cursor-timer.) While obviously we can't fix that when using
> setq, I'd suggest adding custom setters to the variables nevertheless.
>
> The direct cause of the issue seems to be that, when blink-cursor-delay is idle, after every command
> blink-cursor-start is called immediately, which hides the cursor.
Thanks. Does the patch below fix the issue, without introducing any
adverse side effects?
diff --git a/lisp/frame.el b/lisp/frame.el
index cfd40bf..e10f0ce 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2068,7 +2068,10 @@ blink-cursor-start
(run-with-timer blink-cursor-interval blink-cursor-interval
'blink-cursor-timer-function))
(add-hook 'pre-command-hook 'blink-cursor-end)
- (internal-show-cursor nil nil)))
+ ;; Start by showing the cursor, so that even if they set
+ ;; blink-cursor-delay to zero, they still see the cursor during
+ ;; the execution of the Emacs commands.
+ (internal-show-cursor nil t)))
(defun blink-cursor-timer-function ()
"Timer function of timer `blink-cursor-timer'."
This bug report was last modified 8 years and 293 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.