1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +02:00

Use ASCII on Windows with east asian locale

This commit is contained in:
Yasuhiro Matsumoto 2020-01-07 11:22:15 +09:00
parent 818134247d
commit d914d40b2e
No known key found for this signature in database
GPG Key ID: 622DE34DC490584B
2 changed files with 5 additions and 1 deletions

2
go.mod
View File

@ -19,7 +19,7 @@ require (
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.11 // indirect
github.com/mattn/go-runewidth v0.0.7 // indirect
github.com/mattn/go-runewidth v0.0.7
github.com/mgutz/str v1.2.0
github.com/nicksnyder/go-i18n/v2 v2.0.3
github.com/onsi/ginkgo v1.10.3 // indirect

View File

@ -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
}