Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flycheck-posframe popup doesn't disappear while the cursor is moving #6416

Closed
suleymanboyar opened this issue May 24, 2022 · 2 comments · May be fixed by #7813
Closed

flycheck-posframe popup doesn't disappear while the cursor is moving #6416

suleymanboyar opened this issue May 24, 2022 · 2 comments · May be fixed by #7813
Labels
is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet

Comments

@suleymanboyar
Copy link

suleymanboyar commented May 24, 2022

What did you expect to happen?

When I move my cursor from a line with an error the popup should go away almost instantaneously.

What actually happened?

When I move my cursor from a line with an error the popup doesn't disappear. It only disappears after i stop moving the cursor. This happens both in EVIL mode and Emacs mode.

2022-05-24.16-03-54.mp4

I found this issue which might be related to my issue from one year ago alexmurray/flycheck-posframe#30, but it seems like the project isn't maintained or active any more.

Describe your attempts to resolve the issue

I tried to play set different values for this three variables to see if the popup would disappear faster or slower but non of them had any effect on the issue.

(setq flycheck-idle-change-delay 0
      flycheck-idle-buffer-switch-delay 0
      flycheck-display-errors-delay 0.5))

I removed my private config and installed a fresh new doom emacs with doom install and added +childframe flag to syntax in init.el to still seeing the same issue described over.

Steps to reproduce

  1. Remove private config
  2. Reinstall doom emacs with doom install
  3. Add +childframe flag to :checkers syntax in init.el
  4. M-x doom/reload
  5. Make an intentionally syntax error like removing a parentheses
  6. Go to the line with the error and wait til you see a popup with an error message
  7. Start moving up/down/left/right without stopping

System Information

https://pastebin.com/EuDG3nmM

@suleymanboyar suleymanboyar added is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet labels May 24, 2022
@suleymanboyar
Copy link
Author

After some more testing and debugging, doing doom upgrade seems to have solved my issue.

@jadestrong
Copy link

I still have this problem here, so I added a monitor to actively hide it:

(when (featurep! :checkers syntax +childframe)
  (defun flycheck-posframe-monitor-post-command ()
    (when (not (flycheck-posframe-check-position))
      (posframe-hide flycheck-posframe-buffer)))

  (defun fix-flycheck-posframe-not-hide-immediately ()
    (cond (flycheck-posframe-mode
           (add-hook 'post-command-hook 'flycheck-posframe-monitor-post-command nil t))
          ((not flycheck-posframe-mode)
           (remove-hook 'post-command-hook 'flycheck-posframe-monitor-post-command t))))
  (add-hook! flycheck-posframe-mode #'fix-flycheck-posframe-not-hide-immediately))

Dev380 added a commit to Dev380/doomemacs that referenced this issue Apr 12, 2024
Currently, if the +childframe flag is on, the frame
will linger for a few seconds before disappearing
after leaving the highlighted error. A post command
hook needs to be added to fix this, courtesy of
jadestrong. Fixes doomemacs#6416.
Dev380 added a commit to Dev380/doomemacs that referenced this issue Apr 12, 2024
Currently, if the +childframe flag is on, the frame
will linger for a few seconds before disappearing
after leaving the highlighted error. A post command
hook needs to be added to fix this, courtesy of
jadestrong.

Fix: doomemacs#6416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants