File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
CodeEditModules/Modules/TerminalEmulator/src Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -128,23 +128,16 @@ public struct TerminalEmulatorView: NSViewRepresentable {
128128 }
129129
130130 public func updateNSView( _ view: LocalProcessTerminalView , context: Context ) {
131- print ( " Update view " )
132- // if exited {
133- // setupSession()
134- // }
135- // // if view.font != font { // Fixes Memory leak
136- // // TODO: Fix memory leak
137- // // for some reason setting the font here causes a memory leak.
138- // // I'll leave it for now since the colors won't change
139- // // without setting the font which is weird
140- // view.font = font
141- // // }
131+ if view. font != font { // Fixes Memory leak
132+ view. font = font
133+ }
142134 view. configureNativeColors ( )
143135 view. installColors ( self . appearanceColors)
144136 if TerminalEmulatorView . lastTerminal != nil {
145137 TerminalEmulatorView . lastTerminal = view
146138 }
147139 view. getTerminal ( ) . softReset ( )
140+ view. feed ( text: " " ) // send empty character to force colors to be redrawn
148141 }
149142
150143 public func makeCoordinator( ) -> Coordinator {
You can’t perform that action at this time.
0 commit comments