Change to Range::point and fix keymap formatting

This commit is contained in:
Steven 2024-01-30 13:44:41 -05:00
parent 091ec45740
commit 0c5e277244
2 changed files with 36 additions and 36 deletions

View File

@ -109,7 +109,7 @@ #### Shell
### Selection manipulation ### Selection manipulation
| Key | Description | Command | | Key | Description | Command |
|----------------------| ----------- | ------- | | ----- | ----------- | ------- |
| `s` | Select all regex matches inside selections | `select_regex` | | `s` | Select all regex matches inside selections | `select_regex` |
| `S` | Split selection into sub selections on regex matches | `split_selection` | | `S` | Split selection into sub selections on regex matches | `split_selection` |
| `Alt-s` | Split selection on newlines | `split_selection_on_newline` | | `Alt-s` | Split selection on newlines | `split_selection_on_newline` |

View File

@ -1818,8 +1818,8 @@ fn select_first_and_last_chars(cx: &mut Context) {
let selection = doc.selection(view.id).clone().transform_iter(|range| { let selection = doc.selection(view.id).clone().transform_iter(|range| {
[ [
Range::new(range.from(), graphemes::next_grapheme_boundary(text, range.from())), Range::point(range.from()),
Range::new(graphemes::prev_grapheme_boundary(text, range.to()), range.to()) Range::point(graphemes::prev_grapheme_boundary(text, range.to())),
] ]
.into_iter() .into_iter()
}); });