mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
emit beep on search result is empty
This commit is contained in:
parent
320a97f9fb
commit
61fd237b80
1 changed files with 7 additions and 2 deletions
|
|
@ -11,8 +11,8 @@ use result::Result;
|
|||
|
||||
use gtk::{
|
||||
prelude::{
|
||||
BoxExt, ButtonExt, CheckButtonExt, EditableExt, EntryExt, TextBufferExt, TextViewExt,
|
||||
WidgetExt,
|
||||
BoxExt, ButtonExt, CheckButtonExt, DisplayExt, EditableExt, EntryExt, TextBufferExt,
|
||||
TextViewExt, WidgetExt,
|
||||
},
|
||||
Align, Box, Orientation, TextIter, TextSearchFlags, TextView,
|
||||
};
|
||||
|
|
@ -214,6 +214,11 @@ fn find(subject: &Subject, request: &str, is_match_case: bool) -> Vec<(TextIter,
|
|||
next = match_end;
|
||||
result.push((match_start, match_end));
|
||||
}
|
||||
|
||||
if result.is_empty() {
|
||||
subject.text_view.display().beep()
|
||||
}
|
||||
|
||||
result
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue