Fix line ending changes are not detected in reloaded changed files issue
Fixes #4033, closes #4043
This commit is contained in:
parent
e0c4011982
commit
46d0f12c3e
@ -648,7 +648,7 @@ bool FileManager::reloadBuffer(BufferID id)
|
|||||||
buf->_canNotify = false; //disable notify during file load, we dont want dirty to be triggered
|
buf->_canNotify = false; //disable notify during file load, we dont want dirty to be triggered
|
||||||
int encoding = buf->getEncoding();
|
int encoding = buf->getEncoding();
|
||||||
char data[blockSize + 8]; // +8 for incomplete multibyte char
|
char data[blockSize + 8]; // +8 for incomplete multibyte char
|
||||||
EolType bkformat;
|
EolType bkformat = EolType::unknown;
|
||||||
LangType lang = buf->getLangType();
|
LangType lang = buf->getLangType();
|
||||||
|
|
||||||
|
|
||||||
@ -669,6 +669,10 @@ bool FileManager::reloadBuffer(BufferID id)
|
|||||||
buf->setEncoding(encoding);
|
buf->setEncoding(encoding);
|
||||||
buf->setUnicodeMode(uniCookie);
|
buf->setUnicodeMode(uniCookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Since the buffer will be reloaded from the disk, EOL might have been changed
|
||||||
|
if (bkformat != EolType::unknown)
|
||||||
|
buf->setEolFormat(bkformat);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user