Selaa lähdekoodia

Change: When tab of not yet connected session is activated implicitly by closing the active session, the newly activated session is not connected automatically

Source commit: 2311686f3ae158c34fcf1b7361da5b30563e77fe
Martin Prikryl 6 vuotta sitten
vanhempi
sitoutus
f842722d1c
1 muutettua tiedostoa jossa 7 lisäystä ja 1 poistoa
  1. 7 1
      source/windows/TerminalManager.cpp

+ 7 - 1
source/windows/TerminalManager.cpp

@@ -594,7 +594,13 @@ void __fastcall TTerminalManager::FreeTerminal(TTerminal * Terminal)
     {
       if ((Count > 0) && !FDestroying)
       {
-        ActiveTerminal = Terminals[Index < Count ? Index : Index - 1];
+        TManagedTerminal * NewActiveTerminal = Terminals[Index < Count ? Index : Index - 1];
+        if (!NewActiveTerminal->Disconnected)
+        {
+          NewActiveTerminal->Disconnected = true;
+          NewActiveTerminal->DisconnectedTemporarily = true;
+        }
+        ActiveTerminal = NewActiveTerminal;
       }
       else
       {