polemic
polemic
CC#
Created by polemic on 2/23/2025 in #help
Console.SetCursorPosition does not work properly on windows terminal.
Console.SetBufferSize fixes it but it breaks again if the window is resized but it also has the side affect of malforming data when the setcursorposition is called so not a good solution
15 replies
CC#
Created by polemic on 2/23/2025 in #help
Console.SetCursorPosition does not work properly on windows terminal.
Doesn't work, but I think I'm doing it wrong because it also fails on conhost. This is the original code
Console.SetCursorPosition(0, LineNumber);
Console.SetCursorPosition(0, LineNumber);
And this is what I tried changing it to
Console.Write("\x1b[" + LineNumber.ToString() + "d");
Console.Write("\x1b[" + LineNumber.ToString() + "d");
15 replies
CC#
Created by polemic on 2/23/2025 in #help
Console.SetCursorPosition does not work properly on windows terminal.
works on conhost, doesnt work on windows terminal / has the unwanted behaviour of moving relative instead of absolute
15 replies
CC#
Created by polemic on 2/23/2025 in #help
Console.SetCursorPosition does not work properly on windows terminal.
i want to revert the behaviour back to the original one, or find a way to go to an exact position instead of a relative one
15 replies
CC#
Created by polemic on 2/23/2025 in #help
Console.SetCursorPosition does not work properly on windows terminal.
in conhost, there is a hard limit of 9000 lines and each line you print goes 0 1 2 3 4 5 whatever and so on windows terminal is different, line 0 is always the top line that is visible but that means that if i call setcursorposition(0, 15) for example on conhost it will go to the 15th line that was printed which might scroll up hundreds of lines but on windows terminal it will go to the 15th line relative from the first visible line on the screen
15 replies
CC#
Created by polemic on 2/23/2025 in #help
Console.SetCursorPosition does not work properly on windows terminal.
does that fix the relative thing
15 replies
CC#
Created by polemic on 2/23/2025 in #help
Console.SetCursorPosition does not work properly on windows terminal.
can you tell me how i use that?
15 replies
CC#
Created by polemic on 2/23/2025 in #help
Console.SetCursorPosition does not work properly on windows terminal.
thats the ansi escape sequence for clearing the terminal
15 replies