casouri / eldoc-box

childframe doc for eglot and anything that uses eldoc
361 stars 26 forks source link

Cursor renders in eldoc-box window #66

Closed kcbanner closed 1 year ago

kcbanner commented 1 year ago

I'm seeing an inactive cursor in the eldoc-box window (note the cursor over the f):

image

I tried (add-hook 'eldoc-box-buffer-hook (lambda() (setq cursor-in-non-selected-windows nil)) nil t), and even setting cursor-in-non-selected-window nil globally, but it was still there.

casouri commented 1 year ago

Huh, that's strange. What's the version of your Emacs, and what's the value of eldoc-box-frame-parameters?

kcbanner commented 1 year ago

I'm running emacs master (c6bfffa9fe1af7f4f806e5533ba5f3c33476cf9a) and eldoc-box-frame-parameters is:

Value:
((left . -1)
 (top . -1)
 (width . 0)
 (height . 0)
 (no-accept-focus . t)
 (no-focus-on-map . t)
 (min-width . 0)
 (min-height . 0)
 (internal-border-width . 1)
 (vertical-scroll-bars)
 (horizontal-scroll-bars)
 (right-fringe . 3)
 (left-fringe . 3)
 (menu-bar-lines . 0)
 (tool-bar-lines . 0)
 (line-spacing . 0)
 (unsplittable . t)
 (undecorated . t)
 (visibility)
 (mouse-wheel-frame)
 (no-other-frame . t)
 (cursor-type)
 (inhibit-double-buffering . t)
 (drag-internal-border . t)
 (no-special-glyphs . t)
 (desktop-dont-save . t)
 (tab-bar-lines . 0))

This may very well be an issue with emacs master, since I see the cursor type is set to nil.

nasyxx commented 1 year ago

I also encountered this problem, and I was even able to modify its content.

Screenshot 2023-03-31 at 12 05 33 AM
casouri commented 1 year ago

Are you able to modify content as soon as the child frame shows up, or only after you click into it? I still can't reproduce it. Does it happen reliably, or is it intermittent? And which kind of mode are you using? hover-mode, hover-at-point-mode or help-at-point? Also which Emacs version are you using?

nasyxx commented 1 year ago
  1. After I click on it. Since I need to scroll it.
  2. hover-mode.
  3. GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin22.3.0, NS appkit-2299.40 Version 13.2.1 (Build 22D68)) of 2023-03-30

Looks like some package changed the behavior. I just tried emacs -Q, and no cursor appears. I'll try a bisect later.

nasyxx commented 1 year ago

I guess I find why.

(setq-default cursor-type 'box) then it appears.

Screenshot 2023-03-31 at 2 40 36 AM Screenshot 2023-03-31 at 2 41 08 AM
casouri commented 1 year ago

Yeah I can reproduce this. Though, strangely enough, I can't reproduce it on my configured Emacs, even with (setq-default cursor-type 'box) 😃

Anyway, I added a workaround that seems to fix this, please give it a try.

nasyxx commented 1 year ago

It works.

kcbanner commented 1 year ago

This works! Thanks for the fix!

thiagolopes commented 1 year ago

I am suffering the same bug using cursory https://git.sr.ht/~protesilaos/cursory