editor: add select previous command (#2556)
Added a `select previous` command to complement `select next`. Release Notes: - Added "Select previous" editor command, mirroring `Select next`. Ticket number: Z-366
This commit is contained in:
parent
571d2f4966
commit
345fad3e9d
8 changed files with 316 additions and 10 deletions
|
@ -1749,6 +1749,12 @@ impl BufferSnapshot {
|
|||
self.visible_text.bytes_in_range(start..end)
|
||||
}
|
||||
|
||||
pub fn reversed_bytes_in_range<T: ToOffset>(&self, range: Range<T>) -> rope::Bytes<'_> {
|
||||
let start = range.start.to_offset(self);
|
||||
let end = range.end.to_offset(self);
|
||||
self.visible_text.reversed_bytes_in_range(start..end)
|
||||
}
|
||||
|
||||
pub fn text_for_range<T: ToOffset>(&self, range: Range<T>) -> Chunks<'_> {
|
||||
let start = range.start.to_offset(self);
|
||||
let end = range.end.to_offset(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue