case 1 is unnecessary because there is the same logic in default (#293)
This commit is contained in:
1 parent
3c5abbbc5d
commit
17949fc25a
1 file changed
-21
@@ -870,27 +870,6 @@ func (ui *ui) readEvent(ch chan<- expr, ev termbox.Event) {
|
||||
ui.keyAcc = nil
|
||||
ui.keyCount = nil
|
||||
ui.menuBuf = nil
|
||||
case 1:
|
||||
if ok {
|
||||
if len(ui.keyCount) > 0 {
|
||||
c, err := strconv.Atoi(string(ui.keyCount))
|
||||
if err != nil {
|
||||
log.Printf("converting command count: %s", err)
|
||||
}
|
||||
count = c
|
||||
}
|
||||
expr := gOpts.keys[string(ui.keyAcc)]
|
||||
if e, ok := expr.(*callExpr); ok {
|
||||
e.count = count
|
||||
}
|
||||
ch <- expr
|
||||
ui.keyAcc = nil
|
||||
ui.keyCount = nil
|
||||
ui.menuBuf = nil
|
||||
} else {
|
||||
ui.menuBuf = listBinds(binds)
|
||||
ch <- draw
|
||||
}
|
||||
default:
|
||||
if ok {
|
||||
if len(ui.keyCount) > 0 {
|
||||
|
||||
Reference in new issue
Block a user