Skip to content

Commit eca1130

Browse files
committed
Fix min name width bug
1 parent bf1f698 commit eca1130

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/views/table/columns.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use ratatui::prelude::Constraint;
22

3+
const NAME_MIN_LEN: u16 = 39; // Below this width, we don't show any other columns
34
const MODE_LEN: u16 = 10;
45
const MODIFIED_LEN: u16 = 12;
56
const SIZE_LEN: u16 = 7;
@@ -80,7 +81,7 @@ fn calculate_constraints(width: u16) -> (Vec<Constraint>, u16) {
8081
let mut name_column_width = width;
8182

8283
// Add columns in order of priority based on available width
83-
let mut min_width = width;
84+
let mut min_width = NAME_MIN_LEN;
8485

8586
// Add Modified column if there's enough space
8687
if width > min_width {

0 commit comments

Comments
 (0)