diff options
| author | Sam Lanning <sam@samlanning.com> | 2022-11-06 07:32:35 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-06 07:32:35 +0000 |
| commit | d87abbd3dc860aecffb4239fb41973b8e195f85e (patch) | |
| tree | 8ed1059aa124fe720bdc651eeb5460efa3d2fb38 /src | |
| parent | Add local event log storage (#390) (diff) | |
| download | atuin-d87abbd3dc860aecffb4239fb41973b8e195f85e.zip | |
fix #596: Avoid drawing a command section beyond the width of the list (#597)
* fix #596: Avoid drawing a command section beyond the width of the list
* chore: remove unneeded parentheses
Diffstat (limited to '')
| -rw-r--r-- | src/command/client/search/history_list.rs | 5 |
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); } } |
