mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-28 16:24:27 +02:00
Revert "Fix detected language not being applied issue"
This reverts commit 6263ce5dece595543bbfaa4207391075ae3a212a for fixing the regression. Fix #12226, fix #12253
This commit is contained in:
parent
23fc940a27
commit
af0bc2e113
@ -742,7 +742,7 @@ BufferID FileManager::loadFile(const TCHAR* filename, Document doc, int encoding
|
|||||||
buf->setEncoding(-1);
|
buf->setEncoding(-1);
|
||||||
|
|
||||||
// if no file extension, and the language has been detected, we use the detected value
|
// if no file extension, and the language has been detected, we use the detected value
|
||||||
if (!newBuf->_isLargeFile && loadedFileFormat._language != L_TEXT)
|
if (!newBuf->_isLargeFile && ((buf->getLangType() == L_TEXT) && (loadedFileFormat._language != L_TEXT)))
|
||||||
buf->setLangType(loadedFileFormat._language);
|
buf->setLangType(loadedFileFormat._language);
|
||||||
|
|
||||||
setLoadedBufferEncodingAndEol(buf, UnicodeConvertor, loadedFileFormat._encoding, loadedFileFormat._eolFormat);
|
setLoadedBufferEncodingAndEol(buf, UnicodeConvertor, loadedFileFormat._encoding, loadedFileFormat._eolFormat);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user