diff --git a/RedPandaIDE/qsynedit/TextBuffer.cpp b/RedPandaIDE/qsynedit/TextBuffer.cpp
index b21297b4..43befbf1 100644
--- a/RedPandaIDE/qsynedit/TextBuffer.cpp
+++ b/RedPandaIDE/qsynedit/TextBuffer.cpp
@@ -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
diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp
index 14d73773..e6b1a642 100644
--- a/RedPandaIDE/settings.cpp
+++ b/RedPandaIDE/settings.cpp
@@ -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
diff --git a/RedPandaIDE/settingsdialog/editormiscwidget.ui b/RedPandaIDE/settingsdialog/editormiscwidget.ui
index 76b6a062..c63dd2db 100644
--- a/RedPandaIDE/settingsdialog/editormiscwidget.ui
+++ b/RedPandaIDE/settingsdialog/editormiscwidget.ui
@@ -60,7 +60,7 @@
-
- 100
+ 0
1000000000
@@ -68,6 +68,9 @@
50
+
+ 10000
+
-