mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
fix: scan to buffer to empty character input in stdin
This commit is contained in:
parent
fd66499c8f
commit
17df42e517
1 changed files with 4 additions and 1 deletions
|
@ -662,7 +662,10 @@ func (gui *Gui) runSubprocess(cmdObj oscommands.ICmdObj) error { //nolint:unpara
|
|||
|
||||
if gui.Config.GetUserConfig().PromptToReturnFromSubprocess {
|
||||
fmt.Fprintf(os.Stdout, "\n%s", style.FgGreen.Sprint(gui.Tr.PressEnterToReturn))
|
||||
fmt.Scanln() // wait for enter press
|
||||
|
||||
// scan to buffer to prevent run unintentional operations when TUI resumes.
|
||||
var buffer string
|
||||
fmt.Scanln(&buffer) // wait for enter press
|
||||
}
|
||||
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue