Mercurial > octave
changeset 21482:c64e57319f08
octave-gui: Set TERM unconditionally to Octave's expected terminal type (bug #47449)
* octave-gui.cc (octave_start_gui): Set TERM unconditionally to the expected
terminal type for the host system.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Fri, 18 Mar 2016 11:27:15 -0700 |
parents | eebbb80bf6d9 |
children | fe56e066825d |
files | libgui/src/octave-gui.cc |
diffstat | 1 files changed, 5 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/octave-gui.cc Fri Mar 18 11:03:58 2016 -0700 +++ b/libgui/src/octave-gui.cc Fri Mar 18 11:27:15 2016 -0700 @@ -160,20 +160,12 @@ // update network-settings resource_manager::update_network_settings (); -#if ! defined (__WIN32__) || defined (__CYGWIN__) - // If we were started from a launcher, TERM might not be - // defined, but we provide a terminal with xterm - // capabilities. - - std::string term = octave_env::getenv ("TERM"); - - if (term.empty ()) - octave_env::putenv ("TERM", "xterm"); + // We provide specific terminal capabilities, so ensure that TERM is + // always set appropriately +#if defined (__WIN32__) && ! defined (__CYGWIN__) + octave_env::putenv ("TERM", "cygwin"); #else - std::string term = octave_env::getenv ("TERM"); - - if (term.empty ()) - octave_env::putenv ("TERM", "cygwin"); + octave_env::putenv ("TERM", "xterm"); #endif // shortcut manager