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

Fixes #2305. Improves the handling of escape sequence. #2375

Merged
merged 43 commits into from Feb 25, 2023

Conversation

BDisp
Copy link
Collaborator

@BDisp BDisp commented Feb 22, 2023

Fixes #2305 - Added the EscSeqUtils which will handle escape sequences from the NetDriver and the CursesDriver. The mouse management on CursesDriver is now managed with the EscSeqUtils class.

Fixes #1617

Pull Request checklist:

  • I've named my PR in the form of "Fixes #issue. Terse description."
  • 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.
  • 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)
  • My changes generate no new warnings
  • I have checked my code and corrected any poor grammar or misspellings
  • I conducted basic QA to assure all features are working

tig and others added 30 commits January 1, 2023 10:48
…exit-fix

Improves HeightAsBuffer although currently only works on Windows.
…rminal.gui into fixes_2261_scroll_buffer_cleared_on_exit
Copy link
Collaborator

@tig tig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't have time to finish but this is REALLY AWESOME.

You've removed a huge amount of code in doing this which fantastic.

One of us will need to merge in the work I did in #2261 though. Ugh.

I'll add more comments when I have time.

Please don't take my comments on terminology and wording personally. I know English is not your first language and that's just a fact. My goal here is to help!

Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs Outdated Show resolved Hide resolved
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs Outdated Show resolved Hide resolved
Terminal.Gui/ConsoleDrivers/NetDriver.cs Outdated Show resolved Hide resolved
Terminal.Gui/ConsoleDrivers/NetDriver.cs Outdated Show resolved Hide resolved
Terminal.Gui/ConsoleDrivers/NetDriver.cs Outdated Show resolved Hide resolved
Terminal.Gui/Core/EscSeqUtils/EscSeqUtils.cs Outdated Show resolved Hide resolved
Terminal.Gui/Core/EscSeqUtils/EscSeqUtils.cs Outdated Show resolved Hide resolved
Terminal.Gui/Core/EscSeqUtils/EscSeqUtils.cs Show resolved Hide resolved
Terminal.Gui/Core/EscSeqUtils/EscSeqUtils.cs Show resolved Hide resolved
Terminal.Gui/Core/EscSeqUtils/EscSeqUtils.cs Outdated Show resolved Hide resolved
@BDisp
Copy link
Collaborator Author

BDisp commented Feb 22, 2023

I didn't have time to finish but this is REALLY AWESOME.

You've removed a huge amount of code in doing this which fantastic.

Thanks.

One of us will need to merge in the work I did in #2261 though. Ugh.

I'll merge #2261 into this PR and you comment what is wrong when reviewing.

I'll add more comments when I have time.

Please don't take my comments on terminology and wording personally. I know English is not your first language and that's just a fact. My goal here is to help!

No worry @tig. You know that the documentation it isn't my favorite part and I only really appreciate all the helps on this matter. Thank you so much.

@BDisp
Copy link
Collaborator Author

BDisp commented Feb 24, 2023

All done @tig.

@BDisp
Copy link
Collaborator Author

BDisp commented Feb 24, 2023

I don't understand why I only see 1177 tests and in the log after run is finished I see 1178 and none skipped. This is also happens with the developer branch. Is this a xunit bug?

[xUnit.net 00:00:00.64]   Discovered:  UnitTests
========== Test discovery finished: 1177 Tests found in 1,1 sec ==========
========== Starting test run ==========
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.5+1caef2f33e (64-bit .NET 7.0.3)
[xUnit.net 00:00:00.64]   Starting:    UnitTests
[xUnit.net 00:00:56.63]   Finished:    UnitTests
========== Test run finished: 1178 Tests (1178 Passed, 0 Failed, 0 Skipped) run in 56,6 sec ==========

@tig
Copy link
Collaborator

tig commented Feb 24, 2023

I'll merge #2261 into this PR and you comment what is wrong when reviewing.

I have not had time to look closely. Did you already do this? If so, I'll close #2261.

@BDisp
Copy link
Collaborator Author

BDisp commented Feb 24, 2023

I have not had time to look closely. Did you already do this? If so, I'll close #2261.

I think I did it properly and if more some fix is needed we do later. I think you can close.

@tig tig merged commit 1d2dc40 into gui-cs:develop Feb 25, 2023
@BDisp BDisp deleted the escape-sequence-utils_2305 branch February 25, 2023 22:50
tznind pushed a commit to tznind/gui.cs that referenced this pull request May 7, 2023
…2375)

* Changed ansi esc sequence used on exit.

* Changed ansi esc sequence used on exit.

* Improves HeightAsBuffer although currently only works on Windows.

* Fixes gui-cs#2267. Toplevel.EnsureVisibleBounds throws an exception if border is null.

* Changing comment as requested.

* Fixes indentation.

* Seems not needed for now, maybe some update, comment for now.

* Renamed HeightAsBuffer to EnableConsoleScrolling and made it obsolete.

* Add comment on remarks for EnableConsoleScrolling.

* merged @BDisp's EnableConsoleScrolling PR

* Fixes buffer for Windows Terminal.

* Fixes issue in Windows Terminal on resizing causing some lines not be drawing after exceptions.

* merge #9

* merged #9

* use ESC [ ? 1047

* Tweaks with new esc codes

* Fixed curses driver to not nuke scroll buffer and to resize properly

* merge

* Cleand up netdriver escape codes

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed merge issue and  spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed spaces->tabs

* fixed  build error

* removed old comments

* Resolving merge conflicts.

* Ensuring reset the EnableConsoleScrolling.

* Changing from HeightAsBuffer to EnableConsoleScrolling.

* Done requested changes.

* Reformatting.

* Rename to EscSeqReqStatus.

* Removing Console.Out.Flush ();

---------

Co-authored-by: Charlie Kindel <tig@users.noreply.github.com>
Co-authored-by: Tig Kindel <tig@kindel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants