|
@@ -229,21 +229,24 @@ class ZefyrController extends ChangeNotifier {
|
229
|
229
|
SearchResultEntity search(String text) {
|
230
|
230
|
SearchResultEntity result = document.search(text);
|
231
|
231
|
updateSelection(TextSelection.collapsed(offset: result.offset), source: ChangeSource.remote);
|
232
|
|
- notifyListeners();
|
|
232
|
+ return result;
|
|
233
|
+ }
|
|
234
|
+
|
|
235
|
+ SearchResultEntity closeSearch() {
|
|
236
|
+ SearchResultEntity result = document.search();
|
|
237
|
+ updateSelection(TextSelection.collapsed(offset: result.offset), source: ChangeSource.remote);
|
233
|
238
|
return result;
|
234
|
239
|
}
|
235
|
240
|
|
236
|
241
|
SearchResultEntity searchPrev() {
|
237
|
242
|
SearchResultEntity result = document.searchPrev();
|
238
|
243
|
updateSelection(TextSelection.collapsed(offset: result.offset), source: ChangeSource.remote);
|
239
|
|
- notifyListeners();
|
240
|
244
|
return result;
|
241
|
245
|
}
|
242
|
246
|
|
243
|
247
|
SearchResultEntity searchNext() {
|
244
|
248
|
SearchResultEntity result = document.searchNext();
|
245
|
249
|
updateSelection(TextSelection.collapsed(offset: result.offset), source: ChangeSource.remote);
|
246
|
|
- notifyListeners();
|
247
|
250
|
return result;
|
248
|
251
|
}
|
249
|
252
|
|