summaryrefslogtreecommitdiffstats
path: root/pkg/gui/credentials_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-12-18 22:23:17 +1100
committerJesse Duffield <jessedduffield@gmail.com>2018-12-18 22:23:17 +1100
commit20a94447d7bad91848ae75b391eaf6feb92e10c4 (patch)
tree95174d3b5500db20637c8199d7d0f7367de5dfbc /pkg/gui/credentials_panel.go
parent865c7c2332d71704b8a6bc22472313daf4997f16 (diff)
explicitly return newlines to our live command stdin
Diffstat (limited to 'pkg/gui/credentials_panel.go')
-rw-r--r--pkg/gui/credentials_panel.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/gui/credentials_panel.go b/pkg/gui/credentials_panel.go
index 6c8f8b4ef..dd5461441 100644
--- a/pkg/gui/credentials_panel.go
+++ b/pkg/gui/credentials_panel.go
@@ -30,15 +30,11 @@ func (gui *Gui) waitForPassUname(g *gocui.Gui, currentView *gocui.View, passOrUn
// wait for username/passwords input
userInput := <-gui.credentials
- return userInput
+ return userInput + "\n"
}
func (gui *Gui) handleSubmitCredential(g *gocui.Gui, v *gocui.View) error {
message := gui.trimmedContent(v)
- if message == "" {
- // sending an obviously incorrect password so that the program isn't stuck waiting
- message = "-"
- }
gui.credentials <- message
err := gui.refreshFiles(g)
if err != nil {
@@ -70,7 +66,7 @@ func (gui *Gui) handleCloseCredentialsView(g *gocui.Gui, v *gocui.View) error {
return err
}
- gui.credentials <- "-"
+ gui.credentials <- ""
return gui.switchFocus(g, nil, gui.getFilesView(g))
}