From 011aa960fb2400526c61299d8df89876be329cec Mon Sep 17 00:00:00 2001 From: Don HO Date: Sun, 17 Feb 2019 20:13:04 +0100 Subject: [PATCH] Fix a regression on c4ff9f76a35775b865c01e3ec7142bf222c2d95a Fix a regression on https://github.com/notepad-plus-plus/notepad-plus-plus/commit/c4ff9f76a35775b865c01e3ec7142bf222c2d95a --- PowerEditor/src/NppIO.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index 0c4fa933..67d19512 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -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)