Skip to content

Commit

Permalink
fix: reset to normal mode on yank failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Beastwick18 committed Jun 5, 2024
1 parent efcb24c commit c7e206b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ impl App {
match keys.chars().collect::<Vec<char>>()[..] {
['y', c] => {
let s = self.widgets.results.table.state.selected().unwrap_or(0);
ctx.mode = Mode::Normal;
match ctx.results.response.items.get(s).cloned() {
Some(item) => {
let link = match c {
Expand All @@ -564,7 +565,7 @@ impl App {
'p' => item.post_link,
'i' => match item.extra.get("imdb").cloned() {
Some(imdb) => imdb,
None => return,
None => return ctx.show_error("No imdb ID found for this item."),
},
_ => return,
};
Expand All @@ -579,7 +580,6 @@ impl App {
}
None => {}
}
ctx.mode = Mode::Normal;
}
_ => ctx.mode = Mode::KeyCombo(keys),
}
Expand Down
3 changes: 1 addition & 2 deletions src/source/torrent_galaxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,9 +465,8 @@ impl Source for TorrentGalaxyHtmlSource {
false => ItemType::Remake,
};

let torrent_link = attr(e, torrent_sel, "href");
let torrent_link = base_url
.join(&torrent_link)
.join(&attr(e, torrent_sel, "href"))
.map(|u| u.to_string())
.unwrap_or_default();
let magnet_link = attr(e, magnet_sel, "href");
Expand Down

0 comments on commit c7e206b

Please sign in to comment.