mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-25 23:05:13 +02:00
Fix syntax hiliting err while switch lang on untitled doc regression
The regression was introduced by commit b2152d983e3b20aed7f687ba1d9e916ae6065b24 Fix #16250, close #16254
This commit is contained in:
parent
99d3f86d8b
commit
ba3b955a45
@ -1721,7 +1721,7 @@ void ScintillaEditView::setLanguage(LangType langType)
|
||||
{
|
||||
unsigned long MODEVENTMASK_ON = NppParameters::getInstance().getScintillaModEventMask();
|
||||
|
||||
if (_currentBuffer->getLastLangType() > 0)
|
||||
if (_currentBuffer->getLastLangType() > 0 && !_currentBuffer->isUntitled())
|
||||
{
|
||||
saveCurrentPos();
|
||||
Document prev = execute(SCI_GETDOCPOINTER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user