diff --git a/NEWS.md b/NEWS.md
index b189007e..d92dc8c3 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -17,6 +17,7 @@ Red Panda C++ Version 2.8
- enhancement: Print current selection can be used in the print dialog.
- enhancement: Print syntax colored content.
- enhancement: Correctly handle tab in the exported RTF.
+ - change: Disable undo limit by default.
Red Panda C++ Version 2.7
diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp
index 8ecdc004..5cce39e6 100644
--- a/RedPandaIDE/editor.cpp
+++ b/RedPandaIDE/editor.cpp
@@ -2817,6 +2817,7 @@ void Editor::reparse(bool resetParser)
return;
if (!mParser->enabled())
return;
+
//mParser->setEnabled(pSettings->codeCompletion().enabled());
ParserLanguage language = mUseCppSyntax?ParserLanguage::CPlusPlus:ParserLanguage::C;
if (!inProject()) {
diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp
index 9d9db9b1..9b53da5d 100644
--- a/RedPandaIDE/settings.cpp
+++ b/RedPandaIDE/settings.cpp
@@ -1529,7 +1529,7 @@ void Settings::Editor::doLoad()
mDefaultEncoding = value("default_encoding", ENCODING_UTF8).toByteArray();
mAutoDetectFileEncoding = boolValue("auto_detect_file_encoding",true);
mUndoLimit = intValue("undo_limit",0);
- mUndoMemoryUsage = intValue("undo_memory_usage", 10);
+ mUndoMemoryUsage = intValue("undo_memory_usage", 0);
mAutoFormatWhenSaved = boolValue("auto_format_when_saved", false);
mRemoveTrailingSpacesWhenSaved = boolValue("remove_trailing_spaces_when_saved",false);
mParseTodos = boolValue("parse_todos",true);
diff --git a/RedPandaIDE/settingsdialog/environmentperformancewidget.cpp b/RedPandaIDE/settingsdialog/environmentperformancewidget.cpp
index 5cdfdcdc..576ed84c 100644
--- a/RedPandaIDE/settingsdialog/environmentperformancewidget.cpp
+++ b/RedPandaIDE/settingsdialog/environmentperformancewidget.cpp
@@ -33,26 +33,27 @@ EnvironmentPerformanceWidget::~EnvironmentPerformanceWidget()
void EnvironmentPerformanceWidget::doLoad()
{
ui->chkClearWhenEditorHidden->setChecked(pSettings->codeCompletion().clearWhenEditorHidden());
-#ifdef Q_OS_WIN
- MEMORYSTATUSEX statex;
+//#ifdef Q_OS_WIN
+// MEMORYSTATUSEX statex;
- statex.dwLength = sizeof (statex);
+// statex.dwLength = sizeof (statex);
- GlobalMemoryStatusEx (&statex);
- if (statex.ullTotalPhys < (long long int)2*1024*1024*1024) {
- ui->chkClearWhenEditorHidden->setEnabled(false);
- ui->chkClearWhenEditorHidden->setChecked(true);
- pSettings->codeCompletion().setClearWhenEditorHidden(true);
- pSettings->codeCompletion().save();
- }
- if (statex.ullTotalPhys < (long long int)1024*1024*1024) {
- ui->chkEditorsShareParser->setEnabled(false);
- ui->chkEditorsShareParser->setChecked(true);
- pSettings->codeCompletion().setShareParser(true);
- pSettings->codeCompletion().save();
- }
-#endif
+// GlobalMemoryStatusEx (&statex);
+// if (statex.ullTotalPhys < (long long int)2*1024*1024*1024) {
+// ui->chkClearWhenEditorHidden->setEnabled(false);
+// ui->chkClearWhenEditorHidden->setChecked(true);
+// pSettings->codeCompletion().setClearWhenEditorHidden(true);
+// pSettings->codeCompletion().save();
+// }
+// if (statex.ullTotalPhys < (long long int)1024*1024*1024) {
+// ui->chkEditorsShareParser->setEnabled(false);
+// ui->chkEditorsShareParser->setChecked(true);
+// pSettings->codeCompletion().setShareParser(true);
+// pSettings->codeCompletion().save();
+// }
+//#endif
ui->chkEditorsShareParser->setChecked(pSettings->codeCompletion().shareParser());
+ ui->spinMaxUndoMemory->setValue(pSettings->editor().undoMemoryUsage());
}
void EnvironmentPerformanceWidget::doSave()
@@ -61,4 +62,6 @@ void EnvironmentPerformanceWidget::doSave()
pSettings->codeCompletion().setShareParser(ui->chkEditorsShareParser->isChecked());
pSettings->codeCompletion().save();
+ pSettings->editor().setUndoMemoryUsage(ui->spinMaxUndoMemory->value());
+ pSettings->editor().save();
}
diff --git a/RedPandaIDE/settingsdialog/environmentperformancewidget.ui b/RedPandaIDE/settingsdialog/environmentperformancewidget.ui
index a838b646..81e455e3 100644
--- a/RedPandaIDE/settingsdialog/environmentperformancewidget.ui
+++ b/RedPandaIDE/settingsdialog/environmentperformancewidget.ui
@@ -13,25 +13,76 @@
Form
-
+
-
Reduce Memory Usage
-
-
-
+
+
-
+
+
+ Editors share one code parser
+
+
+
+ -
Auto clear parsed symbols when editor hidden
- -
-
-
- Editors share one code parser
-
+
-
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Max undo memory for each editor:
+
+
+
+ -
+
+
+ MB
+
+
+ 100
+
+
+ 0
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
diff --git a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
index 80c0f008..f212a42d 100644
--- a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
@@ -1819,6 +1819,14 @@
+
+
+
+
+
+
+ MB
+
EnvironmentProgramsWidget
@@ -4928,6 +4936,10 @@
+
+
+
+
NewClassDialog
diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
index 575da5df..8ee6ca60 100644
--- a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
@@ -1377,13 +1377,13 @@ Are you really want to continue?
失败
-
-
-
-
-
-
-
+
+
+
+
+
+
+
错误
@@ -1392,44 +1392,44 @@ Are you really want to continue?
无法写入文件"%1"
-
+
另存为
-
+
文件%1已经被打开!
-
+
要复制的内容超过了行数限制!
-
+
要复制的内容超过了字符数限制!
-
+
要剪切的内容超过了行数限制!
-
+
要剪切的内容超过了字符数限制!
-
+
打印文档
-
-
-
+
+
+
Ctrl+单击以获取更多信息
@@ -1438,27 +1438,27 @@ Are you really want to continue?
未找到符号'%1'!
-
+
找不到astyle程序
-
+
找不到astyle程序"%1".
-
+
断点条件
-
+
输入当前断点的生效条件:
-
+
只读
@@ -2457,12 +2457,22 @@ Are you really want to continue?
减少内存用量
-
+
自动清理被隐藏的编辑器中的符号表
-
+
+
+ 每个编辑窗口的撤销功能内存上限
+
+
+
+
+ MB
+
+
+
编辑器共享同一个代码分析器
@@ -4107,11 +4117,11 @@ Are you really want to continue?
-
-
-
-
-
+
+
+
+
+
编译器
@@ -4549,7 +4559,7 @@ Are you really want to continue?
-
+
新建试题集
@@ -4571,7 +4581,7 @@ Are you really want to continue?
-
+
保存试题集
@@ -4579,7 +4589,7 @@ Are you really want to continue?
-
+
载入试题集
@@ -4710,14 +4720,14 @@ Are you really want to continue?
-
+
导入FPS试题集
-
+
导出FPS试题集
@@ -4954,7 +4964,7 @@ Are you really want to continue?
-
+
删除所有断点
@@ -5206,7 +5216,7 @@ Are you really want to continue?
-
+
重命名符号
@@ -5227,13 +5237,13 @@ Are you really want to continue?
-
+
导出为RTF
-
+
导出为HTML
@@ -5606,22 +5616,22 @@ Are you really want to continue?
-
-
+
+
错误的编译器设置
-
-
+
+
编译器被设置为不生成可执行文件。
-
+
我们需要可执行文件来运行试题案例。
@@ -5687,7 +5697,7 @@ Are you really want to continue?
-
+
请在调试前改正设置。
@@ -5730,7 +5740,7 @@ Are you really want to continue?
-
+
批量设置案例
@@ -5745,22 +5755,22 @@ Are you really want to continue?
全部复制
-
+
跳转到行
-
+
行
-
+
模板已存在
-
+
模板%1已存在。是否覆盖?
@@ -5786,7 +5796,7 @@ Are you really want to continue?
-
+
试题集%1
@@ -5834,12 +5844,12 @@ Are you really want to continue?
试题属性...
-
+
设置试题集名称
-
+
试题集名称:
@@ -5859,16 +5869,16 @@ Are you really want to continue?
修改描述
-
-
-
+
+
+
书签描述
-
-
-
+
+
+
描述:
@@ -5892,12 +5902,12 @@ Are you really want to continue?
断点条件...
-
+
断点条件
-
+
输入当前断点的生效条件:
@@ -5919,18 +5929,18 @@ Are you really want to continue?
-
+
添加文件夹
-
-
+
+
新文件夹
-
+
文件夹:
@@ -6036,7 +6046,7 @@ Are you really want to continue?
-
+
新建文件夹
@@ -6047,9 +6057,9 @@ Are you really want to continue?
-
-
+
+
删除
@@ -6084,22 +6094,27 @@ Are you really want to continue?
转换为%1编码
-
+
+
+ 换行符
+
+
+
已自动保存%1个文件
-
+
设置答案源代码...
-
+
选择其他文件...
-
+
选择答案源代码文件
@@ -6108,17 +6123,17 @@ Are you really want to continue?
中止
-
+
FPS试题集文件(*.fps;*.xml)
-
+
FPS试题集文件(*.fps)
-
+
导出时出错
@@ -6128,7 +6143,7 @@ Are you really want to continue?
C/C++源代码文件 (*.c *.cpp *.cc *.cxx)
-
+
新建文件夹%1
@@ -6141,68 +6156,68 @@ Are you really want to continue?
无标题%1
-
+
你真的要删除%1吗?
-
+
你真的要删除%1个文件吗?
-
+
保存项目
-
+
项目'%1'有改动。
-
-
+
+
需要保存吗?
-
-
+
+
文件已发生变化
-
+
新建项目文件?
-
+
您是否要将新建的文件加入项目?
-
-
-
-
+
+
+
+
保存失败
-
+
改变项目编译器配置集
-
+
改变项目的编译器配置集会导致所有的自定义编译器选项被重置。
-
-
+
+
你真的想要那么做吗?
@@ -6211,12 +6226,12 @@ Are you really want to continue?
批量设置案例
-
+
选择输入数据文件
-
+
输入数据文件 (*.in)
@@ -6225,78 +6240,78 @@ Are you really want to continue?
无标题%1
-
+
修改监视表达式
-
+
监视表达式
-
+
您真的要清除该文件的所有断点吗?
-
+
新建项目
-
+
关闭'%1'以打开新项目?
-
+
文件夹不存在
-
+
文件夹'%1'不存在。是否创建?
-
+
无法创建文件夹
-
+
创建文件夹'%1'失败。
-
+
-
+
文件夹%1不是空的。
-
+
你真的要删除它吗?
-
+
改变工作文件夹
-
+
File '%1' is not in the current working folder
文件'%1'不在当前工作文件夹中。
-
+
是否将工作文件夹改设为'%1'?
@@ -6305,28 +6320,28 @@ Are you really want to continue?
正在删除试题...
-
+
无法提交
-
+
Git需要用信息进行提交。
-
+
选择输入数据文件
-
-
+
+
所有文件 (*.*)
-
+
Choose Expected Input Data File
选择期望输出文件
@@ -6338,59 +6353,59 @@ Are you really want to continue?
-
+
选择工作文件夹
-
-
+
+
头文件已存在
-
-
+
+
头文件"%1"已存在!
-
+
源文件已存在!
-
+
源文件"%1"已存在!
-
+
无法提交!
-
+
下列文件处于冲突状态,请解决后重新添加和提交:
-
+
提交信息
-
+
提交信息:
-
+
提交失败
-
+
提交信息不能为空!
@@ -6399,22 +6414,22 @@ Are you really want to continue?
小熊猫Dev-C++项目文件 (*.dev)
-
+
新建项目失败
-
+
无法使用模板创建项目
-
+
删除文件
-
+
同时从硬盘上删除文件?
@@ -6423,27 +6438,27 @@ Are you really want to continue?
无标题
-
+
新的项目文件名
-
+
文件名:
-
+
文件已存在!
-
+
文件'%1'已经存在!
-
+
添加到项目
@@ -6464,86 +6479,86 @@ Are you really want to continue?
请在工具栏中选择Debug编译器配置集,或者在“编译器配置集”设置的“编译/链接选项”页中<b>启用</b>“生成调试信息(-g3)”、<b>禁用</b>“剥除附件信息(-3)”。
-
+
C/C++源代码文件 (*.c *.cpp *.cc *.cxx)
-
+
本操作会删除此试题的所有案例。
-
+
小熊猫C++项目文件(*.dev)
-
+
重命名出错
-
+
符号'%1'在系统头文件中定义,无法修改。
-
+
新名称
-
-
+
+
替换出错
-
+
无法打开文件'%1'进行替换!
-
+
内容和上次查找时不一致。
-
+
RTF格式文件 (*.rtf)
-
+
HTML文件 (*.html)
-
+
当前的试题集不是空的。
-
+
试题%1
-
-
+
+
试题集文件 (*.pbs)
-
-
+
+
载入失败
-
-
+
+
试题案例%1
@@ -6557,13 +6572,13 @@ Are you really want to continue?
-
-
-
-
-
-
-
+
+
+
+
+
+
+
错误
@@ -6584,85 +6599,85 @@ Are you really want to continue?
清除历史
-
-
+
+
版本控制
-
+
磁盘文件'%1'已被修改。
-
+
是否重新读取它的内容?
-
+
磁盘文件'%1'已被删除。
-
+
是否保持它在小熊猫C++中打开的编辑窗口?
-
+
打开
-
+
编译失败
-
+
运行失败
-
-
-
+
+
+
确认转换
-
-
-
+
+
+
当前编辑器中的文件将会使用%1编码保存。<br />这项操作无法被撤回。<br />你确定要继续吗?
-
+
新监视表达式
-
+
输入监视表达式
-
+
(%1/%2)正在解析文件"%3"
-
+
完成%1个文件的解析,用时%2秒
-
+
(每秒%1个文件)
@@ -7590,22 +7605,22 @@ Are you really want to continue?
共%1个文件[%2个源程序文件,%3个头文件,%4个资源文件,%5个其他文件]
-
+
无法删除旧图标文件
-
+
无法删除旧图标文件'%1'
-
+
选择图标文件
-
+
图像文件 (*.ico *.png *.jpg)
@@ -9326,7 +9341,7 @@ Are you really want to continue?
-
+
@@ -9335,7 +9350,7 @@ Are you really want to continue?
-
+
@@ -9347,7 +9362,7 @@ Are you really want to continue?
自动链接
-
+
@@ -9424,15 +9439,15 @@ Are you really want to continue?
杂项
-
-
+
+
程序运行
-
+
试题集
diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
index a768d15d..49aa590b 100644
--- a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
@@ -1692,6 +1692,14 @@
+
+
+
+
+
+
+
+
EnvironmentProgramsWidget
@@ -4741,6 +4749,10 @@
+
+
+
+
NewClassDialog