Shell: load old termios for process execution

This commit is contained in:
Bananymous 2023-06-05 20:34:31 +03:00
parent 896b919c9d
commit 357081346e
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));