[Lldb-commits] [lldb] [lldb][windows] inherit cursor's position when creating a ConPTY (PR #193818)

via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 24 07:22:18 PDT 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- lldb/include/lldb/Host/windows/PseudoConsole.h lldb/source/Host/windows/ConnectionConPTYWindows.cpp lldb/source/Host/windows/PseudoConsole.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/source/Host/windows/PseudoConsole.cpp b/lldb/source/Host/windows/PseudoConsole.cpp
index 1c5ce4335..04eb6a3cb 100644
--- a/lldb/source/Host/windows/PseudoConsole.cpp
+++ b/lldb/source/Host/windows/PseudoConsole.cpp
@@ -144,8 +144,9 @@ llvm::Error PseudoConsole::OpenPseudoConsole() {
     cursorCol = csbi.dwCursorPosition.X + 1;
   }
   HPCON hPC = INVALID_HANDLE_VALUE;
-  HRESULT hr = kernel32.CreatePseudoConsole(
-      consoleSize, hInputRead, hOutputWrite, PSEUDOCONSOLE_INHERIT_CURSOR, &hPC);
+  HRESULT hr =
+      kernel32.CreatePseudoConsole(consoleSize, hInputRead, hOutputWrite,
+                                   PSEUDOCONSOLE_INHERIT_CURSOR, &hPC);
   CloseHandle(hInputRead);
   CloseHandle(hOutputWrite);
 
@@ -168,8 +169,8 @@ llvm::Error PseudoConsole::OpenPseudoConsole() {
   // and initialize without clearing the screen or overwriting LLDB's prompt.
   {
     char response[32];
-    int len = snprintf(response, sizeof(response), "\x1b[%d;%dR",
-                       cursorRow, cursorCol);
+    int len = snprintf(response, sizeof(response), "\x1b[%d;%dR", cursorRow,
+                       cursorCol);
     DWORD nwritten = 0;
     WriteFile(m_conpty_input, response, len, &nwritten, NULL);
   }

``````````

</details>


https://github.com/llvm/llvm-project/pull/193818


More information about the lldb-commits mailing list