disable undo limit by default

This commit is contained in:
Roy Qu 2022-05-19 13:19:47 +08:00
parent 3090fab089
commit 106bf4281a
3 changed files with 6 additions and 3 deletions

View File

@ -1098,7 +1098,7 @@ bool SynEditUndoList::fullUndoImposible() const
void SynEditUndoList::ensureMaxEntries()
{
if (mItems.count() > mMaxUndoActions){
if (mMaxUndoActions>0 && mItems.count() > mMaxUndoActions){
mFullUndoImposible = true;
while (mItems.count() > mMaxUndoActions) {
//remove all undo item in block

View File

@ -1348,7 +1348,7 @@ void Settings::Editor::doLoad()
else
mDefaultEncoding = value("default_encoding", ENCODING_UTF8).toByteArray();
mAutoDetectFileEncoding = boolValue("auto_detect_file_encoding",true);
mUndoLimit = intValue("undo_limit",1000);
mUndoLimit = intValue("undo_limit",0);
//tooltips

View File

@ -60,7 +60,7 @@
<item>
<widget class="QSpinBox" name="spinMaxUndo">
<property name="minimum">
<number>100</number>
<number>0</number>
</property>
<property name="maximum">
<number>1000000000</number>
@ -68,6 +68,9 @@
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>10000</number>
</property>
</widget>
</item>
<item>