Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grep実行中はテキスト置換処理の進捗ダイアログ表示を抑制 #211

Merged
merged 2 commits into from
Jul 4, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions sakura_core/CSearchAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "util/string_ex.h"
#include <algorithm>
#include "sakura_rc.h"
#include "CEditApp.h"
#include "CGrepAgent.h"

//#define MEASURE_SEARCH_TIME
#ifdef MEASURE_SEARCH_TIME
Expand Down Expand Up @@ -822,13 +824,15 @@ void CSearchAgent::ReplaceData( DocLineReplaceArg* pArg )
CDLgCandelCloser closer(pCDlgCancel);
const CLogicInt nDelLines = pArg->sDelRange.GetTo().y - pArg->sDelRange.GetFrom().y;
const CLogicInt nEditLines = std::max<CLogicInt>(CLogicInt(1), nDelLines + CLogicInt(pArg->pInsData ? pArg->pInsData->size(): 0));
if( 3000 < nEditLines ){
/* �i���_�C�A���O�̕\�� */
pCDlgCancel = new CDlgCancel;
if( NULL != ( hwndCancel = pCDlgCancel->DoModeless( ::GetModuleHandle( NULL ), NULL, IDD_OPERATIONRUNNING ) ) ){
hwndProgress = ::GetDlgItem( hwndCancel, IDC_PROGRESS );
Progress_SetRange( hwndProgress, 0, 101 );
Progress_SetPos( hwndProgress, 0 );
if( !CEditApp::getInstance()->m_pcGrepAgent->m_bGrepRunning ){
if( 3000 < nEditLines ){
/* �i���_�C�A���O�̕\�� */
pCDlgCancel = new CDlgCancel;
if( NULL != ( hwndCancel = pCDlgCancel->DoModeless( ::GetModuleHandle( NULL ), NULL, IDD_OPERATIONRUNNING ) ) ){
hwndProgress = ::GetDlgItem( hwndCancel, IDC_PROGRESS );
Progress_SetRange( hwndProgress, 0, 101 );
Progress_SetPos( hwndProgress, 0 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

重箱の隅ですみませんが、ここの行の先頭に半角スペースが1文字挟まってます。それ以外は LGTM です。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5b6c0c9 で修正しました。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ご対応ありがとうございます。
今更気づいてしまったのですが、この半角スペース混入、この PR 以前から存在していたものでしたね。お手数おかけしました。

}
}
}
int nProgressOld = 0;
Expand Down