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

fix: edge case where buffer is added two times to buffers component #1134

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

Conversation

potamides
Copy link

@potamides potamides commented Nov 3, 2023

The total length check for the buffers component first checks if it has enough space to add a before buffer, then adds it and then checks it for buffers after the current one. If that second check fails the before buffer is added a second time to the buffer component, this time as an ellipsis which can lead to confusing behavior and unwanted visual artifacts. This commit fixes this problem.

Here is a screenshot to better illustrate the issue. Note the missing bar after the ellipsis:

Before:
2023-11-03-084028_557x33_scrot

After:
2023-11-03-084123_570x31_scrot

The total length check for the buffers component first checks if it has
enough space to add a before before, then adds it and then checks it for
buffers after the current one. If that second check fails the before
buffer is added a second time to the buffer component, this time as an
ellipsis which can lead to confusing behavior and unwanted visual artifacts.
This commit fixes this problem.
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.

None yet

1 participant