diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2022-02-22 21:53:32 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-24 00:30:06 +0300 |
commit | 24d7ce383a3d92feae6a641499448fde43206fd8 (patch) | |
tree | ec832b5aa257ea774768cb8bdded64966d99030a /compat | |
parent | b80121027d1247a0754b3cc46897fee75c050b44 (diff) |
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>
Diffstat (limited to 'compat')
-rw-r--r-- | compat/terminal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/terminal.c b/compat/terminal.c index 5b903e7c7e..fb8c70a625 100644 --- a/compat/terminal.c +++ b/compat/terminal.c @@ -385,7 +385,7 @@ int read_key_without_echo(struct strbuf *buf) ch = getchar(); if (ch == EOF) - return 0; + break; strbuf_addch(buf, ch); } } |