tharga-console icon indicating copy to clipboard operation
tharga-console copied to clipboard

Unix support

Open pug-pelle-p opened this issue 5 years ago • 4 comments

Right now if you start the application on a unix based system, it would crash due to it throwing an PlatformNotSupportedException because System.Console.MoveBufferArea (Only used in ConsoleManager.MoveBufferArea() ) is not supported on unix systems.

If I put a try-catch around it and swallow the exception, the application works, but the text won't show until I start typing something. Not sure how to fix this, any ideas?

pug-pelle-p avatar Mar 02 '20 17:03 pug-pelle-p

If the user is typeing something, and the application writes a line of text, the buffer is moved down, so that the input is always at the bottom.

The PlatformNotSupportedException for MoveBufferArea seems to have been for several years, so a solution does not seem to be likley in the near future.

I cannot figure out another way of solving this. Perhaps having the program output be written on lines under the input, but it might be very strange to use. And allot to rewrite.

poxet avatar Mar 03 '20 18:03 poxet

Would a solution be to "pause" the output, if the user is typing something? Perhaps an indication on the title bar, that there are pending lines to be written, once the user is done typing.

poxet avatar Mar 03 '20 18:03 poxet

Hmm okay, so do I understand you correctly that the usage of MoveBufferArea is to support the use of an application sending messages after a command is completed or from some background thread?

pug-pelle-p avatar Mar 04 '20 12:03 pug-pelle-p

Yes. If the user starts typing something, and the background process outputs data, then the input buffer is moved down, to make room for the output. If the output is suspended until the user is done typing, then the input would be visible.

poxet avatar Mar 06 '20 10:03 poxet