Fix folding state lost on the next starup issue
Any setting other than the default setting "for new opened document - UTF8 apply to opened ansi files" will cause C/C++ and other some languages (not for xml though) folding lost on startup. Fix #4103
This commit is contained in:
parent
3de506bf48
commit
a09c0a17db
@ -1946,14 +1946,15 @@ void ScintillaEditView::activateBuffer(BufferID buffer)
|
||||
restyleBuffer();
|
||||
}
|
||||
|
||||
// Everything should be updated, but the language
|
||||
bufferUpdated(_currentBuffer, (BufferChangeMask & ~BufferChangeLanguage));
|
||||
|
||||
// restore the collapsed info
|
||||
const std::vector<size_t> & lineStateVectorNew = newBuf->getHeaderLineState(this);
|
||||
syncFoldStateWith(lineStateVectorNew);
|
||||
|
||||
restoreCurrentPosPreStep();
|
||||
|
||||
bufferUpdated(_currentBuffer, (BufferChangeMask & ~BufferChangeLanguage)); //everything should be updated, but the language (which undoes some operations done here like folding)
|
||||
|
||||
//setup line number margin
|
||||
int numLines = static_cast<int32_t>(execute(SCI_GETLINECOUNT));
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// This file is part of Notepad++ project
|
||||
// Copyright (C)2003 Don HO <don.h@free.fr>
|
||||
// Copyright (C)2020 Don HO <don.h@free.fr>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
|
Loading…
Reference in New Issue
Block a user