Skip to content

Add functions SetContentLineCount and OverwriteLinesAndClearEverythingElse #53

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

Merged
merged 4 commits into from
Jun 23, 2024

Conversation

stefanhaller
Copy link
Collaborator

Needed for jesseduffield/lazygit#2533, and reviewed as part of it.

There is no need to overwrite things with spaces; since tcell clears the whole
surface before drawing, it is enough to just truncate the line at the current
write position.
It is similar to OverwriteLines, except that it also clears all lines outside of
the area that was rerendered. This is needed for views that only draw the
visible portion of their model, to ensure that cells for invisble lines don't
accumulate as you scroll.
@stefanhaller stefanhaller merged commit 05e1204 into master Jun 23, 2024
1 check passed
@stefanhaller stefanhaller deleted the OverwriteLinesAndClearEverythingElse branch June 23, 2024 09:52
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.

1 participant