Fix panic folding in multi-buffers (#21511)
Closes #19054 Rename `max_buffer_row()` to `widest_line_number()` to (hopefully) prevent people assuming it means the same as `max_point().row`. Release Notes: - Fixed a panic when folding in a multibuffer
This commit is contained in:
parent
e231321655
commit
196fd65601
10 changed files with 46 additions and 40 deletions
|
@ -1866,7 +1866,7 @@ fn end_of_document(
|
|||
let new_row = if let Some(line) = line {
|
||||
(line - 1) as u32
|
||||
} else {
|
||||
map.max_buffer_row().0
|
||||
map.buffer_snapshot.max_row().0
|
||||
};
|
||||
|
||||
let new_point = Point::new(new_row, point.column());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue