Provide search functionality through the TUI #134
@ -243,7 +243,7 @@ macro_rules! library_collection {
|
|||||||
name: "The Album_Artist ‘C’".to_string(),
|
name: "The Album_Artist ‘C’".to_string(),
|
||||||
},
|
},
|
||||||
sort: Some(ArtistId {
|
sort: Some(ArtistId {
|
||||||
name: "Album_Artist ‘C’, The".to_string(),
|
name: "Album_Artist ‘C’, The".to_string(),
|
||||||
}),
|
}),
|
||||||
musicbrainz: None,
|
musicbrainz: None,
|
||||||
properties: HashMap::new(),
|
properties: HashMap::new(),
|
||||||
|
@ -228,17 +228,13 @@ impl ArtistSelection {
|
|||||||
// https://wiki.musicbrainz.org/User:Yurim/Punctuation_and_Special_Characters.
|
// https://wiki.musicbrainz.org/User:Yurim/Punctuation_and_Special_Characters.
|
||||||
if asciify {
|
if asciify {
|
||||||
normalized
|
normalized
|
||||||
.replace("‐", "-") // U+2010 hyphen
|
// U+2010 hyphen, U+2012 figure dash, U+2013 en dash, U+2014 em dash,
|
||||||
.replace("‒", "-") // U+2012 figure dash
|
// U+2015 horizontal bar
|
||||||
.replace("–", "-") // U+2013 en dash
|
.replace(['‐', '‒', '–', '—', '―'], "-")
|
||||||
.replace("—", "-") // U+2014 em dash
|
.replace(['‘', '’'], "'") // U+2018, U+2019
|
||||||
.replace("―", "-") // U+2015 horizontal bar
|
.replace(['“', '”'], "\"") // U+201C, U+201D
|
||||||
.replace("‘", "'") // U+2018
|
.replace('…', "...") // U+2026
|
||||||
.replace("’", "'") // U+2019
|
.replace('−', "-") // U+2212 minus sign
|
||||||
.replace("“", "\"") // U+201C
|
|
||||||
.replace("”", "\"") // U+201D
|
|
||||||
.replace("…", "...") // U+2026
|
|
||||||
.replace("−", "-") // U+2212 minus sign
|
|
||||||
} else {
|
} else {
|
||||||
normalized
|
normalized
|
||||||
}
|
}
|
||||||
|
@ -150,10 +150,10 @@ impl<APP: IAppInteract> IEventHandlerPrivate<APP> for EventHandler {
|
|||||||
match key_event.code {
|
match key_event.code {
|
||||||
KeyCode::Char('s') | KeyCode::Char('S') => {
|
KeyCode::Char('s') | KeyCode::Char('S') => {
|
||||||
app.search_next();
|
app.search_next();
|
||||||
},
|
}
|
||||||
KeyCode::Char('g') | KeyCode::Char('G') => {
|
KeyCode::Char('g') | KeyCode::Char('G') => {
|
||||||
app.cancel_search();
|
app.cancel_search();
|
||||||
},
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -378,8 +378,9 @@ impl Minibuffer<'_> {
|
|||||||
AppState::Search(ref s) => Minibuffer {
|
AppState::Search(ref s) => Minibuffer {
|
||||||
paragraphs: vec![
|
paragraphs: vec![
|
||||||
Paragraph::new(format!("I-search: {s}")),
|
Paragraph::new(format!("I-search: {s}")),
|
||||||
Paragraph::new(format!("ctrl+s: search next")).alignment(Alignment::Center),
|
Paragraph::new("ctrl+s: search next".to_string()).alignment(Alignment::Center),
|
||||||
Paragraph::new(format!("ctrl+g: cancel search")).alignment(Alignment::Center),
|
Paragraph::new("ctrl+g: cancel search".to_string())
|
||||||
|
.alignment(Alignment::Center),
|
||||||
],
|
],
|
||||||
columns,
|
columns,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user