Commit 1887722e authored by Committed by GitHub
Fix rendering of selections outside the viewport
When rendering selections with both start and end outside of the visible area, Alacritty would assume that both start and end are either above or below the viewport and not render the selection at all. To fix this the `buffer_line_to_visible` method now returns a `ViewportPosition` instead of an `Option<Line>`, this allows giving more feedback about where outside of the visible region the line is using the `ViewportPosition::Above` and `ViewportPosition::Below` variants. Using these newly introduced variants, a selection spanning the whole screen is now rendered if the selection should go from above the visible area to below it. This fixes #1557.
Showing with 23 additions and 24 deletions