flip selections

This commit is contained in:
alice pellerin
2026-03-21 00:30:03 -05:00
parent fdd9ddd6ff
commit 414b545a5c
3 changed files with 18 additions and 0 deletions
+4
View File
@@ -51,6 +51,10 @@ impl Cursor {
self.tail = self.head;
}
pub const fn flip(&mut self) {
swap(&mut self.head, &mut self.tail);
}
// TODO: in visual mode, should only clamp head
pub fn clamp(&mut self, scroll_position: usize, screen_size: usize) {
let max_row = scroll_position + screen_size - 1;