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

override_vim_notify = true -> notification captures cursor on :q #241

Open
j-hui opened this issue May 20, 2024 · 0 comments
Open

override_vim_notify = true -> notification captures cursor on :q #241

j-hui opened this issue May 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@j-hui
Copy link
Owner

j-hui commented May 20, 2024

Discussed in https://github.com/j-hui/fidget.nvim/discussions/218

Note

GitHub Discussions are now disabled for this project, so the above link will 404, but the relevant discussion with @mrcjkb is reproduced below.

Originally posted by mrcjkb March 4, 2024
Hey 👋

I really like fidget's override_vim_notify feature, as it usually doesn't get in my way, but I can look up notifications when I need them.

I've just been having one issue:
Sometimes, when trying to exit with :q or :wq while fidget is displaying a notification, instead of quitting Neovim, the cursor will move to the notification window.

I can consistently reproduce this with neogit (having the disable_builtin_notifications option set to true - which disables Neogit's notifications and uses vim.notify instead)

It always happens when I

  • Modify something
  • :Neogit
  • cc to commit
  • Type the commit message and :wq to commit
  • q to close the Neogit tab - meanwhile the Committed! notification shows up in fidget.
  • :wq -> cusor moves to the fidget notification floating window (if I hit <CR> before the notification window is closed).

Here's the weird part:

I cannot reproduce the behaviour if I manually trigger the notification that Neogit sends with

:lua vim.notify("Committed!", vim.log.levels.INFO, { title = "Neogit", icon = "󰊢" })

As I've only observed this behaviour with neogit notifications, I decided to put this in the Q&A.
It's probably not a fidget.nvim bug...

Response by **j-hui** March 18, 2024

Ah interesting, do you also get this error message?

"somefile" 3L, 11B written
E37: No write since last change
E162: No write since last change for buffer "[No Name]"
Press ENTER or type command to continue

I'm able to reproduce this issue, though am a little puzzled about what the cause might be. In particular, I'm not sure which buffer it is that was modified but has unsaved changes (the buffer for the Git-tracked somefile is clean).

Response by **mrcjkb** March 20, 2024

Yes, I think I was seeing similar error messages.

Response by **mrcjkb** March 21, 2024

Yep, I can confirm I am getting the same error message.
It's quite consistent with neogit, but I haven't observed it anywhere else.

@j-hui j-hui added the bug Something isn't working label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant