Skip to content
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

don't resize pane with delta #6062

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

don't resize pane with delta #6062

wants to merge 1 commit into from

Conversation

yshui
Copy link

@yshui yshui commented Aug 30, 2024

say the pane with 100 cols wide, we got 3 mouse events, one move the split to 99, the next one move it to 98, then to 90

we would first call resize_split_by with -1, -1, then with -8. the first resize is completed just as we call resize_split_by(-8), this triggers a resync, and updates the split position to 99. because of that resize_split_by(-8) will try to resize it to 91, instead of the desire 90.

in practice, there are a lot more mouse events and the timing is more unpredictable, the end result can be very chaotic.

partially fix #5142

(here is a clip illustrating the problem: https://fosstodon.org/@yshui/113013856546255206)

@yshui
Copy link
Author

yshui commented Aug 30, 2024

there are more issues that need to be fixed to resolve #5142

there is a feedback loop: (client) resize -> (server) resize -> (client) resync -> (client) resize.
there is an issue with display size vs real size.

and there is another issue that cause the server to become unresponsive after the client sent it a large number of messages. this one i haven't started looking into yet.

say the pane with 100 cols wide, we got 3 mouse events, one move the
split to 99, the next one move it to 98, then to 90

we would first call resize_split_by with -1, -1, then with -8. the first
resize is completed just as we call resize_split_by(-8), this triggers a
resync, and updates the split position to 99. because of that
resize_split_by(-8) will try to resize it to 91, instead of the desire
90.

in practice, there are a lot more mouse events and the timing is more
unpredictable, the end result can be very chaotic.

partially fix wez#5142
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.

resizing in mux domains has issues
1 participant