Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Console.MoveBufferArea() on Linux & Mac #23073

Closed
nilslueders opened this issue Aug 6, 2017 · 7 comments
Closed

Support for Console.MoveBufferArea() on Linux & Mac #23073

nilslueders opened this issue Aug 6, 2017 · 7 comments
Labels
area-System.Console help wanted [up-for-grabs] Good issue for external contributors question Answer questions and provide assistance, not an issue with source code or documentation.

Comments

@nilslueders
Copy link

Is there a plan to support Console.MoveBufferArea() on Linux & Mac? Currently it throws a PlatformNotSupportedException on these platforms.

Without this feature it seems to me not possible to write in the bottom right corner of the console without losing the first line of the buffer (due to the resulting jump to the next line of the cursor), which is not very useful for text user interfaces.

@karelz
Copy link
Member

karelz commented Aug 6, 2017

Do you know how to implement it on Linux and Mac. I know quite a few such Console methods throw PlatformNotSupportedException because it is not possible to implement on Linux/Mac.
cc @ianhays

@nilslueders
Copy link
Author

Ok, thanks for pointing this out. I just noticed that
Console.SetCursorPosition(Console.BufferWidth-1, Console.BufferHeight-1);
Console.Write('X')
does not shift the buffer on Linux/Mac like on Windows. (Can you treat this as a feature? :-))

@danmoseley
Copy link
Member

@nilslueders would you like to investigate what it might take to implement?

@nilslueders
Copy link
Author

One (the only?) way for something similar is tracking the own output to an internal buffer and use this buffer as source. But this might not the expected behaviour as its limited to the own output.

@ianhays
Copy link
Contributor

ianhays commented Aug 7, 2017

The Console Buffer functions are unsupported on Unix because we couldn't come up with a good way of implementing them. We'd certainly be open to suggestions/proposals, though I am not aware of any Unix functions that would get the behavior close enough to Windows to justify their addition under the same API.

@jnevins-gcm
Copy link

So netcoreapp2.1 for Unix/Mac does not support the netstandard spec? That seems unexpected... Isn't the purpose of saying "Platform x implements the netstandard2.0 spec" supposed to provide some level of confidence that I can take a program uses a netstandard2.0 library and run it on that platform? It seems like we're no better off here than with Mono and that .NET is still just for Windows.

What would be a "similar" approach that the netcoreapp2.1 platform for OS X does support? I'd prefer to not have to dive through the platform specific source code to find out the situations where .NET Core is not multi-platform.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@carlossanlop carlossanlop removed the untriaged New issue has not been triaged by the area owner label Mar 4, 2020
@adamsitnik
Copy link
Member

We did not know how to implement it in 2017 and there was no proposal|suggestion since then so I am just closing it.

If somebody has a good idea for how we can implement that, please feel free to reopen the issue.

@adamsitnik adamsitnik removed this from the Future milestone Jun 24, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Console help wanted [up-for-grabs] Good issue for external contributors question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

9 participants