set COLUMNS and LINES earlier

Fixes #4141
This commit is contained in:
Kurtis Rader 2017-06-18 15:38:52 -07:00
parent 385e40540c
commit 93dad29ec6
2 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,7 @@
# fish 2.7b1
## Notable fixes and improvements
- The `COLUMNS` and `LINES` env vars are now correctly set the first time `fish_prompt` is run (#4141).
## Other significant changes

View File

@ -800,6 +800,10 @@ void reader_init() {
if (is_interactive_session) {
tcsetattr(STDIN_FILENO, TCSANOW, &shell_modes);
}
// We do this not because we actually need the window size but for its side-effect of correctly
// setting the COLUMNS and LINES env vars.
get_current_winsize();
}
void reader_destroy() { pthread_key_delete(generation_count_key); }