]> git.lizzy.rs Git - micro.git/commitdiff
Fix bug in syntax highlighting
authorZachary Yedidia <zyedidia@gmail.com>
Tue, 5 Apr 2016 21:16:21 +0000 (17:16 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Tue, 5 Apr 2016 21:16:21 +0000 (17:16 -0400)
src/highlighter.go

index f4483448247290cdfe7d8f0bcf710e5e9623e618..59e6f2de09046eafce5f129d53f2cb2262b5edb2 100644 (file)
@@ -280,7 +280,7 @@ func Match(v *View) SyntaxMatches {
        matches := make(SyntaxMatches, len(lines))
 
        for i, line := range lines {
-               matches[i] = make([]tcell.Style, len(line))
+               matches[i] = make([]tcell.Style, len(line)+1)
        }
 
        // We don't actually check the entire buffer, just from synLinesUp to synLinesDown