Files
Netcatty/patches/node-pty+1.1.0.patch
T
陈大猫 87b828c254 fix(terminal): complete Windows ConPTY clear handling (#2465)
* fix(terminal): enable ConPTY clear for Mosh and ET

* test(terminal): exercise Windows ConPTY spawn options

* fix(terminal): align ConPTY clear ABI

* fix(terminal): restore patched ConPTY runtime files

* fix(terminal): preserve patched ConPTY in packages

* test(ui): keep lazy-load comments ASCII-only

* fix(terminal): limit patched node-pty rebuild

* test(terminal): avoid platform-specific executable stubs
2026-07-24 22:58:38 +08:00

18 lines
1.1 KiB
Diff

diff --git a/node_modules/node-pty/src/win/conpty.cc b/node_modules/node-pty/src/win/conpty.cc
index 7b286d3..5423c8e 100644
--- a/node_modules/node-pty/src/win/conpty.cc
+++ b/node_modules/node-pty/src/win/conpty.cc
@@ -35 +35 @@ typedef HRESULT (__stdcall *PFNRESIZEPSEUDOCONSOLE)(HPCON hpc, COORD newSize);
-typedef HRESULT (__stdcall *PFNCLEARPSEUDOCONSOLE)(HPCON hpc);
+typedef HRESULT (__stdcall *PFNCLEARPSEUDOCONSOLE)(HPCON hpc, BOOL keepCursorRow);
@@ -526 +526 @@ static Napi::Value PtyClear(const Napi::CallbackInfo& info) {
- pfnClearPseudoConsole(handle->hpc);
+ pfnClearPseudoConsole(handle->hpc, TRUE);
diff --git a/node_modules/node-pty/src/win/conpty.h b/node_modules/node-pty/src/win/conpty.h
index 4cef31c..4f03a0c 100644
--- a/node_modules/node-pty/src/win/conpty.h
+++ b/node_modules/node-pty/src/win/conpty.h
@@ -33 +33 @@ CONPTY_EXPORT HRESULT WINAPI ConptyResizePseudoConsole(HPCON hPC, COORD size);
-CONPTY_EXPORT HRESULT WINAPI ConptyClearPseudoConsole(HPCON hPC);
+CONPTY_EXPORT HRESULT WINAPI ConptyClearPseudoConsole(HPCON hPC, BOOL keepCursorRow);