Use Project::search in ProjectFind and show search results

This commit is contained in:
Antonio Scandurra
2022-02-25 10:32:45 +01:00
parent 5644336df3
commit 0bf944e038
12 changed files with 484 additions and 336 deletions
+6
View File
@@ -48,6 +48,12 @@ impl Rope {
*self = new_rope;
}
pub fn slice(&self, range: Range<usize>) -> Rope {
let mut cursor = self.cursor(0);
cursor.seek_forward(range.start);
cursor.slice(range.end)
}
pub fn push(&mut self, text: &str) {
let mut new_chunks = SmallVec::<[_; 16]>::new();
let mut new_chunk = ArrayString::new();