mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-30 15:21:16 -03:00
handling when stty reports zero for termsize
If the kernel reports a size of zero for the rows or columns (i.e., what `stty -a` reports) fall back to the `COLUMNS` and `LINES` variables. If the resulting values are not reasonable fallback to using 80x24. Fixes #3740
This commit is contained in:
@@ -357,7 +357,7 @@ static void term_steal() {
|
||||
break;
|
||||
}
|
||||
|
||||
common_handle_winch(0);
|
||||
invalidate_termsize();
|
||||
}
|
||||
|
||||
int reader_exit_forced() { return exit_forced; }
|
||||
@@ -1644,7 +1644,7 @@ static void reader_interactive_init() {
|
||||
exit_without_destructors(1);
|
||||
}
|
||||
|
||||
common_handle_winch(0);
|
||||
invalidate_termsize();
|
||||
|
||||
// Set the new modes.
|
||||
if (tcsetattr(0, TCSANOW, &shell_modes) == -1) {
|
||||
|
||||
Reference in New Issue
Block a user