mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-11-24 08:52:21 +02:00
support alacritty
This commit is contained in:
parent
f172f20219
commit
44ee28bb2e
2
go.mod
2
go.mod
@ -14,7 +14,7 @@ require (
|
||||
github.com/google/go-cmp v0.3.1 // indirect
|
||||
github.com/integrii/flaggy v1.4.0
|
||||
github.com/jesseduffield/gocui v0.3.1-0.20200823073938-1a970a28d894
|
||||
github.com/jesseduffield/termbox-go v0.0.0-20200405031649-4dc645f7e8ba // indirect
|
||||
github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe // indirect
|
||||
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect
|
||||
github.com/mattn/go-colorable v0.1.4 // indirect
|
||||
|
2
go.sum
2
go.sum
@ -100,6 +100,8 @@ github.com/jesseduffield/termbox-go v0.0.0-20200130214842-1d31d1faa3c9 h1:iBBk1l
|
||||
github.com/jesseduffield/termbox-go v0.0.0-20200130214842-1d31d1faa3c9/go.mod h1:anMibpZtqNxjDbxrcDEAwSdaJ37vyUeM1f/M4uekib4=
|
||||
github.com/jesseduffield/termbox-go v0.0.0-20200405031649-4dc645f7e8ba h1:hWBdYchM9nZ2+GldroQQ627ISOC83iRDdpfwY+uyJeI=
|
||||
github.com/jesseduffield/termbox-go v0.0.0-20200405031649-4dc645f7e8ba/go.mod h1:anMibpZtqNxjDbxrcDEAwSdaJ37vyUeM1f/M4uekib4=
|
||||
github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe h1:qsVhCf2RFyyKIUe/+gJblbCpXMUki9rZrHuEctg6M/E=
|
||||
github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe/go.mod h1:anMibpZtqNxjDbxrcDEAwSdaJ37vyUeM1f/M4uekib4=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
|
||||
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
|
||||
|
@ -411,8 +411,6 @@ func (gui *Gui) Run() error {
|
||||
g.NextSearchMatchKey = gui.getKey("universal.nextMatch")
|
||||
g.PrevSearchMatchKey = gui.getKey("universal.prevMatch")
|
||||
|
||||
gui.stopChan = make(chan struct{})
|
||||
|
||||
g.ASCII = runtime.GOOS == "windows" && runewidth.IsEastAsian()
|
||||
|
||||
if gui.Config.GetUserConfig().GetBool("gui.mouseEvents") {
|
||||
@ -453,6 +451,7 @@ func (gui *Gui) Run() error {
|
||||
// otherwise it handles the error, possibly by quitting the application
|
||||
func (gui *Gui) RunWithSubprocesses() error {
|
||||
for {
|
||||
gui.stopChan = make(chan struct{})
|
||||
if err := gui.Run(); err != nil {
|
||||
for _, manager := range gui.viewBufferManagerMap {
|
||||
manager.Close()
|
||||
@ -465,28 +464,27 @@ func (gui *Gui) RunWithSubprocesses() error {
|
||||
|
||||
close(gui.stopChan)
|
||||
|
||||
if err == gocui.ErrQuit {
|
||||
switch err {
|
||||
case gocui.ErrQuit:
|
||||
if !gui.State.RetainOriginalDir {
|
||||
if err := gui.recordCurrentDirectory(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
break
|
||||
} else if err == gui.Errors.ErrSwitchRepo {
|
||||
return nil
|
||||
case gui.Errors.ErrSwitchRepo, gui.Errors.ErrRestart:
|
||||
continue
|
||||
} else if err == gui.Errors.ErrRestart {
|
||||
continue
|
||||
} else if err == gui.Errors.ErrSubProcess {
|
||||
case gui.Errors.ErrSubProcess:
|
||||
|
||||
if err := gui.runCommand(); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
default:
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (gui *Gui) runCommand() error {
|
||||
|
1
vendor/github.com/jesseduffield/termbox-go/terminfo.go
generated
vendored
1
vendor/github.com/jesseduffield/termbox-go/terminfo.go
generated
vendored
@ -123,6 +123,7 @@ func setup_term_builtin() error {
|
||||
// let's assume that 'cygwin' is xterm compatible
|
||||
{"cygwin", xterm_keys, xterm_funcs},
|
||||
{"st", xterm_keys, xterm_funcs},
|
||||
{"alacritty", xterm_keys, xterm_funcs},
|
||||
}
|
||||
|
||||
// try compatibility variants
|
||||
|
1
vendor/github.com/jesseduffield/termbox-go/terminfo_builtin.go
generated
vendored
1
vendor/github.com/jesseduffield/termbox-go/terminfo_builtin.go
generated
vendored
@ -61,4 +61,5 @@ var terms = []struct {
|
||||
{"rxvt-unicode", rxvt_unicode_keys, rxvt_unicode_funcs},
|
||||
{"linux", linux_keys, linux_funcs},
|
||||
{"rxvt-256color", rxvt_256color_keys, rxvt_256color_funcs},
|
||||
{"alacritty", xterm_keys, xterm_funcs},
|
||||
}
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -102,7 +102,7 @@ github.com/jbenet/go-context/io
|
||||
# github.com/jesseduffield/gocui v0.3.1-0.20200823073938-1a970a28d894
|
||||
## explicit
|
||||
github.com/jesseduffield/gocui
|
||||
# github.com/jesseduffield/termbox-go v0.0.0-20200405031649-4dc645f7e8ba
|
||||
# github.com/jesseduffield/termbox-go v0.0.0-20200823212418-a2289ed6aafe
|
||||
## explicit
|
||||
github.com/jesseduffield/termbox-go
|
||||
# github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0
|
||||
|
Loading…
Reference in New Issue
Block a user