Skip to content

Commit 2899170

Browse files
author
Olafur Pall Geirsson
committed
Don't move worksheet decoration when adding new line
Previously, when using worksheets, the evaluated code would move to the next line when adding a new line. Now, the evaluated code stays on the original line.
1 parent 7577342 commit 2899170

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

vscode-dotty/src/worksheet.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ class Worksheet implements Disposable {
194194
private createDecoration(margin: number, text: string) {
195195
return vscode.window.createTextEditorDecorationType({
196196
isWholeLine: true,
197+
rangeBehavior: vscode.DecorationRangeBehavior.OpenClosed,
197198
after: {
198199
contentText: text,
199200
margin: `0px 0px 0px ${margin}ch`,

0 commit comments

Comments
 (0)