intptr_t WINAPI ProcessEditorInputW(const ProcessEditorInputInfo *InputInfo) { LPWSTR FileName=NULL; BOOL Result=FALSE; if (Opt.ProcessEditorInput) { if (InputInfo->Rec.EventType==KEY_EVENT && InputInfo->Rec.Event.KeyEvent.bKeyDown && inputrecord_compare(InputInfo->Rec,Opt.RecKey)) { Info.EditorControl(-1,ECTL_GETINFO,0,&ei); size_t FileNameSize=Info.EditorControl(-1,ECTL_GETFILENAME,0,0); if (FileNameSize) { FileName=new wchar_t[FileNameSize]; if (FileName) { Info.EditorControl(-1,ECTL_GETFILENAME,FileNameSize,FileName); } } if (CheckExtension(FileName)) { ShowCurrentHelpTopic(); Result=TRUE; } } } if (FileName) { delete[] FileName; } return Result; }
intptr_t WINAPI ProcessEditorInputW(const ProcessEditorInputInfo *InputInfo) { BOOL Result=FALSE; if (Opt.ProcessEditorInput) { if (InputInfo->Rec.EventType==KEY_EVENT && InputInfo->Rec.Event.KeyEvent.bKeyDown && inputrecord_compare(InputInfo->Rec,Opt.RecKey)) { Info.EditorControl(-1,ECTL_GETINFO,0,&ei); wchar_t *FileName=GetEditorFileName(); if (IsHlf() || (Opt.CheckMaskFile && CheckExtension(FileName))) { if (ShowCurrentHelpTopic()) Result=TRUE; } if (FileName) delete[] FileName; } } return Result; }