Don't block when redraw channel becomes full

Fixes #1497
This commit is contained in:
Zachary Yedidia
2020-02-11 20:03:32 -05:00
parent d7e3fc99f1
commit 8224037080
6 changed files with 12 additions and 8 deletions

View File

@@ -644,7 +644,7 @@ func (b *Buffer) UpdateRules() {
go func() {
b.Highlighter.HighlightStates(b)
b.Highlighter.HighlightMatches(b, 0, b.End().Y)
screen.DrawChan <- true
screen.Redraw()
}()
}
}
@@ -1033,7 +1033,7 @@ func (b *Buffer) SetDiffBase(diffBase []byte) {
b.diffBaseLineCount = strings.Count(string(diffBase), "\n")
}
b.UpdateDiff(func(synchronous bool) {
screen.DrawChan <- true
screen.Redraw()
})
}