Fix editor not displaying an error when stdio is not a terminal.
This commit is contained in:
parent
0c48dfca96
commit
6f35797e19
|
@ -2225,6 +2225,11 @@ void editor_kbkey(struct editor* editor, int kbkey)
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
if ( !isatty(0) )
|
||||||
|
error(1, errno, "standard input");
|
||||||
|
if ( !isatty(1) )
|
||||||
|
error(1, errno, "standard output");
|
||||||
|
|
||||||
struct editor editor;
|
struct editor editor;
|
||||||
initialize_editor(&editor);
|
initialize_editor(&editor);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue