Fix panic in visual line mode with folds (#10284)
Fixes: #10266 Release Notes: - Added/Fixed/Improved ... ([#<public_issue_number_if_exists>](https://github.com/zed-industries/zed/issues/<public_issue_number_if_exists>)). Optionally, include screenshots / media showcasing your addition that can be included in the release notes. **or** - N/A
This commit is contained in:
parent
56c0345cf3
commit
e826ef83e2
3 changed files with 33 additions and 10 deletions
|
@ -433,7 +433,10 @@ impl DisplaySnapshot {
|
|||
} else if range.start.row == self.max_buffer_row()
|
||||
|| (range.end.column > 0 && range.end.row == self.max_buffer_row())
|
||||
{
|
||||
Point::new(range.start.row - 1, self.line_len(range.start.row - 1))
|
||||
Point::new(
|
||||
range.start.row - 1,
|
||||
self.buffer_snapshot.line_len(range.start.row - 1),
|
||||
)
|
||||
} else {
|
||||
self.prev_line_boundary(range.start).0
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue