This commit is contained in:
parent
0569ede1a5
commit
c378b712d3
@ -112,13 +112,12 @@ func (r *Row) updateSyntax() {
|
|||||||
|
|
||||||
r.Hl = make([]int, r.RenderSize())
|
r.Hl = make([]int, r.RenderSize())
|
||||||
|
|
||||||
|
|
||||||
for i < r.RenderSize() {
|
for i < r.RenderSize() {
|
||||||
ch := r.render[i]
|
ch := r.render[i]
|
||||||
prevHl := highlight.Normal
|
prevHl := highlight.Normal
|
||||||
|
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
prevHl = r.Hl[i - 1]
|
prevHl = r.Hl[i-1]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unicode.IsDigit(ch) && (prevSep || prevHl == highlight.Number)) ||
|
if (unicode.IsDigit(ch) && (prevSep || prevHl == highlight.Number)) ||
|
||||||
|
@ -40,4 +40,4 @@ func Ctrl(char rune) rune {
|
|||||||
// IsSeparator Is the character a general token separator type?
|
// IsSeparator Is the character a general token separator type?
|
||||||
func IsSeparator(char rune) bool {
|
func IsSeparator(char rune) bool {
|
||||||
return unicode.IsPunct(char) || unicode.IsSpace(char)
|
return unicode.IsPunct(char) || unicode.IsSpace(char)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user