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

OSC sequences flushed asynchronously #752

Closed
cpendery opened this issue Dec 31, 2024 · 1 comment
Closed

OSC sequences flushed asynchronously #752

cpendery opened this issue Dec 31, 2024 · 1 comment

Comments

@cpendery
Copy link
Member

I thought enabling the new useConptyDll feature in [email protected] would cause all OSC sequences to be synchronously emitted, but I'm still seeing them get emitted before the content they surround. Is there another setting I need to enable for this behavior?

Example:

var os = require("os");
var fs = require("fs");
var pty = require("node-pty");

var shell = os.platform() === "win32" ? "pwsh.exe" : "bash";

var ptyProcess = pty.spawn(shell, [], {
  name: "xterm-color",
  cols: 80,
  rows: 30,
  cwd: process.env.HOME,
  env: process.env,
  useConpty: true,
  useConptyDll: true,
});

ptyProcess.onData((data) => {
  fs.appendFileSync("output.txt", data + "\n");
});

ptyProcess.write('echo "$([char]0x1b)]6973;START`a12$([char]0x1b)]6973;END`a"\r');

Output:

�[?25l
�[93mecho �[36m"�[37m$([char]�[97m0x1b�[37m)�[36m]6973;START`a12�[37m$([char]�[97m0x1b�[37m)�[36m]6973;END`a"
�[?25h
�]6973;START��]6973;END�
�[m12
@Tyriar
Copy link
Member

Tyriar commented Jan 6, 2025

@cpendery that's coming in conpty v2, which I should be getting the dll for soon (within the month?). Once I get it I'll update it in node-pty and pull into VS Code and then start stabilizing the setting in vscode. So this is tracked with #490

@Tyriar Tyriar closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants