diff --git a/far/changelog b/far/changelog index b8d930f72a..cf836bac50 100644 --- a/far/changelog +++ b/far/changelog @@ -1,4 +1,10 @@ -drkns 03.05.2016 16:58:07 +0200 - build 4660 +drkns 04.05.2016 10:20:21 +0200 - build 4661 + +1. Уточнение 4656.2. + +2. Пара мелочей. + +drkns 03.05.2016 16:58:07 +0200 - build 4660 1. Уточнение 4656.2. diff --git a/far/cmdline.cpp b/far/cmdline.cpp index db90f066d0..e08c942199 100644 --- a/far/cmdline.cpp +++ b/far/cmdline.cpp @@ -896,11 +896,14 @@ class execution_context: noncopyable Global->WindowManager->ActivateWindow(Global->CtrlObject->Desktop); Global->WindowManager->ShowBackground(); + + // ShowCommand is false when there is no "command" - class instantiated by FCTL_GETUSERSCREEN. if (m_ShowCommand) { Global->CtrlObject->CmdLine()->DrawFakeCommand(m_Command); + ScrollScreen(1); } - ScrollScreen(1); + Global->CtrlObject->Desktop->TakeSnapshot(); int X1, Y1, X2, Y2; Global->CtrlObject->CmdLine()->GetPosition(X1, Y1, X2, Y2); diff --git a/far/common.hpp b/far/common.hpp index 6a2ebd15d7..b6221ccfa5 100644 --- a/far/common.hpp +++ b/far/common.hpp @@ -213,6 +213,15 @@ class writable_blob: public blob bool m_Allocated; }; +namespace enum_helpers +{ + template + constexpr auto operation(T a, T b) + { + return static_cast::value, T, R>>(O()(static_cast>(a), static_cast>(b))); + } +} + #ifdef _DEBUG #define SELF_TEST(code) \ namespace \ diff --git a/far/scrbuf.hpp b/far/scrbuf.hpp index 06481152c1..3848121648 100644 --- a/far/scrbuf.hpp +++ b/far/scrbuf.hpp @@ -48,24 +48,17 @@ enum class flush_type all = screen | cursor | title }; -inline auto operator|(flush_type a, flush_type b) +inline constexpr auto operator|(flush_type a, flush_type b) { - return static_cast( - static_cast>(a) | - static_cast>(b) - ); + return enum_helpers::operation>(a, b); } -inline auto operator&(flush_type a, flush_type b) +inline constexpr auto operator&(flush_type a, flush_type b) { - return - static_cast>(a) & - static_cast>(b); + return enum_helpers::operation, std::underlying_type_t>(a, b); } - class ScreenBuf: noncopyable - { public: ScreenBuf(); diff --git a/far/vbuild.m4 b/far/vbuild.m4 index 617e2e83ec..0bbe05167d 100644 --- a/far/vbuild.m4 +++ b/far/vbuild.m4 @@ -1 +1 @@ -m4_define(BUILD,4660)m4_dnl +m4_define(BUILD,4661)m4_dnl