macos: use Ghostty.AppState as @EnvironmentObject

This is a small cleanup change. This provides the Ghostty.AppState
object to any view that needs it within the TerminalSplit view hierarchy
without needing to explicitly define EnvironmentKeys.
This commit is contained in:
Gregory Anders
2023-11-05 20:09:38 -06:00
parent 9b14398153
commit 582df33083
3 changed files with 4 additions and 38 deletions

View File

@@ -85,8 +85,6 @@ struct TerminalView<ViewModel: TerminalViewModel>: View {
Ghostty.TerminalSplit(node: $viewModel.surfaceTree)
.environmentObject(ghostty)
.ghosttyApp(ghostty.app!)
.ghosttyConfig(ghostty.config!)
.focused($focused)
.onAppear { self.focused = true }
.onChange(of: focusedSurface) { newValue in