From 0fdac532b24d869323b3256081cc65e1cc513346 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Thu, 23 Mar 2023 17:04:23 +0800 Subject: [PATCH] - fix: Crash when drag the selection beyond the end of the document. --- libs/qsynedit/qsynedit/qsynedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 2485367c..4beed12c 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -6352,7 +6352,7 @@ void QSynEdit::dropEvent(QDropEvent *event) mDropped = true; return; } - if (coord.line<=0 || coord.line>=mDocument->lengthOfLongestLine()) { + if (coord.line<=0 || coord.line>=mDocument->count()) { //do nothing if drag out of range event->acceptProposedAction(); mDropped = true;