Fix issue with case sensitive files

Fix #14724, close #14971
pull/15029/head
Davi Feliciano Nonnenmacher 8 months ago committed by Don Ho
parent 3c06d89b2a
commit 2531b4d12c

@ -1795,7 +1795,7 @@ BufferID FileManager::getBufferFromName(const TCHAR* name)
{ {
for (auto buf : _buffers) for (auto buf : _buffers)
{ {
if (OrdinalIgnoreCaseCompareStrings(name, buf->getFullPathName()) == 0) if (wcscmp(name, buf->getFullPathName()) == 0)
{ {
if (!(buf->_referees.empty()) && buf->_referees[0]->isVisible()) if (!(buf->_referees.empty()) && buf->_referees[0]->isVisible())
{ {

@ -95,7 +95,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 (OrdinalIgnoreCaseCompareStrings(fullfilename, buf->getFullPathName()) == 0) if (wcscmp(fullfilename, buf->getFullPathName()) == 0)
{ {
return id; return id;
} }

Loading…
Cancel
Save