Browse Source

Hotfix (terminal attributes reset on shutdown)

Ivan Arkhipov 5 years ago
parent
commit
84511f50c1
1 changed files with 2 additions and 0 deletions
  1. 2 0
      esh_main_loop.c

+ 2 - 0
esh_main_loop.c

@@ -125,6 +125,7 @@ void EShRunLoop() {
 
 			if (input_char == 4) {
 				// Ctrl + d
+			    tcsetattr(fileno(stdin), TCSANOW, &orig_term_attr);
 				return;
 			}
 
@@ -151,6 +152,7 @@ void EShRunLoop() {
 
 			if (input_char == 3) {
 				// Ctrl + c
+			    tcsetattr(fileno(stdin), TCSANOW, &orig_term_attr);
 				printf("\n");
 				return;
 			}