resolve clippy errors from using Range in reverse. Add CaretSelection to represent a bidirectional inclusive range

This commit is contained in:
temportalflux
2026-07-11 09:31:07 -04:00
parent 8c0d58c86b
commit 0daa97cd47
2 changed files with 231 additions and 190 deletions
@@ -40,7 +40,7 @@ pub struct HistoryEntry {
/// The length of the new text that replaced old_text (to know how much to remove on undo).
pub new_text_len: usize,
/// The selection range before the edit.
pub selected_range: Range<usize>,
pub selected_range: (usize, usize),
/// Timestamp for grouping consecutive edits.
pub timestamp: Instant,
}
@@ -61,7 +61,7 @@ impl EditableTextHistory {
range: Range<usize>,
old_text: &str,
new_text_len: usize,
selected_range: Range<usize>,
selected_range: (usize, usize),
) {
let now = Instant::now();
File diff suppressed because it is too large Load Diff