diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-15 12:04:00 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-15 14:15:41 +1100 |
commit | cdcfeb396fda1e61dee9b6d88ab4659152a10948 (patch) | |
tree | 6b796b8ffc9e30c08e5249e936feacca76f8d8ba /pkg/gui/credentials_panel.go | |
parent | f5b9ad8c002eb359959d41f4cd494007ca3e9bf3 (diff) |
stop refreshing the screen so much
Diffstat (limited to 'pkg/gui/credentials_panel.go')
-rw-r--r-- | pkg/gui/credentials_panel.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/gui/credentials_panel.go b/pkg/gui/credentials_panel.go index b4c313e07..984591a62 100644 --- a/pkg/gui/credentials_panel.go +++ b/pkg/gui/credentials_panel.go @@ -3,7 +3,6 @@ package gui import ( "strings" - "github.com/jesseduffield/gocui" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/utils" ) @@ -13,7 +12,7 @@ type credentials chan string // promptUserForCredential wait for a username, password or passphrase input from the credentials popup func (gui *Gui) promptUserForCredential(passOrUname oscommands.CredentialType) string { gui.credentials = make(chan string) - gui.g.Update(func(g *gocui.Gui) error { + gui.OnUIThread(func() error { credentialsView := gui.Views.Credentials switch passOrUname { case oscommands.Username: @@ -68,8 +67,7 @@ func (gui *Gui) handleCredentialsViewFocused() error { }, ) - gui.renderString(gui.Views.Options, message) - return nil + return gui.renderString(gui.Views.Options, message) } // handleCredentialsPopup handles the views after executing a command that might ask for credentials |