-
Notifications
You must be signed in to change notification settings - Fork 705
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
[BUG] %val{window_range} returns wrong values during WinCreate #4975
Comments
I am wondering what the correct behaviour should be here, at the point we run WinCreate, the window has no highlighters, cursors, or even dimensions. At first I thought this was an issue introduced by 9787756 but it seems this never worked. I am tempted to just fix the uninitialized values and end-up with 0 0 0 0 there, but I wonder what the use case for accessing window range on WinCreate might be. |
I encountered this with my fork of the scrollbar plugin, which uses the "coord_y" and "height" fields of Because I want a scrollbar in every window, I have However, now I've looked a little closer, I see an additional problem. I had assumed my It turns out no, that's not how it works. Given the initial values are visible in For the purposes of my scrollbar plugin, it'd also be nice to have a |
Version of Kakoune
v2023.08.05-29-gbe1a61a2
Reproducer
Launch Kakoune, and get it to log
%val{window_range}
in aWinCreate
hook:Switch to the
*debug*
buffer:Outcome
For me, building Kakoune with
make
, I get something like:If I build with
debug=yes sanitize=undefined
, I get:If I build with
debug=yes sanitize=address
, I get:Expectations
The four fields of
window_range
are "coord_y coord_x height width", so I would expect something like (based on a full-screen terminal):Additional information
If I run
echo %val{window_range}
manually after starting Kakoune, what I get is0 0 67 0
. I'm not sure if it's intentional for the width to be 0, but it happens even in v2023.08.05.The text was updated successfully, but these errors were encountered: