mirror of
https://codeberg.org/unspeaker/perch.git
synced 2025-12-06 09:36:42 +01:00
fix width of 1st column
This commit is contained in:
parent
2903d58b2d
commit
b13ce4f0d0
1 changed files with 5 additions and 1 deletions
|
|
@ -55,7 +55,11 @@ impl<T> Columns<T> {
|
|||
for (index, Column { width, .. }) in self.0.iter().enumerate() {
|
||||
let w = *width as u16 + 1;
|
||||
if index == column {
|
||||
return (x.saturating_sub(1), w + 1)
|
||||
if x > 0 {
|
||||
return (x - 1, w + 1)
|
||||
} else {
|
||||
return (x, w)
|
||||
}
|
||||
} else {
|
||||
x += w;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue