upstream text-utils to text_unit

This commit is contained in:
Aleksey Kladov 2019-01-08 21:50:04 +03:00
parent c9e42fcf24
commit f553837c1c
10 changed files with 20 additions and 44 deletions

View file

@ -1,5 +1,4 @@
use crate::AtomTextEdit;
use crate::text_utils::contains_offset_nonstrict;
use text_unit::{TextRange, TextUnit};
#[derive(Debug, Clone)]
@ -28,7 +27,7 @@ impl TextEditBuilder {
pub fn invalidates_offset(&self, offset: TextUnit) -> bool {
self.atoms
.iter()
.any(|atom| contains_offset_nonstrict(atom.delete, offset))
.any(|atom| atom.delete.contains_inclusive(offset))
}
}