mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-21 08:17:15 +09:00
Merge branch 'cross-compile'
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user