terminal: always reset terminal when reading without echo
Break out of the loop to ensure restore_term() is called before returning. Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
b80121027d
commit
24d7ce383a
@ -385,7 +385,7 @@ int read_key_without_echo(struct strbuf *buf)
|
||||
|
||||
ch = getchar();
|
||||
if (ch == EOF)
|
||||
return 0;
|
||||
break;
|
||||
strbuf_addch(buf, ch);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user