mirror of
https://github.com/git/git
synced 2024-10-28 19:25:47 +00:00
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:
parent
b80121027d
commit
24d7ce383a
1 changed files with 1 additions and 1 deletions
|
@ -385,7 +385,7 @@ int read_key_without_echo(struct strbuf *buf)
|
|||
|
||||
ch = getchar();
|
||||
if (ch == EOF)
|
||||
return 0;
|
||||
break;
|
||||
strbuf_addch(buf, ch);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue