mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-04-08 17:15:37 +02:00
Fix a regression on c4ff9f76a35775b865c01e3ec7142bf222c2d95a
Fix a regression on c4ff9f76a3
This commit is contained in:
parent
3546268c23
commit
011aa960fb
@ -155,25 +155,9 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
||||
{
|
||||
wcscpy_s(longFileName, fileName.c_str());
|
||||
}
|
||||
|
||||
|
||||
_lastRecentFileList.remove(longFileName);
|
||||
|
||||
generic_string fileName2Find;
|
||||
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());
|
||||
BufferID test = MainFileManager->getBufferFromName(longFileName);
|
||||
if (test != BUFFER_INVALID && !isSnapshotMode)
|
||||
{
|
||||
if (_pTrayIco)
|
||||
|
Loading…
x
Reference in New Issue
Block a user