projects
/
mutt
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
89d0484
)
Check for lost tty if getch returns error (closes #1220)
author
Brendan Cully
<brendan@kublai.com>
Thu, 16 Aug 2007 16:32:33 +0000
(09:32 -0700)
committer
Brendan Cully
<brendan@kublai.com>
Thu, 16 Aug 2007 16:32:33 +0000
(09:32 -0700)
Great thanks to Vincent Lefevre for tracking this one down.
curs_lib.c
patch
|
blob
|
history
diff --git
a/curs_lib.c
b/curs_lib.c
index e9dbaa8b3a1f04c80a7bd476ed0f468fe20384d3..c800456377899fb4482b5b498803212a9fb924c9 100644
(file)
--- a/
curs_lib.c
+++ b/
curs_lib.c
@@
-99,8
+99,16
@@
event_t mutt_getch (void)
mutt_query_exit ();
if(ch == ERR)
+ {
+ /* either timeout or the terminal has been lost */
+ if (!isatty (0))
+ {
+ endwin ();
+ exit (1);
+ }
return err;
-
+ }
+
if ((ch & 0x80) && option (OPTMETAKEY))
{
/* send ALT-x as ESC-x */