diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-07 11:22:15 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2020-01-07 11:32:11 +0900 |
commit | d914d40b2e7bfaeda966f2bd539bd45aef8cebe0 (patch) | |
tree | f95f7eaa7f789dff8de509827fab789ed20fe052 /pkg/gui/gui.go | |
parent | 818134247ddcde74d7d33c534c7696c9481f3028 (diff) |
Use ASCII on Windows with east asian locale
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index ba379fc56..5b2f9cc14 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -5,6 +5,7 @@ import ( "io/ioutil" "math" "os" + "runtime" "sync" // "io" @@ -28,6 +29,7 @@ import ( "github.com/jesseduffield/lazygit/pkg/theme" "github.com/jesseduffield/lazygit/pkg/updates" "github.com/jesseduffield/lazygit/pkg/utils" + "github.com/mattn/go-runewidth" "github.com/sirupsen/logrus" ) @@ -782,6 +784,8 @@ func (gui *Gui) Run() error { } defer g.Close() + g.ASCII = runtime.GOOS == "windows" && runewidth.IsEastAsian() + if gui.Config.GetUserConfig().GetBool("gui.mouseEvents") { g.Mouse = true } |