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
However I noticed that occasionally the sizes are incorrect, like for example even though the kitty would open to the same size, in the log file it would be:
This breaks the code that relies on $LINES and $COLUMNS to be correct during zsh initialization.
Annoyingly this doesn't happen consistently and I still struggle to find a reproducible set of steps...
When the above scenario triggers, if I then echo $LINES it would no longer be 13, it would be 68, so at some point after initialization the values get corrected, but they are wrong at the time of evaluating .zshrc.
I suspect this is related to sway, either giving you incorrect information when you create a window, or some miscalculation is happening on kitty's side. It's not super reliable but an action that seems to trigger the issue a bit more often is to change a display resolution or scale, e.g. I would switch between two scales back and forth and open kitty instances in the meantime and observing the log file.
Could you think of anything I can do to narrow this issue down? If the root cause is in sway, I will be happy to move the issue to their bug tracker, but I thought I would first check in with you, maybe this is something that needs to be done on kitty's end, or maybe we at least find a way to consistently reproduce this and construct a simplest possible example for sway's bug tracker...
I believe there is already a ticket about this in the sway tracker. Am
not at my computer right now so cant search for it. If the window
manager resizes a kitty window after initial creation, then there is an
inherent race between the child process starting up and the kitty window
being resized and kitty calling the ioctl to inform the child of the
changed size. As I recall, sway initially gives client windows some
size and then once they are placed a new size conforming with the layout
on whatever workspace they are placed in.
I added the following to the very top of my
.zshrc
:I'm on sway and default layout is
tabbed
, meaning that kitty usually is supposed to open with the exact same window dimensions.Usually it prints this:
However I noticed that occasionally the sizes are incorrect, like for example even though the kitty would open to the same size, in the log file it would be:
This breaks the code that relies on
$LINES
and$COLUMNS
to be correct during zsh initialization.Annoyingly this doesn't happen consistently and I still struggle to find a reproducible set of steps...
When the above scenario triggers, if I then
echo $LINES
it would no longer be13
, it would be68
, so at some point after initialization the values get corrected, but they are wrong at the time of evaluating.zshrc
.I suspect this is related to sway, either giving you incorrect information when you create a window, or some miscalculation is happening on kitty's side. It's not super reliable but an action that seems to trigger the issue a bit more often is to change a display resolution or scale, e.g. I would switch between two scales back and forth and open kitty instances in the meantime and observing the log file.
Could you think of anything I can do to narrow this issue down? If the root cause is in sway, I will be happy to move the issue to their bug tracker, but I thought I would first check in with you, maybe this is something that needs to be done on kitty's end, or maybe we at least find a way to consistently reproduce this and construct a simplest possible example for sway's bug tracker...
Environment details
OS: Arch Linux, kitty 0.19.1, sway 1.5
`kitty --debug-config`
Additional context
I have confirmed that it does reproduce with
kitty --config NONE
.The text was updated successfully, but these errors were encountered: