Skip to content

Conversation

@argizuno
Copy link
Contributor

@argizuno argizuno commented Dec 9, 2024

fix an issue where closing a window occasionally triggers an error due to an invalid window reference:

Error detected while processing BufLeave Autocommands for "<buffer=2>":
Error executing lua callback: ...y/render-markdown.nvim/lua/render-markdown/core/util.lua:38: Invalid 'window': Expected Lua number
stack traceback:
        [C]: in function 'nvim_win_is_valid'
        ...y/render-markdown.nvim/lua/render-markdown/core/util.lua:38: in function 'valid'
        ...azy/render-markdown.nvim/lua/render-markdown/core/ui.lua:80: in function 'update'
        ...azy/render-markdown.nvim/lua/render-markdown/manager.lua:77: in function <...azy/render-markdown.nvim/lua/render-markdown/manager.lua:70>

@MeanderingProgrammer
Copy link
Owner

Thanks for the PR!

@MeanderingProgrammer MeanderingProgrammer merged commit bc8a681 into MeanderingProgrammer:main Dec 9, 2024
@MeanderingProgrammer
Copy link
Owner

I updated the logic to run the nil check prior to calling update: eb8fdac

Just so the type annotations are still meaningful, if the issue crops up again please LMK!

@argizuno
Copy link
Contributor Author

It seems to be working! Thank you, and keep up the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants