fixed replace bug
This commit is contained in:
parent
a6e71b377e
commit
338c5302e3
|
@ -1 +1 @@
|
||||||
{"tabs":["/home/penwing/Documents/notes/victory2.txt","untitled"],"theme":6}
|
{"tabs":["/home/penwing/Documents/notes/victory2.txt"],"theme":6}
|
|
@ -212,9 +212,14 @@ impl SearchWindow {
|
||||||
self.search(tabs, &mut *selected_tab);
|
self.search(tabs, &mut *selected_tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let mut done : Vec<TabNumber> = vec![];
|
||||||
for element in &self.results {
|
for element in &self.results {
|
||||||
|
if done.contains(&element.tab) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
tabs[element.tab.to_index()].code = tabs[element.tab.to_index()].code.replace(&self.search_text, &self.replace_text);
|
tabs[element.tab.to_index()].code = tabs[element.tab.to_index()].code.replace(&self.search_text, &self.replace_text);
|
||||||
tabs[element.tab.to_index()].saved = false;
|
tabs[element.tab.to_index()].saved = false;
|
||||||
|
done.push(element.tab.clone())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue