Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix panic when drawing at the edge of the screen.
When pressing tab at the edge of the screen, Helix panics in debug mode subtracting position.col - self.offset.col. I don't fully understand the logic here, but if cut_off_start < width, then self.offset.col - position.col < width (from the definition of cut_off_start), and so self.position.col + width > self.offset.col, meaning in_bounds is true and the second condition is currently unreachable. I believe these conditions should be reversed so that the logic for rendering partially visible characters can apply properly.
- Loading branch information