-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace
viewport_y
with viewport_mark->bline->line_index
way back in the beginning, there was `viewport_y`. then in commit ad84c0f, `viewport_bline` was added as a perf shortcut for accessing the bline at `viewport_y`. in commit 2273cde, `viewport_mark` replaced `viewport_bline` to prevent use-after-free errors. and today we remove `viewport_y` entirely as it's redundant, and was causing a viewport bug described below. open a buffer with output from `seq 1 <N>` where N is greater than your terminal's line count. split the buffer and move the cursor to eof in the split. switch back to the original buffer. now start deleting lines from the top of the buffer. you'll notice the split will start rendering incorrectly around eof. this was due to `viewport_y` falling out of sync with `viewport_mark`. currently, we don't have a way to write viewport tests as tests run in headless mode. in the future we could do something similar to the termbox2 tests.
- Loading branch information
Showing
4 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters