Fix detected language not being applied issue
Fix detected language not being applied if Default languge is set in Document settings. Don't override detected file type with default language: When loading files with no extension from disk, remove the extra condition so the default language setting does not take precedence over the auto-detected file type (if any) Fix #11504, close #11992
This commit is contained in:
parent
851900334c
commit
6263ce5dec
|
@ -742,7 +742,7 @@ BufferID FileManager::loadFile(const TCHAR* filename, Document doc, int encoding
|
|||
buf->setEncoding(-1);
|
||||
|
||||
// if no file extension, and the language has been detected, we use the detected value
|
||||
if (!newBuf->_isLargeFile && ((buf->getLangType() == L_TEXT) && (loadedFileFormat._language != L_TEXT)))
|
||||
if (!newBuf->_isLargeFile && loadedFileFormat._language != L_TEXT)
|
||||
buf->setLangType(loadedFileFormat._language);
|
||||
|
||||
setLoadedBufferEncodingAndEol(buf, UnicodeConvertor, loadedFileFormat._encoding, loadedFileFormat._eolFormat);
|
||||
|
|
Loading…
Reference in New Issue