aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command/client/search/history_list.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command/client/search/history_list.rs b/src/command/client/search/history_list.rs
index fda1098f..d74221d8 100644
--- a/src/command/client/search/history_list.rs
+++ b/src/command/client/search/history_list.rs
@@ -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);
}
}