hints kitten: Fix regression causing editing of favorites to sometimes hang

This commit is contained in:
Kovid Goyal
2023-04-26 15:21:53 +05:30
parent 93a5107e79
commit 6a07435bb0
3 changed files with 71 additions and 47 deletions

View File

@@ -66,8 +66,9 @@ type Loop struct {
style_ctx style.Context
atomic_update_active bool
// Suspend the loop restoring terminal state. Call the return resume function to restore the loop
Suspend func() (func() error, error)
// Suspend the loop restoring terminal state, and run the provided function. When it returns terminal state is
// put back to what it was before suspending unless the function returns an error or an error occurs saving/restoring state.
SuspendAndRun func(func() error) error
// Callbacks