diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2018-08-21 17:39:55 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-21 17:39:55 +1000 |
commit | c6a88990607cb036ba97a283586e6092c1e7c5e9 (patch) | |
tree | 7617c2320198b7a657742b977e03d65ab9510c40 /pkg/gui | |
parent | da4c12bf9e50f2e4a03a0a2ae67cd4ba82220963 (diff) | |
parent | 45fea837713e3f471813596209cd78398df115fc (diff) |
Merge pull request #160 from remyabel/157_remove_bom
#157: clean BOM, allowing CSV files to display correctly
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/view_helpers.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 46fc79e40..dc669146b 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -7,6 +7,8 @@ import ( "time" "github.com/jesseduffield/gocui" + "github.com/jesseduffield/lazygit/pkg/utils" + "github.com/spkg/bom" ) var cyclableViews = []string{"status", "files", "branches", "commits", "stash"} @@ -217,7 +219,9 @@ func (gui *Gui) renderString(g *gocui.Gui, viewName, s string) error { return nil } v.Clear() - fmt.Fprint(v, s) + output := string(bom.Clean([]byte(s))) + output = utils.NormalizeLinefeeds(output) + fmt.Fprint(v, output) v.Wrap = true return nil }) |