mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[PR #757] [MERGED] Initialise Screen if SetScreen called before Run #1035
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#1035
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?
📋 Pull Request Information
Original PR: https://github.com/rivo/tview/pull/757
Author: @tjhowse
Created: 8/14/2022
Status: ✅ Merged
Merged: 11/13/2022
Merged by: @rivo
Base:
master← Head:Fix_Screen_init📝 Commits (3)
f541eafInitialise the copy of screen in the Application struct.1a01dc6Actual fix.583acbeRemove noise📊 Changes
1 file changed (+1 additions, -0 deletions)
View changed files
📝
application.go(+1 -0)📄 Description
#756
The bug came from the
a.screen == nilcheck inApplication.SetScreenskipping the a.screenReplacement channel and just settinga.screendirectly. This skipped the code followingscreen = <-a.screenReplacementmeaning the new screen never got initialised.I'm not sure if the correct fix is to init the screen if
a.screen == nilas I've done in this PR, or whether it would be better to pass the new screen into the screen channel whether or not there is already a screen present.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.