upgrade strife to v0.2.2

This commit is contained in:
Felix Angell 2021-01-10 13:07:15 +00:00
parent 46c4fc6877
commit a1a2dbb09f
3 changed files with 7 additions and 3 deletions

4
go.mod
View File

@ -5,11 +5,11 @@ go 1.14
require (
github.com/atotto/clipboard v0.1.2
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixangell/strife v0.2.1
github.com/felixangell/strife v0.2.2
github.com/fsnotify/fsnotify v1.4.9
github.com/lithammer/fuzzysearch v1.1.1
github.com/stretchr/testify v1.6.1
github.com/veandco/go-sdl2 v0.4.5
golang.org/x/sys v0.0.0-20210108172913-0df2131ae363 // indirect
golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061 // indirect
golang.org/x/text v0.3.5 // indirect
)

4
go.sum
View File

@ -7,6 +7,8 @@ github.com/felixangell/strife v0.2.0 h1:UoKznQghuOC/pio4C1eYBGd5z23H+u2GJXHhGytu
github.com/felixangell/strife v0.2.0/go.mod h1:I48zwoDuHBbURAmbBqjh3CzqVa4+yoAKePtfyj5v7po=
github.com/felixangell/strife v0.2.1 h1:H6T5gIFE8qd5H1i1u5xcG56OTUNhEz8g5AIByZEh/Xg=
github.com/felixangell/strife v0.2.1/go.mod h1:I48zwoDuHBbURAmbBqjh3CzqVa4+yoAKePtfyj5v7po=
github.com/felixangell/strife v0.2.2 h1:Dfja3sJcZG5ljzT3FnS7DcLio+U11Vy6Hwea2dEZhFA=
github.com/felixangell/strife v0.2.2/go.mod h1:I48zwoDuHBbURAmbBqjh3CzqVa4+yoAKePtfyj5v7po=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/lithammer/fuzzysearch v1.1.1 h1:8F9OAV2xPuYblToVohjanztdnPjbtA0MLgMvDKQ0Z08=
@ -22,6 +24,8 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9 h1:L2auWcuQIvxz9xSEqzESnV/QN
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210108172913-0df2131ae363 h1:wHn06sgWHMO1VsQ8F+KzDJx/JzqfsNLnc+oEi07qD7s=
golang.org/x/sys v0.0.0-20210108172913-0df2131ae363/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061 h1:DQmQoKxQWtyybCtX/3dIuDBcAhFszqq8YiNeS6sNu1c=
golang.org/x/sys v0.0.0-20210110051926-789bb1bd4061/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ=

View File

@ -1288,7 +1288,7 @@ func (b *Buffer) syntaxHighlightLine(currLine string) map[int]syntaxRuneInfo {
matched := syntax.CompiledPattern.FindStringIndex(a)
if matched != nil {
if _, ok := matches[charIndex]; !ok {
matchedStrLen := (matched[1] - matched[0])
matchedStrLen := matched[1] - matched[0]
colouring := colours[syntaxIndex]
matches[charIndex+matched[0]] = syntaxRuneInfo{