Skip to content
Permalink
Browse files

1. с форума: символ из "бюжэхъё" не включается в быстрый поиск.

  • Loading branch information...
zg0 committed May 14, 2016
1 parent cd3c629 commit 2f3528f7ab5844358a6611ef38ebc7806be3e228
Showing with 18 additions and 50 deletions.
  1. +5 −1 far/changelog
  2. +1 −18 far/filelist.cpp
  3. +0 −2 far/global.cpp
  4. +0 −1 far/global.hpp
  5. +2 −11 far/keyboard.cpp
  6. +0 −2 far/macro.cpp
  7. +0 −3 far/manager.cpp
  8. +7 −9 far/panel.cpp
  9. +1 −1 far/panel.hpp
  10. +1 −1 far/treelist.cpp
  11. +1 −1 far/vbuild.m4
@@ -1,4 +1,8 @@
drkns 13.05.2016 00:33:18 +0200 - build 4671
zg 15.05.2016 00:33:49 +0200 - build 4672

1. с форума: символ из "бюжэхъё" не включается в быстрый поиск.

drkns 13.05.2016 00:33:18 +0200 - build 4671

1. Уточнение обработки исключений для gcc.

@@ -2567,24 +2567,7 @@ int FileList::ProcessKey(const Manager::Key& Key)
!(LocalKey&EXTENDED_KEY_BASE)
)
{
//_SVS(SysLog(L">FastFind: Key=%s",_FARKEY_ToName(Key)));
// Скорректируем уже здесь нужные клавиши, т.к. WaitInFastFind
// в это время еще равно нулю.
static const char Code[]=")!@#$%^&*(";

if (LocalKey >= KEY_ALTSHIFT0 && LocalKey <= KEY_ALTSHIFT9)
LocalKey=(DWORD)Code[LocalKey-KEY_ALTSHIFT0];
else if (LocalKey >= KEY_RALTSHIFT0 && LocalKey <= KEY_RALTSHIFT9)
LocalKey=(DWORD)Code[LocalKey-KEY_RALTSHIFT0];
else if ((LocalKey&(~(KEY_ALT|KEY_RALT|KEY_SHIFT))) == '/')
LocalKey='?';
else if ((LocalKey == KEY_ALTSHIFT+'-') || (LocalKey == KEY_RALT+KEY_SHIFT+'-'))
LocalKey='_';
else if ((LocalKey == KEY_ALTSHIFT+'=') || (LocalKey == KEY_RALT+KEY_SHIFT+'='))
LocalKey='+';

//_SVS(SysLog(L"<FastFind: Key=%s",_FARKEY_ToName(Key)));
FastFind(LocalKey);
FastFind(Key);
}
else
break;
@@ -72,8 +72,6 @@ global::global():
// идет процесс назначения клавиши в макросе?
IsProcessAssignMacroKey=FALSE;
PluginPanelsCount = 0;
// идет процесс быстрого поиска в панелях?
WaitInFastFind=FALSE;
// мы крутимся в основном цикле?
WaitInMainLoop=FALSE;
StartIdleTime=0;
@@ -60,7 +60,6 @@ class global: noncopyable

clock_t StartIdleTime;
int WaitInMainLoop;
int WaitInFastFind;
string g_strFarModuleName;
string g_strFarINI;
string g_strFarPath;
@@ -2507,16 +2507,7 @@ unsigned int CalcKeyCode(const INPUT_RECORD* rec, int RealKey, int *NotMacros)

if (KeyCode>='0' && KeyCode<='9')
{
if (Global->WaitInFastFind > 0 &&
Global->CtrlObject->Macro.GetState() < MACROSTATE_RECORDING &&
!Global->CtrlObject->Macro.MacroExists(KEY_ALTSHIFT0+KeyCode-'0',MACROAREA_SEARCH,true))
{
return Modif|Char;
}
else
{
return Modif|KeyCode;
}
return Modif|KeyCode;
}

if (!Global->WaitInMainLoop && KeyCode>='A' && KeyCode<='Z')
@@ -2794,7 +2785,7 @@ unsigned int CalcKeyCode(const INPUT_RECORD* rec, int RealKey, int *NotMacros)

if (Char)
{
if (!Global->Opt->ShiftsKeyRules || Global->WaitInFastFind > 0)
if (!Global->Opt->ShiftsKeyRules)
return ModifAlt|Upper(Char);
else if (Global->WaitInMainLoop)
return ModifAlt|Char;
@@ -648,7 +648,6 @@ int KeyMacro::ProcessEvent(const FAR_INPUT_RECORD *Rec)
m_RecCode.clear();
m_RecDescription.clear();
Global->ScrBuf->Flush();
Global->WaitInFastFind--;
return true;
}
else
@@ -708,7 +707,6 @@ int KeyMacro::ProcessEvent(const FAR_INPUT_RECORD *Rec)
m_RecCode.clear();
m_RecDescription.clear();
Global->ScrBuf->RestoreMacroChar();
Global->WaitInFastFind++;

if (Global->Opt->AutoSaveSetup)
SaveMacros(false); // записать только изменения!
@@ -607,7 +607,6 @@ bool Manager::HaveAnyMessage() const

void Manager::EnterMainLoop()
{
Global->WaitInFastFind=0;
StartManager = true;

for (;;)
@@ -633,10 +632,8 @@ void Manager::ProcessMainLoop()
{
// Mantis#0000073: Не работает автоскролинг в QView
Global->WaitInMainLoop=IsPanelsActive(true);
//WaitInFastFind++;
INPUT_RECORD rec;
int Key=GetInputRecord(&rec);
//WaitInFastFind--;
Global->WaitInMainLoop=FALSE;

if (EndLoop)
@@ -136,9 +136,9 @@ class Search: public Modal
struct private_tag {};

public:
static search_ptr create(Panel* Owner, int FirstKey);
static search_ptr create(Panel* Owner, const Manager::Key& FirstKey);

Search(private_tag, Panel* Owner, int FirstKey);
Search(private_tag, Panel* Owner, const Manager::Key& FirstKey);

void Process(void);
virtual int ProcessKey(const Manager::Key& Key) override;
@@ -153,7 +153,7 @@ class Search: public Modal
void init(void);

Panel* m_Owner;
int m_FirstKey;
Manager::Key m_FirstKey;
std::unique_ptr<EditControl> m_FindEdit;
Manager::Key m_KeyToProcess;
virtual void DisplayObject(void) override;
@@ -163,7 +163,7 @@ class Search: public Modal
void Close(void);
};

Search::Search(private_tag, Panel* Owner, int FirstKey):
Search::Search(private_tag, Panel* Owner, const Manager::Key& FirstKey):
m_Owner(Owner),
m_FirstKey(FirstKey),
m_FindEdit(),
@@ -181,7 +181,7 @@ void Search::InitPositionAndSize(void)
m_FindEdit->SetPosition(FindX+2,FindY+1,FindX+19,FindY+1);
}

search_ptr Search::create(Panel* Owner, int FirstKey)
search_ptr Search::create(Panel* Owner, const Manager::Key& FirstKey)
{
const auto SearchPtr = std::make_shared<Search>(private_tag(), Owner, FirstKey);
SearchPtr->init();
@@ -203,7 +203,7 @@ void Search::init(void)
void Search::Process(void)
{
Global->WindowManager->ExecuteWindow(shared_from_this());
if(m_FirstKey) Global->WindowManager->CallbackWindow([this](){ ProcessKey(Manager::Key(m_FirstKey)); });
Global->WindowManager->CallbackWindow([this](){ ProcessKey(m_FirstKey); });
Global->WindowManager->ExecuteModal(shared_from_this());
}

@@ -408,17 +408,15 @@ void Search::Close(void)
Global->WindowManager->DeleteWindow(shared_from_this());
}

void Panel::FastFind(int FirstKey)
void Panel::FastFind(const Manager::Key& FirstKey)
{
// // _SVS(CleverSysLog Clev(L"Panel::FastFind"));
Manager::Key KeyToProcess;
Global->WaitInFastFind++;
{
const auto search = Search::create(this, FirstKey);
search->Process();
KeyToProcess=search->KeyToProcess();
}
Global->WaitInFastFind--;
Show();
Parent()->GetKeybar().Redraw();
Global->ScrBuf->Flush();
@@ -266,7 +266,7 @@ class Panel: public ScreenObject, public std::enable_shared_from_this<Panel>
Panel(window_ptr Owner);
virtual void ClearAllItem(){}

void FastFind(int FirstKey);
void FastFind(const Manager::Key& FirstKey);
void DrawSeparator(int Y);
void ShowScreensCount();
string GetTitleForDisplay();
@@ -1445,7 +1445,7 @@ int TreeList::ProcessKey(const Manager::Key& Key)
if ((LocalKey>=KEY_ALT_BASE+0x01 && LocalKey<=KEY_ALT_BASE+65535) || (LocalKey>=KEY_RALT_BASE+0x01 && LocalKey<=KEY_RALT_BASE+65535) ||
(LocalKey>=KEY_ALTSHIFT_BASE+0x01 && LocalKey<=KEY_ALTSHIFT_BASE+65535) || (LocalKey>=KEY_RALTSHIFT_BASE+0x01 && LocalKey<=KEY_RALTSHIFT_BASE+65535))
{
FastFind(LocalKey);
FastFind(Key);

if (Global->Opt->Tree.AutoChangeFolder && !m_ModalMode)
ProcessKey(Manager::Key(KEY_ENTER));
@@ -1 +1 @@
m4_define(BUILD,4671)m4_dnl
m4_define(BUILD,4672)m4_dnl

0 comments on commit 2f3528f

Please sign in to comment.
You can’t perform that action at this time.