Skip to content

Commit

Permalink
wrap constrains line width when active
Browse files Browse the repository at this point in the history
  • Loading branch information
xvxx committed Nov 17, 2020
1 parent dffaafd commit 16034d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,14 @@ impl View for Text {
let wrap = self.config.read().unwrap().wrap;
let longest = if self.longest > MAX_COLS {
MAX_COLS
} else if wrap < self.longest {
wrap
} else {
self.longest
};
let longest = if wrap > 0 && self.longest > wrap {
wrap
} else {
longest
};
let indent = if cols >= longest && cols - longest <= 6 {
String::from("")
} else if cols >= longest {
Expand Down

0 comments on commit 16034d1

Please sign in to comment.