Shell: load old termios for process execution

This commit is contained in:
Bananymous 2023-06-05 20:34:31 +03:00
parent b0e9ab0519
commit 3fc2c3529a
1 changed files with 2 additions and 0 deletions

View File

@ -177,7 +177,9 @@ int main(int argc, char** argv)
fputc('\n', stdout);
if (!buffers[index].empty())
{
tcsetattr(0, TCSANOW, &old_termios);
execute_command(buffers[index]);
tcsetattr(0, TCSANOW, &new_termios);
MUST(history.push_back(buffers[index]));
buffers = history;
MUST(buffers.emplace_back(""sv));