From 4da71def346e872a7e6e3d6adbc9bdb13def8045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sun, 10 Aug 2025 11:04:15 -0300 Subject: [PATCH] Fix bug not displaying an error when opening a terminal in unsupported platforms and then allowing to open an external terminal (mentioned in SpartanJ/ecode#609). --- src/tools/ecode/appconfig.cpp | 3 ++- src/tools/ecode/terminalmanager.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/ecode/appconfig.cpp b/src/tools/ecode/appconfig.cpp index c1c649dd5..e9b404c1f 100644 --- a/src/tools/ecode/appconfig.cpp +++ b/src/tools/ecode/appconfig.cpp @@ -219,7 +219,8 @@ void AppConfig::load( const std::string& confPath, std::string& keybindingsPath, term.newTerminalOrientation = NewTerminalOrientation::fromString( ini.getValue( "terminal", "new_terminal_orientation", "vertical" ) ); term.scrollback = ini.getValueI( "terminal", "scrollback", 10000 ); - term.unsupportedOSWarnDisabled = ini.getValueB( "terminal", "unsupported_os_warn_disabled" ); + term.unsupportedOSWarnDisabled = + ini.getValueB( "terminal", "unsupported_os_warn_disabled", false ); workspace.restoreLastSession = ini.getValueB( "workspace", "restore_last_session", false ); workspace.checkForUpdatesAtStartup = diff --git a/src/tools/ecode/terminalmanager.cpp b/src/tools/ecode/terminalmanager.cpp index 434f5ce66..fde665640 100644 --- a/src/tools/ecode/terminalmanager.cpp +++ b/src/tools/ecode/terminalmanager.cpp @@ -15,8 +15,10 @@ UITerminal* TerminalManager::createTerminalInSplitter( std::string os = Sys::getOSName( true ); if ( !LuaPattern::hasMatches( os, "Windows 1%d"sv ) && !LuaPattern::hasMatches( os, "Windows Server 201[69]"sv ) && - !LuaPattern::hasMatches( os, "Windows Server 202%d"sv ) ) + !LuaPattern::hasMatches( os, "Windows Server 202%d"sv ) ) { + displayError( workingDir ); return nullptr; + } #endif UITerminal* term = nullptr;