Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Wood <phillip.wood@dunelm.org.uk>2022-02-22 21:53:32 +0300
committerJunio C Hamano <gitster@pobox.com>2022-02-24 00:30:06 +0300
commit24d7ce383a3d92feae6a641499448fde43206fd8 (patch)
treeec832b5aa257ea774768cb8bdded64966d99030a /compat/terminal.c
parentb80121027d1247a0754b3cc46897fee75c050b44 (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/terminal.c')
-rw-r--r--compat/terminal.c2
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);
}
}