From 70503807bb5e84a4e557223b8ce27a053b357270 Mon Sep 17 00:00:00 2001 From: johnd0e <1838643+johnd0e@users.noreply.github.com> Date: Thu, 15 Jun 2023 22:43:39 +0200 Subject: [PATCH] Allow to break directory scan started from a macro (Mantis#0002692). Fix by Shmuel: https://github.com/shmuz/far2m/issues/36 --- far/changelog | 6 ++++++ far/dirinfo.cpp | 7 +++++-- far/vbuild.m4 | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/far/changelog b/far/changelog index 77cff44d6a..19cc562747 100644 --- a/far/changelog +++ b/far/changelog @@ -1,3 +1,9 @@ +-------------------------------------------------------------------------------- +johnd0e 2023-06-17 14:55:00+01:00 - build 6165 + +1. Allow to break directory scan started from a macro (Mantis#0002692). + Fix by Shmuel: https://github.com/shmuz/far2m/issues/36 + -------------------------------------------------------------------------------- drkns 2023-06-14 20:01:09+01:00 - build 6164 diff --git a/far/dirinfo.cpp b/far/dirinfo.cpp index a040d3e114..ae49ea9b31 100644 --- a/far/dirinfo.cpp +++ b/far/dirinfo.cpp @@ -111,10 +111,13 @@ int GetDirInfo(string_view const DirName, DirInfoData& Data, multifilter* Filter // Временные хранилища имён каталогов string strLastDirName; os::fs::find_data FindData; + + // Mantis#0002692 + Global->CtrlObject->Macro.SuspendMacros(true); + SCOPE_EXIT{ Global->CtrlObject->Macro.SuspendMacros(false); }; + while (ScTree.GetNextName(FindData,strFullName)) { - // Mantis#0002692 - if (!Global->CtrlObject->Macro.IsExecuting()) { INPUT_RECORD rec; diff --git a/far/vbuild.m4 b/far/vbuild.m4 index af0475b48c..9015aa4c7f 100644 --- a/far/vbuild.m4 +++ b/far/vbuild.m4 @@ -1 +1 @@ -6164 +6165