1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

view_helpers.go: replace \r with \r\n

This commit is contained in:
Tommy Nguyen 2018-08-19 02:19:19 -04:00
parent 018b43163c
commit cdc6d45fa4
No known key found for this signature in database
GPG Key ID: DB7FA8161647D196

View File

@ -218,7 +218,9 @@ func (gui *Gui) renderString(g *gocui.Gui, viewName, s string) error {
return nil
}
v.Clear()
fmt.Fprint(v, bom.Clean([]byte(s)))
output := string(bom.Clean([]byte(s)))
strings.Replace(output, "\r", "\r\n", -1)
fmt.Fprint(v, output)
v.Wrap = true
return nil
})