Skip to content

Commit

Permalink
Partially handle vertical resize
Browse files Browse the repository at this point in the history
  • Loading branch information
slarwise committed Aug 12, 2024
1 parent 8ae399c commit 1a15393
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ func main() {
case *tcell.EventResize:
screen.Sync()
// TODO: Handle redrawing the keys when resizing vertically
_, height := screen.Size()
showEnd = min(height-2, len(filteredKeys))
case *tcell.EventKey:
switch ev.Key() {
case tcell.KeyEscape, tcell.KeyCtrlC:
Expand Down

0 comments on commit 1a15393

Please sign in to comment.