diff --git a/NEWS.md b/NEWS.md
index cfa125b6..029c35d8 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -57,6 +57,7 @@ Red Panda C++ Version 2.27
- change: When debugging, don't auto set focus to the editor.
- enhancement: Folding button scales with editor font.
- fix: Should show header completion popup in #include line comments.
+ - fix: Custom compile options not correctly parsed.
Red Panda C++ Version 2.26
- enhancement: Code suggestion for embedded std::vectors.
diff --git a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
index ec75a814..617ea439 100644
--- a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts
@@ -555,7 +555,7 @@
[Nota]
-
+
Falha ao iniciar a compilação para '%1'.
@@ -590,7 +590,7 @@
-
+
@@ -1382,7 +1382,7 @@
-
+
@@ -1390,7 +1390,7 @@
Erro
-
+
Salvar como
@@ -1400,7 +1400,7 @@
Arquivo %1 já aberto!
-
+
O texto a ser copiado excede o limite do contador!
@@ -1425,7 +1425,7 @@
Imprimir documento
-
+
@@ -1457,13 +1457,13 @@
Apenas leitura
-
+
Erro ao carregar arquivo
-
+
@@ -1870,7 +1870,7 @@
-
+
Mostrar apenas fontes com espaçamento único
diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
index b8046486..f91cbdcc 100644
--- a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts
@@ -692,7 +692,7 @@ p, li { white-space: pre-wrap; }
警告:
-
+
无法写入文件“%1”。
@@ -1596,7 +1596,7 @@ p, li { white-space: pre-wrap; }
-
+
@@ -1608,7 +1608,7 @@ p, li { white-space: pre-wrap; }
无法写入文件"%1"
-
+
载入文件错误
@@ -1648,7 +1648,7 @@ p, li { white-space: pre-wrap; }
文件%1已经被打开!
-
+
要复制的内容超过了行数限制!
@@ -1683,7 +1683,7 @@ p, li { white-space: pre-wrap; }
打印文档
-
+
@@ -2120,7 +2120,7 @@ p, li { white-space: pre-wrap; }
选择字体
-
+
只显示等宽字体
@@ -6598,7 +6598,7 @@ p, li { white-space: pre-wrap; }
-
+ 行: %1/%2 列: %3 选中: %4
@@ -6608,7 +6608,7 @@ p, li { white-space: pre-wrap; }
-
+ 行: %1/%2 字符: %3/%4 选中: %5
diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
index 5c722779..d6841231 100644
--- a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
+++ b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts
@@ -456,7 +456,7 @@
-
+
@@ -491,7 +491,7 @@
-
+
@@ -1227,7 +1227,7 @@
-
+
@@ -1235,7 +1235,7 @@
-
+
@@ -1245,7 +1245,7 @@
-
+
@@ -1270,7 +1270,7 @@
-
+
@@ -1302,13 +1302,13 @@
-
+
-
+
@@ -1711,7 +1711,7 @@
-
+
diff --git a/libs/qsynedit/qsynedit/document.cpp b/libs/qsynedit/qsynedit/document.cpp
index 0df671a5..e1409a79 100644
--- a/libs/qsynedit/qsynedit/document.cpp
+++ b/libs/qsynedit/qsynedit/document.cpp
@@ -947,12 +947,16 @@ int Document::glyphLength(int line, int glyphIdx)
int Document::glyphStartPostion(int line, int glyphIdx)
{
QMutexLocker locker(&mMutex);
+ if (line<0 || line>=count())
+ return 0;
return mLines[line]->glyphStartPosition(glyphIdx);
}
int Document::glyphWidth(int line, int glyphIdx)
{
QMutexLocker locker(&mMutex);
+ if (line<0 || line>=count())
+ return 0;
return mLines[line]->glyphWidth(glyphIdx);
}