mirror of
https://github.com/veeso/termscp.git
synced 2026-09-28 06:51:20 -07:00
fix: tiny ui issue
This commit is contained in:
@@ -224,6 +224,7 @@ impl MockComponent for FileList {
|
|||||||
.chain(table.iter())
|
.chain(table.iter())
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(num, row)| {
|
.map(|(num, row)| {
|
||||||
|
let real_num = num;
|
||||||
let num = if self.has_dot_dot() {
|
let num = if self.has_dot_dot() {
|
||||||
num.checked_sub(1).unwrap_or_default()
|
num.checked_sub(1).unwrap_or_default()
|
||||||
} else {
|
} else {
|
||||||
@@ -235,11 +236,14 @@ impl MockComponent for FileList {
|
|||||||
.map(|col| {
|
.map(|col| {
|
||||||
let (fg, bg, mut modifiers) =
|
let (fg, bg, mut modifiers) =
|
||||||
tui_realm_stdlib::utils::use_or_default_styles(&self.props, col);
|
tui_realm_stdlib::utils::use_or_default_styles(&self.props, col);
|
||||||
if self.states.is_selected(num) {
|
if !(self.has_dot_dot() && real_num == 0)
|
||||||
|
&& self.states.is_selected(num)
|
||||||
|
{
|
||||||
modifiers |= TextModifiers::REVERSED
|
modifiers |= TextModifiers::REVERSED
|
||||||
| TextModifiers::UNDERLINED
|
| TextModifiers::UNDERLINED
|
||||||
| TextModifiers::ITALIC;
|
| TextModifiers::ITALIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
Span::styled(
|
Span::styled(
|
||||||
col.content.clone(),
|
col.content.clone(),
|
||||||
Style::default().add_modifier(modifiers).fg(fg).bg(bg),
|
Style::default().add_modifier(modifiers).fg(fg).bg(bg),
|
||||||
|
|||||||
Reference in New Issue
Block a user