* fix #596: Avoid drawing a command section beyond the width of the list * chore: remove unneeded parentheses
This commit is contained in:
parent
e297b98f72
commit
d87abbd3dc
1 changed files with 5 additions and 0 deletions
|
@ -159,6 +159,11 @@ impl DrawState<'_> {
|
||||||
|
|
||||||
for section in h.command.split_ascii_whitespace() {
|
for section in h.command.split_ascii_whitespace() {
|
||||||
self.x += 1;
|
self.x += 1;
|
||||||
|
if self.x > self.list_area.width {
|
||||||
|
// Avoid attempting to draw a command section beyond the width
|
||||||
|
// of the list
|
||||||
|
return;
|
||||||
|
}
|
||||||
self.draw(section, style);
|
self.draw(section, style);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue