diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2022-02-22 18:53:32 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-23 21:30:06 (GMT) |
commit | 24d7ce383a3d92feae6a641499448fde43206fd8 (patch) | |
tree | ec832b5aa257ea774768cb8bdded64966d99030a /compat | |
parent | b80121027d1247a0754b3cc46897fee75c050b44 (diff) | |
download | git-24d7ce383a3d92feae6a641499448fde43206fd8.zip git-24d7ce383a3d92feae6a641499448fde43206fd8.tar.gz git-24d7ce383a3d92feae6a641499448fde43206fd8.tar.bz2 |
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 5b903e7..fb8c70a 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); } } |