aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2019-07-21 16:15:25 +0900
committerJustin M. Keyes <justinkz@gmail.com>2019-07-23 11:45:38 +0200
commit465a0a3c09ece20c16c08e694ec9f47aeafb47fc (patch)
treee0aef31c417c6df9a44129cd0d01e86c30882dbb /src/nvim/tui
parentf6e779d939c0d3c67496daa296b6e78ed10a92b5 (diff)
downloadrneovim-465a0a3c09ece20c16c08e694ec9f47aeafb47fc.tar.gz
rneovim-465a0a3c09ece20c16c08e694ec9f47aeafb47fc.tar.bz2
rneovim-465a0a3c09ece20c16c08e694ec9f47aeafb47fc.zip
env: invalid pointer after os_setenv() #10558
Diffstat (limited to 'src/nvim/tui')
-rw-r--r--src/nvim/tui/tui.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 307166bc41..58ef540707 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -222,6 +222,8 @@ static void terminfo_start(UI *ui)
#ifdef WIN32
os_tty_guess_term(&term, data->out_fd);
os_setenv("TERM", term, 1);
+ // Old os_getenv() pointer is invalid after os_setenv(), fetch it again.
+ term = os_getenv("TERM");
#endif
// Set up unibilium/terminfo.