Skip to content

Commit

Permalink
make it look better when searching
Browse files Browse the repository at this point in the history
  • Loading branch information
micielski committed Sep 5, 2024
1 parent 7701ff9 commit 527a542
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rm-main/src/tui/tabs/torrents/rustmission_torrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl RustmissionTorrent {
let mut end = char_indices[end];
torrent_name_line.push_span(Span::styled(
&self.torrent_name[last_end..start],
self.style(),
self.style,
));

while !self.torrent_name.is_char_boundary(start) {
Expand Down Expand Up @@ -155,7 +155,7 @@ impl RustmissionTorrent {
flush_line(first, second);
}

torrent_name_line.push_span(Span::styled(&self.torrent_name[last_end..], self.style()));
torrent_name_line.push_span(Span::styled(&self.torrent_name[last_end..], self.style));

let mut cells = vec![];

Expand All @@ -167,7 +167,11 @@ impl RustmissionTorrent {
}
}

Row::new(cells)
if self.is_selected {
Row::new(cells).reversed()
} else {
Row::new(cells)
}
}

fn style(&self) -> Style {
Expand Down

0 comments on commit 527a542

Please sign in to comment.