Terminal.Gui
Terminal.Gui copied to clipboard
Adds `ANSIDriver` - Pure "Console Virtual Terminal Sequences" driver
Fixes
- Fixes #2610
- Fixes #2796
- Fixes #881
Todo
- [x] Add a new driver called
ANSIDriver
that uses ANSI ESC sequences for drawing and cursor (not input). - [x] Add
Application.ForceDriver
as aConfigurationManager
property to replaceUseSystemConsole
andUICatalog -usc
- [ ] Remove unneeded legacy WindowsDriver cruft from
ANSIDriver
- [ ] Fix bugs & issues on Windows
- [ ] Determine if
ANSIDriver
can be a basis for a new Linux driver too (re: #2796, #881, ...) - [ ] Update all documentaion
Pull Request checklist:
- [x] I've named my PR in the form of "Fixes #issue. Terse description."
- [x] My code follows the style guidelines of Terminal.Gui - if you use Visual Studio, hit
CTRL-K-D
to automatically reformat your files before committing. - [x] My code follows the Terminal.Gui library design guidelines
- [ ] I ran
dotnet test
before commit - [ ] I have made corresponding changes to the API documentation (using
///
style comments) - [x] My changes generate no new warnings
- [x] I have checked my code and corrected any poor grammar or misspellings
- [ ] I conducted basic QA to assure all features are working
@tig sometimes WindowsDriver
on Windows Terminal
doesn't refresh after resizing.
@tig I understand why you are adding ANSIDriver
which is a very good idea. But I think the reason for that decision isn't the more correct. In my opinion it should be a cross platform to improve the NetDriver
instead of WindowsDriver
. You know that NetDriver
read and process Ansi escape sequences very slower. Also writing is slower as well. But on Linux it's much faster. So, ANSIDriver
should use the Win32 API as it now working, as well the input keys and mouse to work on Windows and will use Ansi escape sequences to write to the console. On Linux ANSIDriver
will use the NetEvents and System.Console
. Thus ANSIDriver
would be a cross platform that will run much more faster on Windows and Linux. Right now it's only a duplicate of WindowsDriver that is using Ansi escape sequences to write to console to support true color.
@tig I submitted the PR https://github.com/tig/Terminal.Gui/pull/16 to your branch. When you have time please tell me what you think. Thanks.
For the profile settings work properly this rule must be follow:
- To debug WT the WT settings must be "Let Windows decide or Windows Terminal".
- To debug CH the WT settings must be "Host Windows Console".