Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson committed Nov 19, 2023
1 parent 719a76c commit a37c7b0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/cursorless-engine/src/actions/JoinLines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function getEdits(editor: TextEditor, contentRanges: Range[]): Edit[] {
nextLine.range.start.line,
nextLine.firstNonWhitespaceCharacterIndex,
),
text: " ",
text: nextLine.isEmptyOrWhitespace ? "" : " ",
isReplace: true,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
languageId: plaintext
command:
version: 6
spokenForm: join this
action:
name: joinLines
target:
type: primitive
mark: {type: cursor}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
aaa
bbb
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: |-
aaa
bbb
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
thatMark:
- type: UntypedTarget
contentRange:
start: {line: 0, character: 0}
end: {line: 0, character: 3}
isReversed: false
hasExplicitRange: true

0 comments on commit a37c7b0

Please sign in to comment.