Re-read terminal modes after config.fish

Before now, we would be getting the terminal modes before config.fish,
then running config.fish without any of the term "stealing" and modes
copying. This meant that changes made to the terminal modes in there
were simply lost.

So, what we do is simply set the modes before config and then copy
them after, once.

Note that this does *not* turn off flow control again - if you turn it
on in config.fish that should work.

Fixes #7783.
This commit is contained in:
Fabian Homborg
2021-03-06 09:24:54 +01:00
parent c7c9ff9a4a
commit dbb74f87ba
3 changed files with 19 additions and 7 deletions

View File

@@ -491,6 +491,9 @@ int main(int argc, char **argv) {
if (!opts.no_exec) {
read_init(parser, paths);
}
// Re-read the terminal modes after config, it might have changed them.
term_copy_modes();
// Stomp the exit status of any initialization commands (issue #635).
parser.set_last_statuses(statuses_t::just(STATUS_CMD_OK));