1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 16:22:24 +03:00

explicitly return newlines to our live command stdin

This commit is contained in:
Jesse Duffield
2018-12-18 22:23:17 +11:00
parent 865c7c2332
commit 20a94447d7
4 changed files with 5 additions and 12 deletions

View File

@@ -41,10 +41,7 @@ func RunCommandWithOutputLiveWrapper(c *OSCommand, command string, output func(s
scanner.Split(scanWordsWithNewLines)
for scanner.Scan() {
toOutput := strings.Trim(scanner.Text(), " ")
toWrite := output(toOutput)
if len(toWrite) > 0 {
_, _ = ptmx.WriteString(toWrite + "\n")
}
_, _ = ptmx.WriteString(output(toOutput))
}
}()