Skip to content

Commit

Permalink
Fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
shendiaomo committed Oct 22, 2019
1 parent 0d99dde commit 1d18ad6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,10 @@ func (p *Prompt) readBuffer(bufCh chan []byte, stopCh chan struct{}) {
if b, err := p.in.Read(); err == nil && !(len(b) == 1 && b[0] == 0) {
start := 0
for i, e := range b {
switch GetKey([] byte{e}) {
case Enter, ControlJ, ControlM:
switch GetKey([]byte{e}) {
case Enter, ControlJ, ControlM:
bufCh <- b[start:i]
bufCh <- [] byte{e}
bufCh <- []byte{e}
start = i + 1
}
}
Expand Down

0 comments on commit 1d18ad6

Please sign in to comment.