Skip to content

Unnecessary code and decoration with :after prevents dnd #80666

@usernamehw

Description

@usernamehw

Issue Type: Bug

  1. Have unused variable in the first line of the file const asdf = 0; (any line tbh, just an example)
  2. Create decoration on the same line with the after property specified
const decorationType = vscode.window.createTextEditorDecorationType({
	isWholeLine: true,
});
const decorationOptions: vscode.DecorationOptions = {
	range: new vscode.Range(0, 0, 0, 0),
	renderOptions: {
		after: {
			contentText: 'random',
		},
	},
};
editor.setDecorations(decorationType, [decorationOptions]);
  1. Try to drag-n-drop text to that line

If I reference that variable (remove unused status) - then dnd works fine again.

VS Code version: Code - Insiders 1.39.0-insider (55825e9, 2019-09-10T05:25:22.729Z)
OS version: Windows_NT x64 10.0.18362

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-drag-and-dropEditor UI drag-and-drop operationsinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions