Open parsiad opened 1 year ago
Hi, thanks for the PR. How does it affect the usage of the plugin? :sweat_smile:
Just to understand the issue being solved
Oh, I see #92
Please merge @WhiteBlackGoose , _get_char_pixelsize
is used as a hint, returning None is good enough, no need to throw.
I am facing this issue even when vim.g.magma_image_provider="kitty"
.
Testing this PR locally and ImageOutputChunk is properly displayed. Before this I was getting the assert failure.
For context, I have ueberzug installed in my system python, and magma was failing with this error always, except when opening nvim inside a virtual environment WITHOUT ueberzug (because the function _get_char_pixelsize
returned None earlier, before hitting the assert). In the venv without ueberzug, the image was displayed correctly.
Inside neovim, the command
outputs
None
. On an arbitrary terminal, it returns the correct pts path.I haven't looked into why this occurs, but a simple fix is to fail gracefully in this case instead of firing an assertion.