mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
explicitly return newlines to our live command stdin
This commit is contained in:
@ -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))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user