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(); + } } -*/ } }