resolve clippy errors from using Range in reverse. Add CaretSelection to represent a bidirectional inclusive range
This commit is contained in:
@@ -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).
|
/// The length of the new text that replaced old_text (to know how much to remove on undo).
|
||||||
pub new_text_len: usize,
|
pub new_text_len: usize,
|
||||||
/// The selection range before the edit.
|
/// The selection range before the edit.
|
||||||
pub selected_range: Range<usize>,
|
pub selected_range: (usize, usize),
|
||||||
/// Timestamp for grouping consecutive edits.
|
/// Timestamp for grouping consecutive edits.
|
||||||
pub timestamp: Instant,
|
pub timestamp: Instant,
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ impl EditableTextHistory {
|
|||||||
range: Range<usize>,
|
range: Range<usize>,
|
||||||
old_text: &str,
|
old_text: &str,
|
||||||
new_text_len: usize,
|
new_text_len: usize,
|
||||||
selected_range: Range<usize>,
|
selected_range: (usize, usize),
|
||||||
) {
|
) {
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user