Fixes to excerpt movement actions and bindings + add multibuffer and singleton_buffer key contexts (#26264)

Closes #26002 

Release Notes:

- Added `multibuffer` key context.
- `cmd-down` and `cmd-shift-down` on Mac now moves to the end of the
last line of a singleton buffer instead of the beginning. In
multibuffers, these now move to the start of the next excerpt.
- Fixed `vim::PreviousSectionEnd` (bound to `[ ]`) to move to the
beginning of the line, matching the behavior of `vim::NextSectionEnd`.
- Added `editor::MoveToStartOfNextExcerpt` and
`editor::MoveToEndOfPreviousExcerpt`.
This commit is contained in:
Michael Sloan 2025-03-07 17:58:47 -07:00 committed by GitHub
parent 60b3eb3f76
commit 450d727a04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 127 additions and 12 deletions

View file

@ -448,7 +448,9 @@ pub fn end_of_excerpt(
if start.row() > DisplayRow(0) {
*start.row_mut() -= 1;
}
map.clip_point(start, Bias::Left)
start = map.clip_point(start, Bias::Left);
*start.column_mut() = 0;
start
}
Direction::Next => {
let mut end = excerpt.end_anchor().to_display_point(&map);