Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registered decorations onRender can fire event containing the overview-ruler element #3686

Closed
Tyriar opened this issue Mar 16, 2022 · 2 comments
Assignees
Labels
area/decorations type/bug Something is misbehaving
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Mar 16, 2022

I added this code to VS Code:

		const decoration = this._terminal.registerDecoration({
			marker
		});
		if (decoration) {
			decoration.onRender(element => {
				console.log('element', element);
				element.style.backgroundColor = 'yellow';
			});
			timeout(2000).then(() => decoration.dispose());
		}

And I see a yellow scroll bar:

image

And these logs:

image

@Tyriar Tyriar added type/bug Something is misbehaving area/decorations labels Mar 16, 2022
@Tyriar Tyriar added this to the 4.19.0 milestone Mar 16, 2022
@meganrogge
Copy link
Member

That was intentional because we should leave it up to embedders to use this element or filter it out as needed.

@Tyriar
Copy link
Member Author

Tyriar commented Mar 16, 2022

Rendering for the overview ruler is totally controlled by xterm.js so the embedder shouldn't ever need to touch it, it also makes the API harder to understand/use imo.

@Tyriar Tyriar closed this as completed in a4212e9 Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/decorations type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

2 participants