parent
3546268c23
commit
011aa960fb
@ -155,25 +155,9 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
|||||||
{
|
{
|
||||||
wcscpy_s(longFileName, fileName.c_str());
|
wcscpy_s(longFileName, fileName.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_lastRecentFileList.remove(longFileName);
|
_lastRecentFileList.remove(longFileName);
|
||||||
|
|
||||||
generic_string fileName2Find;
|
BufferID test = MainFileManager->getBufferFromName(longFileName);
|
||||||
generic_string gs_fileName{fileName};
|
|
||||||
size_t res = gs_fileName.find_first_of(UNTITLED_STR);
|
|
||||||
|
|
||||||
if (res != string::npos && res == 0) // it can happen when a document named "new #", which is dragged from another instance, is dropped into this instance
|
|
||||||
{
|
|
||||||
// it's meaningless to show empty "new #" document, so just return null
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fileName2Find = longFileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferID test = MainFileManager->getBufferFromName(fileName2Find.c_str());
|
|
||||||
if (test != BUFFER_INVALID && !isSnapshotMode)
|
if (test != BUFFER_INVALID && !isSnapshotMode)
|
||||||
{
|
{
|
||||||
if (_pTrayIco)
|
if (_pTrayIco)
|
||||||
|
Loading…
Reference in New Issue
Block a user