You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i switch from the rendered markdown buffer to a different buffer (i have an own UI thing that uses vim.api.nvim_win_set_bufunder the hood) the conceallevel for the window is not reset, which sucks if i switch from markdown to another filetype.
Expected behavior
Conceallevel is reset when i switch buffers.
Healthcheck output
render-markdown: require("render-markdown.health").check()
render-markdown.nvim [version]
- OK plugin 7.3.11
- OK neovim >= 0.10
render-markdown.nvim [configuration]
- OK valid
render-markdown.nvim [nvim-treesitter]
- OK installed
- OK markdown: parser installed
- OK markdown: highlight enabled
- OK markdown_inline: parser installed
- OK markdown_inline: highlight enabled
- OK latex: parser installed
render-markdown.nvim [executables]
- OK latex2text: installed
render-markdown.nvim [conflicts]
- OK headlines: not installed
- OK obsidian: not installed
I have updated this plugin to the latest version using my plugin manager
I have provided the text contained in all screenshots as raw text in this issue. This means if there is a screenshot below it is the copy pasted contents of the file in the screenshot. I understand that my issue will be closed if I have not.
Additional information
No response
The text was updated successfully, but these errors were encountered:
## Details
Issue: #209
Currently when a user leaves a buffer we render the buffer.
This works as expected when a user is say switching between multiple windows.
However if a user re-uses the current window for another buffer it will
have the window options applied as if it is rendered markdown, i.e. a
conceallevel of 3, which is unepected. This can also occur if a plugin
opens a buffer in the window via the `nvim_win_set_buf` API.
This occurs because at the time the update is triggered the buffer and
window are associated with each other, however due to the use of
vim.schedule when the update occurs this may not longer be the case.
To fix this add a check that the buffer is the one associated with the
window being updated. Include this in the `util.valid` logic so it will
be used at the time the update is triggered and at the time it is
actually ran.
Other minor changes:
- Remove `buf` field from `BufferState`
- Updated window related utility functions
- Remove wrapper functions where they are not needed, i.e. all the
renderers will work out of the box no need to add one in each module
Neovim version (nvim -v)
0.10.2
Neovim distribution
N/A
Operating system
Linux
Terminal emulator / GUI
foot
Describe the bug
When i switch from the rendered markdown buffer to a different buffer (i have an own UI thing that uses
vim.api.nvim_win_set_buf
under the hood) theconceallevel
for the window is not reset, which sucks if i switch from markdown to another filetype.Expected behavior
Conceallevel is reset when i switch buffers.
Healthcheck output
Plugin configuration
Plugin error log
Confirmations
Additional information
No response
The text was updated successfully, but these errors were encountered: