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() void SynEditUndoList::ensureMaxEntries()
{ {
if (mItems.count() > mMaxUndoActions){ if (mMaxUndoActions>0 && mItems.count() > mMaxUndoActions){
mFullUndoImposible = true; mFullUndoImposible = true;
while (mItems.count() > mMaxUndoActions) { while (mItems.count() > mMaxUndoActions) {
//remove all undo item in block //remove all undo item in block

View File

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

View File

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