8000 bug: Vimscript function must not be called in a fast event context · Issue #997 · folke/noice.nvim · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bug: Vimscript function must not be called in a fast event context #997

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

Closed
4 tasks done
Tracked by #998
b0o opened this issue Nov 15, 2024 · 5 comments · Fixed by #995
Closed
4 tasks done
Tracked by #998

bug: Vimscript function must not be called in a fast event context #997

b0o opened this issue Nov 15, 2024 · 5 comments · Fixed by #995
Labels
bug Something isn't working

Comments

@b0o
Copy link
b0o commented Nov 15, 2024

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.11.0-dev-1161+g6ef80eb42c

Operating system/version

Arch Linux 6.11.7

Describe the bug

Run :echo "test" or any other command which causes Noice to print a message.

An error happened while handling a ui event
....local/share/nvim/lazy/nui.nvim/lua/nui/text/init.lua:31: E5560: Vimscript function must not be called in a fast event context

stack traceback:
	...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:144: in function <...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:143>
	[C]: in function 'strlen'
	....local/share/nvim/lazy/nui.nvim/lua/nui/text/init.lua:31: in function 'set'
	....local/share/nvim/lazy/nui.nvim/lua/nui/text/init.lua:18: in function 'init'
	.../.local/share/nvim/lazy/nui.nvim/lua/nui/object/init.lua:132: in function 'NuiText'
	....local/share/nvim/lazy/nui.nvim/lua/nui/line/init.lua:20: in function '_append'
	...ocal/share/nvim/lazy/noice.nvim/lua/noice/text/block.lua:186: in function 'append'
	...ocal/share/nvim/lazy/noice.nvim/lua/noice/text/block.lua:129: in function 'set'
	...y/.local/share/nvim/lazy/noice.nvim/lua/noice/ui/msg.lua:108: in function 'handler'
	.../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:190: in function <.../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:189>
	[C]: in function 'xpcall'
	...local/share/nvim/lazy/noice.nvim/lua/noice/util/call.lua:149: in function 'safe_handle'
	.../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:95: in function <.../.local/share/nvim/lazy/noice.nvim/lua/noice/ui/init.lua:77>
	[C]: in function 'nvim_out_write'
	vim/_editor.lua: in function 'print'
	[string ":lua"]:1: in main chunk

This issue started happening as of neovim/neovim@de48fbb (neovim/neovim#27874), which changes vim.ui_attach message callbacks to execute in fast context.

@b0o b0o added the bug Something isn't working label Nov 15, 2024
@folke folke closed this as completed in a802e17 Nov 15, 2024
@folke
Copy link
Owner
folke commented Nov 15, 2024

Should be fixed now.
msg_show events are no longer processed realtime, so this might have other side-effects.
Let me know if you notice anything else broken.

Thank you for reporting!

folke pushed a commit that referenced this issue Nov 15, 2024
🤖 I have created a release *beep* *boop*
---


## [4.7.1](v4.7.0...v4.7.1)
(2024-11-15)


### Bug Fixes

* **scrollbar:** hide on WinClosed. Fixes
[#949](#949)
([ca2e3fe](ca2e3fe))
* **ui:** fix ext_messages in fast_events. Fixes
[#997](#997)
([a802e17](a802e17))
* **view:** never set winblend when transparent. Fixes
[#971](#971)
([fd7625e](fd7625e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@b0o
Copy link
Author
b0o commented Nov 15, 2024

Thanks for the quick fix! One issue now is if you try searching with / for a pattern which doesn't exist in the buffer, the "not found" message isn't printed and the search bar gets stuck until you do something to trigger a redraw.

@b0o
Copy link
Author
b0o commented Nov 15, 2024

Also a similar thing happens with a mapping like :confirm qall with unsaved changes.

@folke
Copy link
Owner
folke commented Nov 15, 2024

Yeah indeed. Some things are broken now...
Not sure how I can fix that confirm message.

The searching thing works for me with Snacks.notifier.
nvim-notify has some issues with redraw.

@folke
Copy link
Owner
folke commented Nov 15, 2024

Opened a tracking issue. Feel free to add anything else you find is broken...

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

Successfully merging a pull request may close this issue.

2 participants
0