ScitillaComponent: Buffer: fixed an uninitialized variable in ctor

The non-default constructor of the class Buffer calls the inner method
`checkFileState()`, using the private variable `_currentStatus` to determine
whether some checks on the file attached to the buffer are required or not.
However this variable is properly initialized _after_.
This commit is contained in:
milipili 2015-05-30 02:26:55 +02:00
parent 7fec9fa070
commit 0ce219566a

View File

@ -60,10 +60,11 @@ Buffer::Buffer(FileManager * pManager, BufferID id, Document doc, DocFileStatus
_userLangExt = TEXT(""); _userLangExt = TEXT("");
_fullPathName = TEXT(""); _fullPathName = TEXT("");
_fileName = NULL; _fileName = NULL;
_currentStatus = type;
setFileName(fileName, ndds._lang); setFileName(fileName, ndds._lang);
updateTimeStamp(); updateTimeStamp();
checkFileState(); checkFileState();
_currentStatus = type;
_isDirty = false; _isDirty = false;
_needLexer = false; //new buffers do not need lexing, Scintilla takes care of that _needLexer = false; //new buffers do not need lexing, Scintilla takes care of that