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

Support serializing a specific line #4871

Closed
Tyriar opened this issue Nov 7, 2023 · 1 comment · Fixed by #4877
Closed

Support serializing a specific line #4871

Tyriar opened this issue Nov 7, 2023 · 1 comment · Fixed by #4877
Assignees
Labels
area/addon/serialize type/enhancement Features or improvements to existing features
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Nov 7, 2023

I'm implementing sticky scroll in VS Code (microsoft/vscode#172742) which needs to serialize a particular line. Right now it's rather inefficient as I need to scroll up to the line, not only the line:

// TODO: Serializing all content up to the required line is inefficient; support providing single line/range serialize addon
const s = this._serializeAddon?.serialize({
	scrollback: this._xterm.raw.buffer.active.baseY - marker.line
});
if (s) {
	const content = s.substring(0, s.indexOf('\r'));
	...
}
@Tyriar Tyriar added type/enhancement Features or improvements to existing features area/addon/serialize labels Nov 7, 2023
@Tyriar Tyriar added this to the 5.4.0 milestone Nov 7, 2023
@Tyriar Tyriar self-assigned this Nov 7, 2023
@jerch
Copy link
Member

jerch commented Nov 7, 2023

Already figured, that the high-level serialize interface is a bit unconventional and limited in pulling certain lines or ranges of lines, while doing that first wasm rewrite. Imho providing a range option (default: full range of lines) is the better idea, yeah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/addon/serialize type/enhancement Features or improvements to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants