mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-26 10:15:37 +01:00
* 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
@ -159,6 +159,11 @@ impl DrawState<'_> {
|
||||
|
||||
for section in h.command.split_ascii_whitespace() {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user