Skip to content

Commit

Permalink
VT: reset special terminal modes to avoid messing up of terminal if a…
Browse files Browse the repository at this point in the history
…pplication that used them exited abnormally
  • Loading branch information
elfmz committed Nov 3, 2024
1 parent 78b481c commit beb3cdf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions far2l/src/vt/vtshell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1076,10 +1076,16 @@ class VTShell : VTOutputReader::IProcessor, VTInputReader::IProcessor, IVTShell
}

std::lock_guard<std::mutex> lock(_read_state_mutex);
// reset special terminal modes to avoid messing up of
// terminal if application that used them exited abnormally
_bracketed_paste_expected = false;
_win32_input_mode_expected = false;
_kitty_kb_flags = 0;
_mouse_expectations = 0;
_far2l_exts.reset();
_host_id.clear();
_mouse.reset();
_mouse_expectations = 0;
// cleanup also NetRocks per-session identifier
_host_id.clear();
return true;
}

Expand Down

0 comments on commit beb3cdf

Please sign in to comment.