mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 09:45:25 +08:00
Bravely stop attempting to modify the terminal size
Prior to this fix, fish would attempt to resize the terminal via TIOCSWINSZ, which was added as part of #3740. In practice this probably never did anything useful since generally only the tty master can use this. Remove the support and note it in the changelog.
This commit is contained in:
parent
df618a0768
commit
d5a239e59e
|
@ -136,6 +136,7 @@ Completions
|
|||
|
||||
Deprecations and removed features
|
||||
---------------------------------
|
||||
- fish no longer attempts to modify the terminal size via `TIOCSWINSZ`.
|
||||
|
||||
For distributors and developers
|
||||
-------------------------------
|
||||
|
|
|
@ -1801,13 +1801,6 @@ static void export_new_termsize(struct winsize *new_termsize, env_stack_t &vars)
|
|||
auto lines = vars.get(L"LINES", ENV_EXPORT);
|
||||
vars.set_one(L"LINES", ENV_GLOBAL | (lines.missing_or_empty() ? ENV_DEFAULT : ENV_EXPORT),
|
||||
std::to_wstring(int(new_termsize->ws_row)));
|
||||
|
||||
#ifdef HAVE_WINSIZE
|
||||
// Only write the new terminal size if we are in the foreground (#4477)
|
||||
if (tcgetpgrp(STDOUT_FILENO) == getpgrp()) {
|
||||
ioctl(STDOUT_FILENO, TIOCSWINSZ, new_termsize);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Get the current termsize, lazily computing it. Return by reference if it changed.
|
||||
|
|
Loading…
Reference in New Issue
Block a user