дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-27 21:12:34 +02:00
When a ConPTY terminal got narrower (for example, a split opened and then closed), xterm dropped the end of the active PowerShell prompt. PowerShell then echoed input at absolute columns without printing the prompt again, so it came back garbled. Local terminals and embedded Run consoles now turn on xterm's cursor-line reflow on Windows builds whose ConPTY needs it. Remote and non-Windows sessions are unchanged. Closes #4155
20 рядки
765 B
TypeScript
20 рядки
765 B
TypeScript
import { afterEach, expect, it } from "vitest";
|
|
import { windowsPtyOptions } from "./windowsPty";
|
|
import { usePlatform } from "@/platform/platformInfo";
|
|
import { useRemote } from "@/platform/remote";
|
|
|
|
const initialPlatform = usePlatform.getState();
|
|
const initialRemote = useRemote.getState();
|
|
afterEach(() => {
|
|
useRemote.setState(initialRemote);
|
|
usePlatform.setState(initialPlatform);
|
|
});
|
|
|
|
it.each(["linux", "windows"])("does not apply the desktop build to a remote %s PTY", (os) => {
|
|
usePlatform.setState({ os: "windows", windowsBuildNumber: 22631 });
|
|
useRemote.setState({
|
|
session: { os, host: "test", root: "/repo", target: { kind: "ssh", config: "test" }, commands: [] },
|
|
});
|
|
expect(windowsPtyOptions()).toEqual({ reflowCursorLine: false });
|
|
});
|