mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-25 13:16:11 +03:00
Add an out of bounds check for mouse-selected themes in +list-themes
This commit is contained in:
@ -515,7 +515,9 @@ const Preview = struct {
|
|||||||
}
|
}
|
||||||
if (theme_list.hasMouse(mouse)) |_| {
|
if (theme_list.hasMouse(mouse)) |_| {
|
||||||
if (mouse.button == .left and mouse.type == .release) {
|
if (mouse.button == .left and mouse.type == .release) {
|
||||||
self.current = self.window + mouse.row;
|
if (self.window + mouse.row < self.filtered.items.len) {
|
||||||
|
self.current = self.window + mouse.row;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
highlight = mouse.row;
|
highlight = mouse.row;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user