Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)