1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

bump deps to use forked termbox which doesn't crash as easily

This commit is contained in:
Jesse Duffield
2018-09-19 19:54:58 +10:00
parent 4ea446205c
commit 0367399cf3
28 changed files with 34 additions and 65 deletions

View File

@ -4,7 +4,7 @@
package gocui
import "github.com/nsf/termbox-go"
import "github.com/jesseduffield/termbox-go"
// Attribute represents a terminal attribute, like color, font style, etc. They
// can be combined using bitwise OR (|). Note that it is not possible to

View File

@ -7,7 +7,7 @@ package gocui
import (
"errors"
"github.com/nsf/termbox-go"
"github.com/jesseduffield/termbox-go"
)
var (

View File

@ -4,7 +4,7 @@
package gocui
import "github.com/nsf/termbox-go"
import "github.com/jesseduffield/termbox-go"
// Keybidings are used to link a given key-press event with a handler.
type keybinding struct {

View File

@ -10,8 +10,8 @@ import (
"io"
"strings"
"github.com/jesseduffield/termbox-go"
"github.com/mattn/go-runewidth"
"github.com/nsf/termbox-go"
)
// Constants for overlapping edges
@ -447,6 +447,10 @@ func (v *View) ViewBufferLines() []string {
return lines
}
func (v *View) ViewLinesHeight() int {
return len(v.viewLines)
}
// ViewBuffer returns a string with the contents of the view's buffer that is
// shown to the user.
func (v *View) ViewBuffer() string {

View File

@ -317,6 +317,9 @@ func PollEvent() Event {
event.Type = EventKey
status := extract_event(inbuf, &event, true)
if event.N != 0 {
if event.N > len(inbuf) {
event.N = len(inbuf)
}
copy(inbuf, inbuf[event.N:])
inbuf = inbuf[:len(inbuf)-event.N]
}
@ -345,6 +348,9 @@ func PollEvent() Event {
input_comm <- ev
status := extract_event(inbuf, &event, true)
if event.N != 0 {
if event.N > len(inbuf) {
event.N = len(inbuf)
}
copy(inbuf, inbuf[event.N:])
inbuf = inbuf[:len(inbuf)-event.N]
}
@ -359,6 +365,9 @@ func PollEvent() Event {
status := extract_event(inbuf, &event, false)
if event.N != 0 {
if event.N > len(inbuf) {
event.N = len(inbuf)
}
copy(inbuf, inbuf[event.N:])
inbuf = inbuf[:len(inbuf)-event.N]
}