Applying language by using file extension as 1st indicator.
Applying language by using file extension as 1st indicator instead of detection via file content.pull/1001/head
parent
981ee5ed72
commit
34307173fb
|
@ -621,9 +621,8 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc, int encodin
|
|||
buf->setUnicodeMode(ndds._unicodeMode);
|
||||
buf->setEncoding(-1);
|
||||
|
||||
// if a language has been detected, and the detected value is different from the file extension,
|
||||
// we use the detected value
|
||||
if (detectedLang != L_TEXT && detectedLang != buf->getLangType())
|
||||
// if no file extension, and the language has been detected, we use the detected value
|
||||
if ((buf->getLangType() == L_TEXT) && (detectedLang != L_TEXT))
|
||||
buf->setLangType(detectedLang);
|
||||
|
||||
if (encoding == -1)
|
||||
|
|
Loading…
Reference in New Issue