fix race while drawing ui in 'shell-pipe'
This commit is contained in:
1 parent
f6c99a7d46
commit
847c46421c
2 files changed
+5
-4
No files matched your search
@@ -415,6 +415,7 @@ type ui struct {
|
||||
msg string
|
||||
regPrev *reg
|
||||
dirPrev *dir
|
||||
exprChan chan multiExpr
|
||||
keyChan chan string
|
||||
evChan chan termbox.Event
|
||||
menuBuf *bytes.Buffer
|
||||
@@ -837,6 +838,8 @@ func (ui *ui) readEvent(ch chan<- multiExpr, ev termbox.Event) {
|
||||
func (ui *ui) readExpr() <-chan multiExpr {
|
||||
ch := make(chan multiExpr)
|
||||
|
||||
ui.exprChan = ch
|
||||
|
||||
go func() {
|
||||
ch <- multiExpr{&callExpr{"redraw", nil}, 1}
|
||||
|
||||
|
||||
Reference in new issue
Block a user