diff --git a/NEWS.md b/NEWS.md index d0c43878..b01a5cc9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,7 @@ Red Panda C++ Version 2.23 - enhancement: improve pointer calculation when inferencing type info - enhancement: improve parsing for multiple vars defined in one line - enhancement: improve parsing result for function parameters like 'Node (&node)[10]' + - fix: Can't copy by ctrl+dray&drop to current selection's begin/end Red Panda C++ Version 2.22 diff --git a/libs/qsynedit/qsynedit/qsynedit.cpp b/libs/qsynedit/qsynedit/qsynedit.cpp index 82d7c359..22bb41b2 100644 --- a/libs/qsynedit/qsynedit/qsynedit.cpp +++ b/libs/qsynedit/qsynedit/qsynedit.cpp @@ -6386,7 +6386,13 @@ void QSynEdit::dropEvent(QDropEvent *event) BufferCoord coord = displayToBufferPos(pixelsToNearestRowColumn(event->pos().x(), event->pos().y())); - if (coord>=mDragSelBeginSave && coord<=mDragSelEndSave) { + if ( + (event->proposedAction() == Qt::DropAction::CopyAction + && coord>mDragSelBeginSave && coordproposedAction() != Qt::DropAction::CopyAction + && coord>=mDragSelBeginSave && coord<=mDragSelEndSave) + ) { mDocument->deleteAt(mDocument->count()-1); //do nothing if drag onto itself event->acceptProposedAction();