summaryrefslogtreecommitdiffstats
path: root/pkg/gui/credentials_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-08-17 21:58:30 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-08-23 14:29:18 +1000
commitac0eedda91ae20992ad106d98fdd164d4264f6f2 (patch)
tree1a9f9c8e5dddeb4d8cf9a9fba12bd949fac7c447 /pkg/gui/credentials_panel.go
parente87635295a7afde0e82ecee8b820e5708fb2f046 (diff)
lots more stuff
Diffstat (limited to 'pkg/gui/credentials_panel.go')
-rw-r--r--pkg/gui/credentials_panel.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/pkg/gui/credentials_panel.go b/pkg/gui/credentials_panel.go
index 3edcb3e0b..a5905da02 100644
--- a/pkg/gui/credentials_panel.go
+++ b/pkg/gui/credentials_panel.go
@@ -37,9 +37,7 @@ func (gui *Gui) promptUserForCredential(passOrUname string) string {
func (gui *Gui) handleSubmitCredential(g *gocui.Gui, v *gocui.View) error {
message := gui.trimmedContent(v)
gui.credentials <- message
- v.Clear()
- _ = v.SetCursor(0, 0)
- _, _ = g.SetViewOnBottom("credentials") // TODO: move to context code
+ gui.clearEditorView(v)
if err := gui.returnFromContext(); err != nil {
return err
}
@@ -48,8 +46,6 @@ func (gui *Gui) handleSubmitCredential(g *gocui.Gui, v *gocui.View) error {
}
func (gui *Gui) handleCloseCredentialsView(g *gocui.Gui, v *gocui.View) error {
- _, _ = g.SetViewOnBottom("credentials")
-
gui.credentials <- ""
return gui.returnFromContext()
}
@@ -68,7 +64,6 @@ func (gui *Gui) handleCredentialsViewFocused() error {
// handleCredentialsPopup handles the views after executing a command that might ask for credentials
func (gui *Gui) handleCredentialsPopup(cmdErr error) {
- _, _ = gui.g.SetViewOnBottom("credentials")
if cmdErr != nil {
errMessage := cmdErr.Error()
if strings.Contains(errMessage, "Invalid username or password") {