Open mrbeardad opened 5 days ago
What you're seeing is most likely the result of the console mode DISABLE_NEWLINE_AUTO_RETURN
rather than the ANSI newline mode 20. There is an open issue for fzf
that suggests they may be setting the mode but not always cleaning up afterwards. See https://github.com/junegunn/fzf/issues/3334
I'm not sure about this, but it seems DISABLE_NEWLINE_AUTO_RETURN
(0x0008) is unset.
#include <iostream>
#include <windows.h>
int main(int argc, char* argv[])
{
auto ih = GetStdHandle(STD_INPUT_HANDLE);
DWORD mode = 0;
GetConsoleMode(ih, &mode);
std::cout << "stdin mode: 0x" << std::hex << mode << std::endl;
auto oh = GetStdHandle(STD_OUTPUT_HANDLE);
mode = 0;
GetConsoleMode(oh, &mode);
std::cout << "stdout mode: 0x" << std::hex << mode << std::endl;
}
I got console mode as 0xf
by the code in the https://github.com/junegunn/fzf/issues/3334, I don't understand why it is different than native code?
Windows Terminal version
1.21.3231.0
Windows build number
10.0.22631.0
Other Software
PowerShell 7.4.6 PSFzf 2.6.7
Steps to reproduce
Install PSFzf by
Import-Module PSFzf
, then set the content of powershell $PROFILE to followingtab
to complete until the bug appearhttps://github.com/user-attachments/assets/c9993e7d-478a-48e4-a749-a95b5ec0815e
Expected Behavior
"`e[20h" set to "newline mode"
Actual Behavior
still in "linefeed mode"