diff --git a/far/changelog b/far/changelog index 157e27d893..333772e4e9 100644 --- a/far/changelog +++ b/far/changelog @@ -1,3 +1,8 @@ +-------------------------------------------------------------------------------- +drkns 2023-12-27 23:11:57+00:00 - build 6236 + +1. Another attempt to make nested user screens work. + -------------------------------------------------------------------------------- drkns 2023-12-23 21:23:54+00:00 - build 6235 diff --git a/far/cmdline.cpp b/far/cmdline.cpp index 62dfb4ee4e..fae681716e 100644 --- a/far/cmdline.cpp +++ b/far/cmdline.cpp @@ -1015,7 +1015,7 @@ void CommandLine::ExecString(execute_info& Info) SCOPE_EXIT { if (ExecutionContext) - ExecutionContext->DoEpilogue(Info.Echo && !Info.Command.empty()); + ExecutionContext->DoEpilogue(Info.Echo && !Info.Command.empty(), true); if (!IsUpdateNeeded) return; diff --git a/far/console_session.cpp b/far/console_session.cpp index eb47bef7e3..56f3203821 100644 --- a/far/console_session.cpp +++ b/far/console_session.cpp @@ -132,7 +132,7 @@ class context final: noncopyable, public i_context m_Finalised = false; } - void DoEpilogue(bool Scroll) override + void DoEpilogue(bool Scroll, bool IsLastInstance) override { if (!m_Activated) return; @@ -149,7 +149,8 @@ class context final: noncopyable, public i_context std::wcout.flush(); Global->ScrBuf->FillBuf(); - m_Consolised = false; + if (IsLastInstance) + m_Consolised = false; } if (Scroll && DoWeReallyHaveToScroll(Global->Opt->ShowKeyBar? 3 : 2)) @@ -161,7 +162,8 @@ class context final: noncopyable, public i_context Global->WindowManager->Desktop()->TakeSnapshot(); - m_Finalised = true; + if (IsLastInstance) + m_Finalised = true; } ~context() override @@ -187,7 +189,7 @@ void console_session::EnterPluginContext(bool Scroll) } else { - m_PluginContext->DoEpilogue(Scroll); + m_PluginContext->DoEpilogue(Scroll, false); } m_PluginContext->DoPrologue(); @@ -202,7 +204,7 @@ void console_session::LeavePluginContext(bool Scroll) if (m_PluginContext) { - m_PluginContext->DoEpilogue(Scroll); + m_PluginContext->DoEpilogue(Scroll, !m_PluginContextInvocations); } else { diff --git a/far/console_session.hpp b/far/console_session.hpp index 848bce0bd6..1f82838441 100644 --- a/far/console_session.hpp +++ b/far/console_session.hpp @@ -55,7 +55,7 @@ class i_context virtual void Deactivate() = 0; virtual void DrawCommand(string_view Command) = 0; virtual void DoPrologue() = 0; - virtual void DoEpilogue(bool Scroll) = 0; + virtual void DoEpilogue(bool Scroll, bool IsLastInstance) = 0; virtual void Consolise(bool SetTextColour = true) = 0; }; diff --git a/far/vbuild.m4 b/far/vbuild.m4 index de54cf8856..5a8cd6dddf 100644 --- a/far/vbuild.m4 +++ b/far/vbuild.m4 @@ -1 +1 @@ -6235 +6236