Browse Source

Showing the current path in the window title in local-local mode

Source commit: 66660d4f20c37df8ebabde007a1f73e3fec6a3e4
Martin Prikryl 5 years ago
parent
commit
24026000b4
2 changed files with 4 additions and 3 deletions
  1. 3 2
      source/forms/ScpCommander.cpp
  2. 1 1
      source/windows/TerminalManager.cpp

+ 3 - 2
source/forms/ScpCommander.cpp

@@ -2031,8 +2031,9 @@ UnicodeString __fastcall TScpCommanderForm::PathForCaption()
   UnicodeString Result;
   if (IsSideLocalBrowser(FCurrentSide))
   {
-    // for consistency do not show even local path when there is no terminal
-    if (Terminal != NULL)
+    // make sure the path corresponds to the terminal in title
+    // (there's a mismatch, while opening a new session)
+    if (Terminal == TTerminalManager::Instance()->ActiveTerminal)
     {
       switch (WinConfiguration->PathInCaption)
       {

+ 1 - 1
source/windows/TerminalManager.cpp

@@ -808,7 +808,7 @@ void __fastcall TTerminalManager::UpdateAppTitle()
     {
       NewTitle = ProgressTitle + L" - " + NewTitle;
     }
-    else if (ActiveTerminal && (ScpExplorer != NULL))
+    else if (ScpExplorer != NULL)
     {
       UnicodeString Path = ScpExplorer->PathForCaption();
       if (!Path.IsEmpty())