Disable Word Wrap while load a 2GB+ file
This commit is contained in:
parent
2132505cba
commit
edabe44000
|
@ -1384,15 +1384,21 @@ bool FileManager::loadFileData(Document doc, int64_t fileSize, const TCHAR * fil
|
||||||
}
|
}
|
||||||
else // x64
|
else // x64
|
||||||
{
|
{
|
||||||
|
|
||||||
int res = pNativeSpeaker->messageBox("WantToOpenHugeFile",
|
int res = pNativeSpeaker->messageBox("WantToOpenHugeFile",
|
||||||
_pNotepadPlus->_pEditView->getHSelf(),
|
_pNotepadPlus->_pEditView->getHSelf(),
|
||||||
TEXT("Opening a huge file of 2GB+ could take several minutes.\nDo you want to open it?"),
|
TEXT("Opening a huge file of 2GB+ could take several minutes.\nDo you want to open it?\n(Due to the performance issue, the Word Wrap feature will be disabled if it's ON)"),
|
||||||
TEXT("Opening huge file warning"),
|
TEXT("Opening huge file warning"),
|
||||||
MB_YESNO | MB_APPLMODAL);
|
MB_YESNO | MB_APPLMODAL);
|
||||||
|
|
||||||
if (res == IDYES)
|
if (res == IDYES)
|
||||||
{
|
{
|
||||||
// Do nothing, continue the loading
|
// Due to the performance issue, the Word Wrap feature will be disabled if it's ON
|
||||||
|
bool isWrap = _pNotepadPlus->_pEditView->isWrap();
|
||||||
|
if (isWrap)
|
||||||
|
{
|
||||||
|
_pNotepadPlus->command(IDM_VIEW_WRAP);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue