diff --git a/src/actions/BringMoveSwap.ts b/src/actions/BringMoveSwap.ts index 462d8d5c1..f72f84255 100644 --- a/src/actions/BringMoveSwap.ts +++ b/src/actions/BringMoveSwap.ts @@ -50,7 +50,7 @@ class BringMoveSwap implements Action { getSourceRangeCallback = getContentRange; } else if (this.type === "move") { sourceStyle = this.graph.editStyles.pendingDelete; - getSourceRangeCallback = getRemovalRange; + getSourceRangeCallback = getRemovalHighlightRange; } // NB this.type === "swap" else { @@ -282,6 +282,6 @@ export class Swap extends BringMoveSwap { } } -function getRemovalRange(target: Target) { - return target.getRemovalRange(); +function getRemovalHighlightRange(target: Target) { + return target.getRemovalHighlightRange(); } diff --git a/src/test/suite/fixtures/recorded/decorations/moveLineAir.yml b/src/test/suite/fixtures/recorded/decorations/moveLineAir.yml new file mode 100644 index 000000000..0aaff9b7c --- /dev/null +++ b/src/test/suite/fixtures/recorded/decorations/moveLineAir.yml @@ -0,0 +1,53 @@ +languageId: plaintext +command: + spokenForm: move line air + version: 2 + targets: + - type: primitive + mark: {type: decoratedSymbol, symbolColor: default, character: a} + modifiers: + - type: containingScope + scopeType: {type: line} + - {type: primitive, isImplicit: true} + usePrePhraseSnapshot: true + action: {name: moveToTarget} +initialState: + documentContents: | + a a a + b b b + c c c + selections: + - anchor: {line: 3, character: 0} + active: {line: 3, character: 0} + marks: + default.a: + start: {line: 0, character: 0} + end: {line: 0, character: 1} +finalState: + documentContents: |- + b b b + c c c + a a a + selections: + - anchor: {line: 2, character: 5} + active: {line: 2, character: 5} + thatMark: + - anchor: {line: 2, character: 0} + active: {line: 2, character: 5} + sourceMark: + - anchor: {line: 0, character: 0} + active: {line: 0, character: 0} +decorations: + - name: pendingDeleteBackground + type: line + start: {line: 0, character: 0} + end: {line: 0, character: 5} + - name: pendingModification0Background + type: token + start: {line: 3, character: 0} + end: {line: 3, character: 0} + - name: pendingModification0Background + type: token + start: {line: 2, character: 0} + end: {line: 2, character: 5} +fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: a}, modifiers: [{type: containingScope, scopeType: {type: line}}]}, {type: primitive, mark: {type: cursor}, modifiers: [{type: toRawSelection}]}]