mirror of
https://github.com/Hopiu/micro.git
synced 2026-05-12 16:53:09 +00:00
Fix minor matchbrace issue
This commit is contained in:
parent
d1e713ce08
commit
65cd6c4605
1 changed files with 6 additions and 1 deletions
|
|
@ -395,8 +395,13 @@ func (w *BufWindow) displayBuffer() {
|
|||
r := c.RuneUnder(curX)
|
||||
rl := c.RuneUnder(curX - 1)
|
||||
if r == bp[0] || r == bp[1] || rl == bp[0] || rl == bp[1] {
|
||||
mb, _ := b.FindMatchingBrace(bp, curLoc)
|
||||
mb, left := b.FindMatchingBrace(bp, curLoc)
|
||||
matchingBraces = append(matchingBraces, mb)
|
||||
if !left {
|
||||
matchingBraces = append(matchingBraces, curLoc)
|
||||
} else {
|
||||
matchingBraces = append(matchingBraces, curLoc.Move(-1, b))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue