|
|
@ -497,9 +497,6 @@ void FileManager::init(Notepad_plus * pNotepadPlus, ScintillaEditView * pscratch
|
|
|
|
_pscratchTilla->execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information
|
|
|
|
_pscratchTilla->execute(SCI_SETUNDOCOLLECTION, false); //dont store any undo information
|
|
|
|
_scratchDocDefault = (Document)_pscratchTilla->execute(SCI_GETDOCPOINTER);
|
|
|
|
_scratchDocDefault = (Document)_pscratchTilla->execute(SCI_GETDOCPOINTER);
|
|
|
|
_pscratchTilla->execute(SCI_ADDREFDOCUMENT, 0, _scratchDocDefault);
|
|
|
|
_pscratchTilla->execute(SCI_ADDREFDOCUMENT, 0, _scratchDocDefault);
|
|
|
|
|
|
|
|
|
|
|
|
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
|
|
|
|
|
|
|
|
_untitled_str = pNativeSpeaker->getLocalizedStrFromID("tab-untitled-string", UNTITLED_STR);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FileManager::checkFilesystemChanges(bool bCheckOnlyCurrentBuffer)
|
|
|
|
void FileManager::checkFilesystemChanges(bool bCheckOnlyCurrentBuffer)
|
|
|
@ -1087,7 +1084,8 @@ size_t FileManager::nextUntitledNewNumber() const
|
|
|
|
// if untitled document is invisible, then don't put its number into array (so its number is available to be used)
|
|
|
|
// if untitled document is invisible, then don't put its number into array (so its number is available to be used)
|
|
|
|
if ((buf->_referees[0])->isVisible())
|
|
|
|
if ((buf->_referees[0])->isVisible())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TCHAR *numberStr = buf->_fileName + _untitled_str.length();
|
|
|
|
generic_string newTitle = ((NppParameters::getInstance()).getNativeLangSpeaker())->getLocalizedStrFromID("tab-untitled-string", UNTITLED_STR);
|
|
|
|
|
|
|
|
TCHAR *numberStr = buf->_fileName + newTitle.length();
|
|
|
|
int usedNumber = generic_atoi(numberStr);
|
|
|
|
int usedNumber = generic_atoi(numberStr);
|
|
|
|
usedNumbers.push_back(usedNumber);
|
|
|
|
usedNumbers.push_back(usedNumber);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1123,7 +1121,8 @@ size_t FileManager::nextUntitledNewNumber() const
|
|
|
|
|
|
|
|
|
|
|
|
BufferID FileManager::newEmptyDocument()
|
|
|
|
BufferID FileManager::newEmptyDocument()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
generic_string newTitle = _untitled_str;
|
|
|
|
generic_string newTitle = ((NppParameters::getInstance()).getNativeLangSpeaker())->getLocalizedStrFromID("tab-untitled-string", UNTITLED_STR);
|
|
|
|
|
|
|
|
|
|
|
|
TCHAR nb[10];
|
|
|
|
TCHAR nb[10];
|
|
|
|
wsprintf(nb, TEXT("%d"), nextUntitledNewNumber());
|
|
|
|
wsprintf(nb, TEXT("%d"), nextUntitledNewNumber());
|
|
|
|
newTitle += nb;
|
|
|
|
newTitle += nb;
|
|
|
@ -1140,7 +1139,7 @@ BufferID FileManager::newEmptyDocument()
|
|
|
|
|
|
|
|
|
|
|
|
BufferID FileManager::bufferFromDocument(Document doc, bool dontIncrease, bool dontRef)
|
|
|
|
BufferID FileManager::bufferFromDocument(Document doc, bool dontIncrease, bool dontRef)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
generic_string newTitle = _untitled_str;
|
|
|
|
generic_string newTitle = ((NppParameters::getInstance()).getNativeLangSpeaker())->getLocalizedStrFromID("tab-untitled-string", UNTITLED_STR);
|
|
|
|
TCHAR nb[10];
|
|
|
|
TCHAR nb[10];
|
|
|
|
wsprintf(nb, TEXT("%d"), nextUntitledNewNumber());
|
|
|
|
wsprintf(nb, TEXT("%d"), nextUntitledNewNumber());
|
|
|
|
newTitle += nb;
|
|
|
|
newTitle += nb;
|
|
|
|