mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 13:54:54 +02:00
Fix same file opened 2 times with different sensitive case of path regression
The regression is due to PR #14971 & commit 2531b4d12c4eddc6c0a519eb37c6edf25196619e ref: https://community.notepad-plus-plus.org/topic/25742/notepad-v8-6-6-release-candidate/3?_=1714876196550
This commit is contained in:
parent
2d076b645a
commit
3609a21258
@ -1795,7 +1795,7 @@ BufferID FileManager::getBufferFromName(const TCHAR* name)
|
|||||||
{
|
{
|
||||||
for (auto buf : _buffers)
|
for (auto buf : _buffers)
|
||||||
{
|
{
|
||||||
if (wcscmp(name, buf->getFullPathName()) == 0)
|
if (wcsicmp(name, buf->getFullPathName()) == 0)
|
||||||
{
|
{
|
||||||
if (!(buf->_referees.empty()) && buf->_referees[0]->isVisible())
|
if (!(buf->_referees.empty()) && buf->_referees[0]->isVisible())
|
||||||
{
|
{
|
||||||
|
@ -130,7 +130,7 @@ BufferID DocTabView::findBufferByName(const TCHAR * fullfilename) //-1 if not fo
|
|||||||
::SendMessage(_hSelf, TCM_GETITEM, i, reinterpret_cast<LPARAM>(&tie));
|
::SendMessage(_hSelf, TCM_GETITEM, i, reinterpret_cast<LPARAM>(&tie));
|
||||||
BufferID id = reinterpret_cast<BufferID>(tie.lParam);
|
BufferID id = reinterpret_cast<BufferID>(tie.lParam);
|
||||||
Buffer * buf = MainFileManager.getBufferByID(id);
|
Buffer * buf = MainFileManager.getBufferByID(id);
|
||||||
if (wcscmp(fullfilename, buf->getFullPathName()) == 0)
|
if (wcsicmp(fullfilename, buf->getFullPathName()) == 0)
|
||||||
{
|
{
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user