mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #499] Application.Stop() not working after call to Application.Suspend() #362
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#362
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @khughitt on GitHub (Sep 14, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/499
Overview
When attempting to call
app.Stop()after a call toapp.Suspend(), application continues running and appears to ignore/not fully process the call toapp.Stop().Interestingly, the first time I call a function which calls
app.Suspend()and thenapp.Stop()(as in the example below), the application simply returns to it's normal running state.If I then call the function a second time, after the Suspend function finishes, the app screen is cleared, but the application doesn't fully exit.
I have to then press
cntl-cto finally exit the app completely.To reproduce
System Info
@rivo commented on GitHub (Dec 4, 2020):
Thanks for letting me know. This should be fixed in the latest version. But you'll have to call
app.Stop()in your suspend function, right aftercmd.Run().There is probably a way to make it work with the way your code is written. But I just spent quite a bit of time on this but couldn't make it work. Unfortunately, to suspend the application requires a whole bunch of trickery with the
tcell.Screenobject. The more I add to it, the more complex it gets and I'm afraid it will reopen old issues whereSuspend()didn't work as expected. So I'll leave it the way it is for now.@khughitt commented on GitHub (Dec 4, 2020):
Thanks for taking the time to look into it / provide a solution! It's no trouble to add a call to
app.Stop(), so I'm completely fine with that and would rather you use your time on better things. Hope you have a great weekend!