diff --git a/shell/console/atom/input.go b/shell/console/atom/input.go index fbf1d1b..c686177 100644 --- a/shell/console/atom/input.go +++ b/shell/console/atom/input.go @@ -56,11 +56,8 @@ func (in *input) restart() { n := in.readRune() next <- n - needClose := !n.IsOk() - if !needClose { - r, ok := n.Ok() - needClose = ok && (r == Lf || r == Cr || r == C_C || r == C_D) - } + r, ok := n.Ok() + needClose := !ok || r == Lf || r == Cr || r == C_C || r == C_D if needClose { close(next) @@ -317,22 +314,21 @@ func (in *input) nextChar() (key nkey) { return } - var s Sequence switch r { case Bs: - s = A_Bs + key = nk(keyS(A_Bs)) case 'O': - return in.escO() + key = in.escO() case '[': - return in.escBracket() + key = in.escBracket() case 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z': - s = Sequence(r << 16) - default: - return + key = nk(keyS(Sequence(r << 16))) + //default: + // return } in.clear() - return nk(keyS(s)) + return }