Skip to content

Commit

Permalink
fix #3619
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderme committed Apr 26, 2024
1 parent c6f8f8e commit 119fead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qcodeedit/lib/document/qdocument.cpp
Expand Up @@ -5297,7 +5297,7 @@ bool QDocumentCursorHandle::movePosition(int count, int op, const QDocumentCurso
candidates.push(p);
}
if(p.role&QParenthesis::Close){
if(candidates.top().id == p.id && candidates.top().role&QParenthesis::Open){
if(!candidates.isEmpty() && candidates.top().id == p.id && candidates.top().role&QParenthesis::Open){
candidates.pop();
}else{
candidates.push(p);
Expand Down

0 comments on commit 119fead

Please sign in to comment.