mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 21:34:58 +02:00
[NEW_FEATURE] Automatic Backup System (in progress).
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1210 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
4a794ac8b1
commit
9b341806ae
@ -4270,52 +4270,32 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session, bool /*includUntitle
|
|||||||
|
|
||||||
Buffer * buf = MainFileManager->getBufferByID(bufID);
|
Buffer * buf = MainFileManager->getBufferByID(bufID);
|
||||||
|
|
||||||
if (!buf->isUntitled())
|
if (PathFileExists(buf->getFullPathName()))
|
||||||
{
|
{
|
||||||
// if the file doesn't exist, it could be redirected
|
generic_string languageName = getLangFromMenu(buf);
|
||||||
// So we turn Wow64 off
|
const TCHAR *langName = languageName.c_str();
|
||||||
bool isWow64Off = false;
|
sessionFileInfo sfi(buf->getFullPathName(), langName, buf->getEncoding(), buf->getPosition(editView), buf->getBackupFileName().c_str(), int(buf->getLastModifiedTimestamp()));
|
||||||
NppParameters *pNppParam = NppParameters::getInstance();
|
|
||||||
if (!PathFileExists(buf->getFullPathName()))
|
_invisibleEditView.execute(SCI_SETDOCPOINTER, 0, buf->getDocument());
|
||||||
|
int maxLine = _invisibleEditView.execute(SCI_GETLINECOUNT);
|
||||||
|
|
||||||
|
for (int j = 0 ; j < maxLine ; ++j)
|
||||||
{
|
{
|
||||||
pNppParam->safeWow64EnableWow64FsRedirection(FALSE);
|
if ((_invisibleEditView.execute(SCI_MARKERGET, j)&(1 << MARK_BOOKMARK)) != 0)
|
||||||
isWow64Off = true;
|
{
|
||||||
|
sfi.marks.push_back(j);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PathFileExists(buf->getFullPathName()))
|
if (i == activeIndex)
|
||||||
{
|
{
|
||||||
generic_string languageName = getLangFromMenu(buf);
|
editView->getCurrentFoldStates(sfi._foldStates);
|
||||||
const TCHAR *langName = languageName.c_str();
|
|
||||||
sessionFileInfo sfi(buf->getFullPathName(), langName, buf->getEncoding(), buf->getPosition(editView), buf->getBackupFileName().c_str(), int(buf->getLastModifiedTimestamp()));
|
|
||||||
|
|
||||||
_invisibleEditView.execute(SCI_SETDOCPOINTER, 0, buf->getDocument());
|
|
||||||
int maxLine = _invisibleEditView.execute(SCI_GETLINECOUNT);
|
|
||||||
|
|
||||||
for (int j = 0 ; j < maxLine ; ++j)
|
|
||||||
{
|
|
||||||
if ((_invisibleEditView.execute(SCI_MARKERGET, j)&(1 << MARK_BOOKMARK)) != 0)
|
|
||||||
{
|
|
||||||
sfi.marks.push_back(j);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == activeIndex)
|
|
||||||
{
|
|
||||||
editView->getCurrentFoldStates(sfi._foldStates);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sfi._foldStates = buf->getHeaderLineState(editView);
|
|
||||||
}
|
|
||||||
viewFiles->push_back(sfi);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// We enable Wow64 system, if it was disabled
|
|
||||||
if (isWow64Off)
|
|
||||||
{
|
{
|
||||||
pNppParam->safeWow64EnableWow64FsRedirection(TRUE);
|
sfi._foldStates = buf->getHeaderLineState(editView);
|
||||||
isWow64Off = false;
|
|
||||||
}
|
}
|
||||||
|
viewFiles->push_back(sfi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user