From a464fb8bc2aa95220ed4abee7aedc3273a39b3a6 Mon Sep 17 00:00:00 2001 From: elfmz Date: Sat, 19 Oct 2024 22:21:47 +0300 Subject: [PATCH] extra fix old ftp plugin (touch #2443) --- far2l/src/filepanels.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/far2l/src/filepanels.cpp b/far2l/src/filepanels.cpp index 3cfcecf6d..6e85f6b00 100644 --- a/far2l/src/filepanels.cpp +++ b/far2l/src/filepanels.cpp @@ -237,27 +237,25 @@ void FilePanels::UpdateCmdLineVisibility(bool repos) new_cl_x2 = left_x2 - 1; } } - if (new_cl_x1 != cl_x1 || new_cl_x2 != cl_x2 || new_cl_y != cl_y) { - repos = true; - } + bool cl_repos = (new_cl_x1 != cl_x1 || new_cl_x2 != cl_x2 || new_cl_y != cl_y); if (cl_visible != new_cl_visible) { CtrlObject->CmdLine->SetVisible(new_cl_visible); } - if (repos) { + if (cl_repos || repos) { CtrlObject->CmdLine->SetPosition(new_cl_x1, new_cl_y, new_cl_x2, new_cl_y); } - if (cl_visible != new_cl_visible || repos) { + if (cl_visible != new_cl_visible || cl_repos || repos) { if (new_cl_visible) { CtrlObject->CmdLine->Redraw(); } -/* Don't remember why it was added, but it causes infinite recursion with old FTP plugin (#2443) - if (LeftPanel->IsVisible()) { - LeftPanel->Redraw(); - } - if (RightPanel->IsVisible()) { - RightPanel->Redraw(); + if (cl_visible != new_cl_visible || cl_repos) { + if (LeftPanel->IsVisible()) { + LeftPanel->Redraw(); + } + if (RightPanel->IsVisible()) { + RightPanel->Redraw(); + } } -*/ } }