Skip to content

Commit

Permalink
Simplify initialization (MSVC is saying previous style was a C++20 fe…
Browse files Browse the repository at this point in the history
…ature)
  • Loading branch information
starseeker committed Oct 30, 2024
1 parent d7e890c commit 0a392fc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libtermio/linenoise.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -969,8 +969,9 @@ inline BOOL ParseAndPrintANSIString(HANDLE hDev, LPCVOID lpBuffer,
CONSOLE_CURSOR_INFO oldConsoleCursorInfo;
GetConsoleCursorInfo(hConOut, &oldConsoleCursorInfo);

CONSOLE_CURSOR_INFO invisibleCursor{.dwSize = oldConsoleCursorInfo.dwSize,
.bVisible = 0};
CONSOLE_CURSOR_INFO invisibleCursor;
invisibleCursor.dwSize = oldConsoleCursorInfo.dwSize;
invisibleCursor.bVisible = 0;
SetConsoleCursorInfo(hConOut, &invisibleCursor);

for (i = nNumberOfBytesToWrite, s = (LPCSTR)lpBuffer; i > 0; i--, s++) {
Expand Down

0 comments on commit 0a392fc

Please sign in to comment.