File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
packages/cursorless-engine/src/actions Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -91,13 +91,14 @@ abstract class BringMoveSwap {
9191 } else {
9292 text = source . contentText ;
9393 }
94+
95+ // Add destination edit
9496 destinationEdit = {
9597 edit : destination . constructChangeEdit ( text ) ,
9698 editor : destination . editor ,
9799 originalTarget : destination . target ,
98100 isSource : false ,
99101 } ;
100- // Add destination edit
101102 results . push ( destinationEdit ) ;
102103 } else {
103104 destination = destinations [ 0 ] ;
@@ -108,12 +109,14 @@ abstract class BringMoveSwap {
108109 if ( ! usedSources . includes ( source ) ) {
109110 // Allow move where the destination contains the source. eg "bring token to line"
110111 if (
112+ this . type !== "move" ||
111113 destinationEdit == null ||
112114 destinationEdit . editor . id !== source . editor . id ||
113115 ! destinationEdit . edit . range . contains ( source . contentRange )
114116 ) {
115117 usedSources . push ( source ) ;
116118 }
119+
117120 if ( this . type === "bring" ) {
118121 results . push ( {
119122 edit : source
You can’t perform that action at this time.
0 commit comments