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

Decorations don't handle height correctly #4855

Open
Tyriar opened this issue Oct 27, 2023 · 4 comments
Open

Decorations don't handle height correctly #4855

Tyriar opened this issue Oct 27, 2023 · 4 comments
Labels
area/decorations type/bug Something is misbehaving

Comments

@Tyriar
Copy link
Member

Tyriar commented Oct 27, 2023

When rendering a decoration with a custom background color, it doesn't draw correctly on anything other than the initial line:

image

image

this._terminal!.registerDecoration({
	marker: command.marker!,
	width: 100,
	height: 3,
	backgroundColor: '#772222'
});
@yangguansen
Copy link

Hi @Tyriar
I have 2 questions here:
How to give decoration left margin?
Could it set text to decoration rather than only tiny icon?

@Tyriar
Copy link
Member Author

Tyriar commented Nov 16, 2023

@yangguansen are you speaking as an xterm.js developer or vscode user?

@yangguansen
Copy link

yangguansen commented Nov 17, 2023

Thanks for reply.
I'm just new touch xterm.js to want to archive a web log viewer

How to give decoration left margin?
Could it set text to decoration rather than only tiny icon?

I knowed use decoration.onRender to change decoration element style and change it element textContent.

I have new questions want to learn from you:

  1. When i called reset api, but decoration will not be cleared, so i was clear decoration DOM manually. Do we have any api can clear decorations? The dispose i tried, but it will not clear decotaion.

  2. As a web log viewer, when i scroll up, i want to load prev page log data, does xterm.js has any way to prepend data?
    So far i adopt re-render all data to load more data.

Sorry commit questions at this issue, just see it related with decoraion, if need me open a new issue to discuss this, pls let me and i would like to do.

@jerch
Copy link
Member

jerch commented Nov 17, 2023

Sorry commit questions at this issue, just see it related with decoraion, if need me open a new issue to discuss this, pls let me and i would like to do.

Yeah please use the discussion section for usage questions. I dont see how any of your questions is related this bug issue beside "yeah its xterm.js".

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

3 participants