mirror of
https://github.com/figsoda/mmtc
synced 2024-11-22 23:23:05 +00:00
reselect after query getting truncated
This commit is contained in:
parent
e7950ae48e
commit
83593262f0
1 changed files with 6 additions and 4 deletions
10
src/main.rs
10
src/main.rs
|
@ -514,11 +514,13 @@ async fn run() -> Result<()> {
|
|||
tx.send(Command::UpdateSearch).await?;
|
||||
}
|
||||
Command::BackspaceSearch => {
|
||||
query.pop();
|
||||
if query.is_empty() {
|
||||
tx.send(Command::UpdateFrame).await?;
|
||||
} else {
|
||||
let c = query.pop();
|
||||
if !query.is_empty() {
|
||||
tx.send(Command::UpdateSearch).await?;
|
||||
} else if c.is_some() {
|
||||
selected = status.song.map_or(0, |song| song.pos);
|
||||
liststate.select(Some(selected));
|
||||
tx.send(Command::UpdateFrame).await?;
|
||||
}
|
||||
}
|
||||
Command::UpdateSearch => {
|
||||
|
|
Loading…
Reference in a new issue