-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
screenchar()/screenstring() with multigrid #29135
Comments
I am afraid this is impossible. The entire point of multigrid is to break the assumptions that positions form a single monospace grid, which is the assumption that screenchar/screenstring relies on. These functions historically always have exited for testing purposes, rather than ordinary use, and we have other ways to test multigrid state (use the RPC api just like in actual use).
There is no point in ever wanting to do this when |
Would it be possible to make this optional, or even per window like the documentation suggests?
Neovide aims to be a drop-in replacement for the terminal mode Neovim, with a few enhanchements like smooth scrolling, simple animations, true transparency, shadows and so on. And for that we need the bullet point below of multigrid, but not necessary the other points
We probably want to enable custom and even variable fonts at some point, but that needs special consideration and perhaps new Neovim features, and it should never interfer with the base functionality like window navigation or break plugins. Especially variable fonts need a lot of thought, like how are the lines wrapped, the current protocol only sends the parts it thinks are visible, which makes it almost impossible to implement with the current protocol. Running the compositor when multigrid is enabled would also allow issues like these to be resolved
The API documentation does not specify that it's only for testing, and it's used in the wild by plugins that are broken in Neovide, for example https://github.com/luukvbaal/statuscol.nvim/blob/483b9a596dfd63d541db1aa51ee6ee9a1441c4cc/lua/statuscol.lua#L143. I'm not a Neovim api expert, but I don't think there's a viable alternative for that functionality currently, and a plugin should not have to care about if multigrid is enabled or not, unless it's specifically written with multigrid in mind. I think the above plugin might also be broken due to the mouse position issue, which also does not have a viable alternative when you click outside a window, like you need there. A responsive scrollbar also need to be able to track the mouse position globally, so this is not the only use case for it.
Yes, you could copy paste the whole content of |
Problem
When multigrid is enabled, the screenchar/screenstring functions do not return the correct data. See neovide/neovide#2569 for the original report.
Steps to reproduce
Modify the
screenchar_spec.lua
test to use multigrid and observe that it's failing.Expected behavior
Multigrid should not affect the functionality of
screenchar
.Neovim version (nvim -v)
NVIM v0.10.0
Vim (not Nvim) behaves the same?
N/A
Operating system/version
Arch Linux
Terminal name/version
Neovide 0.13.1
$TERM environment variable
xterm-256color
Installation
pacman
The text was updated successfully, but these errors were encountered: