Skip to content

Commit

Permalink
Fix file detail to wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
lusingander committed Mar 10, 2024
1 parent 251e982 commit b299e18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use ratatui::{
text::{Line, Span, Text},
widgets::{
block::Title, Block, BorderType, Borders, Clear, List, ListItem, Padding, Paragraph,
Scrollbar, ScrollbarState, Tabs,
Scrollbar, ScrollbarState, Tabs, Wrap,
},
Frame,
};
Expand Down Expand Up @@ -540,7 +540,9 @@ fn build_file_detail(detail: &FileDetail) -> Paragraph {
.collect();

let content = flatten_with_empty_lines(details, false);
Paragraph::new(content).block(Block::default().padding(Padding::horizontal(1)))
Paragraph::new(content)
.block(Block::default().padding(Padding::horizontal(1)))
.wrap(Wrap { trim: false })
}

fn format_size_byte(size_byte: i64) -> String {
Expand Down

0 comments on commit b299e18

Please sign in to comment.