mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 22:14:53 +02:00
mouse demo redraw screen on window resize
This commit is contained in:
@@ -67,6 +67,7 @@ func Run(args []string) (rc int, err error) {
|
||||
lp.AllowLineWrapping(false)
|
||||
defer lp.AllowLineWrapping(true)
|
||||
if current_mouse_event == nil {
|
||||
lp.ClearScreen()
|
||||
lp.Println(`Move the mouse or click to see mouse events`)
|
||||
return
|
||||
}
|
||||
@@ -150,6 +151,10 @@ func Run(args []string) (rc int, err error) {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
lp.OnResize = func(old_size loop.ScreenSize, new_size loop.ScreenSize) error {
|
||||
draw_screen()
|
||||
return nil
|
||||
}
|
||||
err = lp.Run()
|
||||
if err != nil {
|
||||
rc = 1
|
||||
|
||||
Reference in New Issue
Block a user