summaryrefslogtreecommitdiff
path: root/starmath/source/parse.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source/parse.cxx')
-rw-r--r--starmath/source/parse.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index e5325919f125..aa3a66f09d6e 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1072,7 +1072,11 @@ void SmParser::Line()
//this is to avoid a formula tree without any caret
//positions, in visual formula editor.
if(ExpressionArray.empty())
- ExpressionArray.push_back(new SmExpressionNode(m_aCurToken));
+ {
+ SmToken aTok = SmToken();
+ aTok.eType = TNEWLINE;
+ ExpressionArray.push_back(new SmExpressionNode(aTok));
+ }
SmStructureNode *pSNode = new SmLineNode(m_aCurToken);
pSNode->SetSubNodes(ExpressionArray);