Skip to content

Commit

Permalink
Don't load the UI if the terminal is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Feb 20, 2024
1 parent b09da75 commit 4cb19e0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions modules/quaketerm/term.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ func (t *term) show() {
}

func (t *term) toggle() {
if t.ui == nil {
t.createTerm() // lazy load UI
}

if !t.shown {
t.win = t.getHandle()

Expand All @@ -158,7 +162,6 @@ func matchTheme(bg, over *canvas.Rectangle) {
}

func newTerm() fynedesk.Module {
t := &term{}
t.createTerm()
return t
// don't load UI until it is first called on
return &term{}
}

0 comments on commit 4cb19e0

Please sign in to comment.