Merge branch 'cross-compile'

This commit is contained in:
Zachary Yedidia
2016-03-22 18:31:50 -04:00
85 changed files with 66 additions and 13 deletions

View File

@@ -149,9 +149,9 @@ func Match(rules string, buf *Buffer, v *View) map[int]tcell.Style {
color := string(submatch[1])
var regexStr string
if len(submatch) == 4 {
regexStr = "(?m" + string(submatch[2]) + ")" + string(submatch[3])
regexStr = "(?m" + string(submatch[2]) + ")" + JoinRule(string(submatch[3]))
} else if len(submatch) == 3 {
regexStr = "(?m)" + string(submatch[2])
regexStr = "(?m)" + JoinRule(string(submatch[2]))
}
regex, err := regexp.Compile(regexStr)
if err != nil {

View File

@@ -268,7 +268,7 @@ func (v *View) HandleEvent(event tcell.Event) int {
v.ScrollDown(1)
y = v.height + v.topline - 1
}
if y > len(v.buf.lines) {
if y >= len(v.buf.lines) {
y = len(v.buf.lines) - 1
}
if x < 0 {