]> git.lizzy.rs Git - micro.git/commit
Fix dropped redraw events (#1675) v2.0.4
authorDmitry Maluka <dmitrymaluka@gmail.com>
Sat, 23 May 2020 18:59:23 +0000 (20:59 +0200)
committerGitHub <noreply@github.com>
Sat, 23 May 2020 18:59:23 +0000 (14:59 -0400)
commitc5b0c2d41f67048ba859cbf7d7aba6a3b547e1ef
treeff039b3ccf9964224967818d4547771e513bcdfe
parentbd43a44194f71625b6a8fb95ea68d4689987fcb1
Fix dropped redraw events (#1675)

If screen.Redraw() is called very quickly after a key or mouse event,
it may send the redraw event while micro is not waiting for it but
still processing the key or mouse event. Since drawChan is non-buffered
and at the same time non-blocking, this redraw event will be simply lost,
so the screen content will not be up-to-date.
cmd/micro/micro.go
internal/screen/screen.go