Skip to content

Commit 17f86db

Browse files
author
chessman
committed
multiChoice: refresh only if it is necessary
1 parent 42a9bbf commit 17f86db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ishell.go

+4
Original file line numberDiff line numberDiff line change
@@ -533,13 +533,17 @@ func (s *Shell) multiChoice(options []string, text string, init []int, multiResu
533533
if multiResults {
534534
selected = toggle(selected, cur)
535535
}
536+
} else {
537+
return
536538
}
537539
refresh <- struct{}{}
538540
return
539541
}
540542
conf.Listener = readline.FuncListener(listener)
541543
oldconf := s.reader.scanner.SetConfig(conf)
542544

545+
update()
546+
543547
stop := make(chan struct{})
544548
defer func() {
545549
stop <- struct{}{}

0 commit comments

Comments
 (0)