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 #2261 - Drivers clear the scrollback buffer on resize and exit. #2264

Closed

Conversation

tig
Copy link
Collaborator

@tig tig commented Jan 1, 2023

Fixes #2261
Fixes #2303

It turns out that all drivers were behaving poorly in this regard.

  • WindowsDriver: was emitting ESC [3J on both Resize and End. This always clears the scrollback buffer (even if the alternative screen buffer is activated).
  • NetDriver: was emitting ESC [3J.
  • CursesDriver; was emitting ESC [3J instead of calling Curses.refresh() in resize.

We were using ESC [ ? 1049 h/l to activate the alternative buffer in both WindowsDriver and NetDriver. Changed this to ESC [ ? 1047 h/l because it is less destructive (doesn't mess with the cursor) and simply works better on Windows Terminal.

Turns out Console.Out.Flush() is not needed because the underlying Console.Out stream has AutoFlush enabled. Removed all calls to simplify code.

Removed old comments and ensured formatting was correct (spaces->tabs) in all driver files.

@BDisp
Copy link
Collaborator

BDisp commented Jan 1, 2023

@tig this only solves when you exit the app, but if buffer as height is false, when you running the app you can scroll and you shouldn't. Here you needed the 3j. I'll work on it today.

@tig
Copy link
Collaborator Author

tig commented Jan 1, 2023

@tig this only solves when you exit the app, but if buffer as height is false, when you running the app you can scroll and you shouldn't. Here you needed the 3j. I'll work on it today.

I don't understand this at all. I don't see the app scrolling. This code is only emitted when the app exits, so it should have no impact while the app is running.

@BDisp
Copy link
Collaborator

BDisp commented Jan 1, 2023

I don't understand this at all. I don't see the app scrolling. This code is only emitted when the app exits, so it should have no impact while the app is running.

I'm talking about this:
scroll-buffer

I think you would want like this:
scroll-buffer-fix

This isn't working well with Windows Terminal due to this issue microsoft/terminal#14568.

@tig
Copy link
Collaborator Author

tig commented Jan 2, 2023

Got it. I now understand. Thank you.

For now, until #5094 is fixed by the WT team, I think the behavior shown in your first video is preferrable to clearing the buffer and causing what I (and @kingzawar, apparently) think data loss.

Make sure y'all thumbs-up #5094 so the Terminal team takes it seriously.

@BDisp
Copy link
Collaborator

BDisp commented Jan 2, 2023

Got it. I now understand. Thank you.

For now, until #5094 is fixed by the WT team, I think the behavior shown in your first video is preferrable to clearing the buffer and causing what I (and @kingzawar, apparently) think data loss.

Make sure y'all thumbs-up #5094 so the Terminal team takes it seriously.

The CSI 8;n;mt for resize is good when we want to have the buffer size equal to window size. But if you want to have a buffer size greater than the window size, then we can't use it because it'll always set the window size. I couldn't find a escape sequence that set the terminal buffer size.

@tig
Copy link
Collaborator Author

tig commented Jan 2, 2023

Got it. I now understand. Thank you.
For now, until #5094 is fixed by the WT team, I think the behavior shown in your first video is preferrable to clearing the buffer and causing what I (and @kingzawar, apparently) think data loss.
Make sure y'all thumbs-up #5094 so the Terminal team takes it seriously.

The CSI 8;n;mt for resize is good when we want to have the buffer size equal to window size. But if you want to have a buffer size greater than the window size, then we can't use it because it'll always set the window size. I couldn't find a escape sequence that set the terminal buffer size.

I think I understand you.

However, what I don't know is how often people want a buffer size that's different than the window size. I suspect it's a very rare use case?

@BDisp
Copy link
Collaborator

BDisp commented Jan 2, 2023

I think I understand you.

However, what I don't know is how often people want a buffer size that's different than the window size. I suspect it's a very rare use case?

Not exactly. See the example of the second video where I enabled the BufferAsHeight and reduced the window size but I still can see all the rows by using the vertical scroll.

@tig
Copy link
Collaborator Author

tig commented Jan 2, 2023

I think I understand you.
However, what I don't know is how often people want a buffer size that's different than the window size. I suspect it's a very rare use case?

Not exactly. See the example of the second video where I enabled the BufferAsHeight and reduced the window size but I still can see all the rows by using the vertical scroll.

But WHY would someone want to enable HeightAsBuffer? The API docs are confusing to me.

I'm sorry if I am being persistent on this, but I sincerely do not understand (and never have) the use case. This is likely just me being slow.

@BDisp
Copy link
Collaborator

BDisp commented Jan 2, 2023

But WHY would someone want to enable HeightAsBuffer? The API docs are confusing to me.

I'm sorry if I am being persistent on this, but I sincerely do not understand (and never have) the use case. This is likely just me being slow.

It's only an option. Why the author opened issue? Because it was clearing the historic after exit the app. But, why he needs to scroll to see the historic? Well, before I fixed the window resize on the WindowsDriver, it only used the buffer size.
I was preparing a fix for this that was by using the escape sequence CSI ?1049h on the Init method to enable alternative screen buffer and CSI ?1049l on the End method to disable alternative screen buffer. In practice it save the original screen buffer before start the app and restore the original screen buffer after exit the app. Do you still want I open a PR to this branch or it not worth?

@tig
Copy link
Collaborator Author

tig commented Jan 3, 2023

If one were to re-write the API docs for HeightAsBuffer to accurately reflect what it does what would they say?

Application.HeightAsBuffer currently reads as

		/// <summary>
		/// The current <see cref="ConsoleDriver.HeightAsBuffer"/> used in the terminal.
		/// </summary>
		public static bool HeightAsBuffer {

ConsoleDriver.HeightAsBuffer currently reads as:

		/// <summary>
		/// If false height is measured by the window height and thus no scrolling.
		/// If true then height is measured by the buffer height, enabling scrolling.
		/// </summary>
		public abstract bool HeightAsBuffer { get; set; }

"If set to false (the default), the height of the Terminal.Gui application's top-most, TopLevel will be resized to match the visible console size if the console is resized and the console will not scroll. If set to true, the height of the Terminal.Gui application's top-most, TopLevel, will not resize when the console is resized and the console can be scrolled."

Is that correct? If not, please re-write it so that it is correct.

@BDisp
Copy link
Collaborator

BDisp commented Jan 3, 2023

		/// <summary>
		/// If false height is measured by the window height and thus no scrolling.
		/// If true then height is measured by the buffer height, enabling scrolling.
		/// </summary>
		public abstract bool HeightAsBuffer { get; set; }

This definition is perfectly wright. Should be copied to the Application.HeightAsBuffer too?

@tig
Copy link
Collaborator Author

tig commented Jan 3, 2023

		/// <summary>
		/// If false height is measured by the window height and thus no scrolling.
		/// If true then height is measured by the buffer height, enabling scrolling.
		/// </summary>
		public abstract bool HeightAsBuffer { get; set; }

This definition is perfectly right. Should be copied to the Application.HeightAsBuffer too?

It may be perfectly right, but I find it VERY confusing and unclear.

  • It is not clear what 'height' refers to. Is it the height of the ConsoleDriver Contents (e.g. Rows)? Or is it the height of Application.Top?
  • It is not clear what window refers to. Is it the height of Application.Top or is it the height of the visible console view (or both)?
  • It is not clear what buffer is. Is it the console's scroll-back buffer? Or is it the buffer for the visible console view (e.g. for WindowsConsole, the buffer managed by SetConsoleOutputWindow? Or something else?
  • It is not clear that scrolling refers to scrolling the console (and not within the app).
  • It is not clear what scrolling has to do with any of this.

Would it have made more sense to name this property "EnableConsoleScrolling"?

I'm not challenging or disagreeing with you. I seriously do not understand how this is supposed to work.

@BDisp
Copy link
Collaborator

BDisp commented Jan 3, 2023

		/// <summary>
		/// If false height is measured by the window height and thus no scrolling.
		/// If true then height is measured by the buffer height, enabling scrolling.
		/// </summary>
		public abstract bool HeightAsBuffer { get; set; }

This definition is perfectly right. Should be copied to the Application.HeightAsBuffer too?

It may be perfectly right, but I find it VERY confusing and unclear.

* It is not clear what 'height' refers to. Is it the height of the ConsoleDriver `Contents` (e.g. `Rows`)? Or is it the height of `Application.Top`?

Refers to the Rows.

* It is not clear what `window` refers to. Is it the height of `Application.Top` or is it the height of the visible console view (or both)?

It's the visible console view.

* It is not clear what `buffer` is. Is it the console's scroll-back buffer? Or is it the buffer for the visible console view (e.g. for `WindowsConsole`, the buffer managed by `SetConsoleOutputWindow`? Or something else?

It's the Rows length.

* It is not clear that scrolling refers to scrolling the console (and not within the app).

Refers scrolling the console within the app.

* It is not clear what scrolling has to do with any of this.

Scrolling the console within the app allows view all the available rows.

Would it have made more sense to name this property "EnableConsoleScrolling"?

Perhaps is better. I leave that up to you.

I'm not challenging or disagreeing with you. I seriously do not understand how this is supposed to work.

No problem. I hope you now understanding all my concern about this. Thanks.

@tig
Copy link
Collaborator Author

tig commented Jan 3, 2023

No problem. I hope you now understanding all my concern about this. Thanks.

I would appreciate it if you used your answers above to recraft the API documentation for HeightAsBuffer so that it is more clear and complete.

@BDisp
Copy link
Collaborator

BDisp commented Jan 4, 2023

I would appreciate it if you used your answers above to recraft the API documentation for HeightAsBuffer so that it is more clear and complete.

I will in both, ConsoleDriver and Application. In WindowsDriver it's already working as expected but I'm facing some problems with NetDriver and CursesDriver. I'll continue try to find the solution.

@tig
Copy link
Collaborator Author

tig commented Jan 5, 2023

I would appreciate it if you used your answers above to recraft the API documentation for HeightAsBuffer so that it is more clear and complete.

I will in both, ConsoleDriver and Application. In WindowsDriver it's already working as expected but I'm facing some problems with NetDriver and CursesDriver. I'll continue try to find the solution.

Could you draft it here in a comment first?

@BDisp
Copy link
Collaborator

BDisp commented Jan 5, 2023

Could you draft it here in a comment first?

Sure and please make the changes needed.

In ConsoleDriver.cs:

		/// <summary>
                /// <para>
		/// If <see langword="false"/> (the default) the height of the Terminal.Gui application (<see cref="Rows"/>) tracks  
                /// to the height of the visible console view when the console is resized. In this case 
		/// scrolling in the console will be disabled and all <see cref="Rows"/> will remain visible.
                /// </para>
                /// <para>
		/// If <see langword="true"/> then height of the Terminal.Gui application <see cref="Rows"/> does not
                /// change when the console is resized (it stays the same value it was set to at application startup). 
		/// In this case console scrolling is enabled and the contents (<see cref="Rows"/> high) will scroll
		/// as the console scrolls. 
                /// </para>
		/// </summary>
		public abstract bool HeightAsBuffer { get; set; }

In Application.cs:

		/// <summary>
		/// The current <see cref="ConsoleDriver.HeightAsBuffer"/> used in the terminal.
		/// </summary>
		/// <remarks>
                /// <para>
		/// If <see langword="false"/> (the default) the height of the Terminal.Gui application (<see cref="ConsoleDriver.Rows"/>) tracks  
                /// to the height of the visible console view when the console is resized. In this case 
		/// scrolling in the console will be disabled and all <see cref="ConsoleDriver.Rows"/> will remain visible.
                /// </para>
                /// <para>
		/// If <see langword="true"/> then height of the Terminal.Gui application <see cref="Rows"/> does not
                /// change when the console is resized (it stays the same value it was set to when <see cref="Application.Begin"/> was called). 
		/// In this case console scrolling is enabled and the contents (<see cref="Rows"/> high) will scroll
		/// as the console scrolls. 
                /// </para>
		/// </remarks>
		public static bool HeightAsBuffer {

@tig
Copy link
Collaborator Author

tig commented Jan 5, 2023

I edited your post. Is it still accurate?

@BDisp
Copy link
Collaborator

BDisp commented Jan 5, 2023

I edited your post. Is it still accurate?

Only this is incorrect:

                /// If <see langword="true"/> then height of the Terminal.Gui application <see cref="Rows"/> does not
                /// change when the console is resized (it stays the same value it was set to at application startup). 

The height only changes if the current height after resizing is greater than the current Rows. So, it may be different than the value it was set to at application startup. Another observation is it depends of when the HeightAsBuffer is toggled from false to true. If HeightAsBuffer is false and Rows is equal to 10, toggling HeightAsBuffer to true the minimum Rows is 10 on window shrink. If the window is expanded to 20, then the Rows will be also equal to 20 and will maintain this size if window is shrink. If HeightAsBuffer is toggled to true Rows will be equal to window height again.
Please do the changes you think more appropriate.

@BDisp
Copy link
Collaborator

BDisp commented Jan 14, 2023

@tig I sent the PR tig#8 which is currently working on Windows. Also the scroll bar is only hidden when the app is running and HeightAsBuffer is false, but is restored when returned to the console after exit the app. When the app is running the scroll is only showed on Windows when HeightAsBuffer is true and the window height is lower than the Rows.

@tig
Copy link
Collaborator Author

tig commented Jan 24, 2023

@BDisp Can you show me an example of HeightAsBuffer/EnableConsoleScrolling = true on a platform other than Windows/Windows Terminal that is working as you expect?

With cmd has the ansi escape code echos but is less garbage than Windows Terminal.

windows-driver-cmd windows-driver-cmd

It has no effect.
Debian/xterm/NetDriver behaves identically (HeightAsBuffer has no effect).

On WSL the CursesDriver only use the LINES equal to windows height and the NetDriver also only uses the windows height. But I think there is some ansi escape code that can set the buffer height greater than the windows height.

So, if I understand you correctly (and this is backed by my tests):

  • The "HeightAsBuffer"/"EnableConsoleScrolling" feature only works on Windows.
  • When used on Windows Terminal, scrolling is always enabled, the only difference is the app will grow, but never shink vertically.
  • When used on cmd.exe, setting it to false enables the scroll bar.
  • The setting has no effect on the CursesDriver on Windows or Linux

I've now tried 2 different Linux terminals (xterm and terminator) and I have fixed all issues having to with THIS issue (independent of HeightAsBuffer). Please review my code.

I also took the liberty of fixing the formatting in all the ConsoleDrivers files and removing extraneous comments since so many of the files were already touched.

@tig tig changed the title Fixes 2261. Windows & NetDriver use incorrect ESC code to clear buffer when exiting Fixes #2261 - Drivers clear the scrollback buffer on resize and exit. Jan 24, 2023
@BDisp
Copy link
Collaborator

BDisp commented Jan 24, 2023

So, if I understand you correctly (and this is backed by my tests):

* The "HeightAsBuffer"/"EnableConsoleScrolling" feature only works on Windows.

For now yes. My intention is also use a workaround on Unix to add new lines after the windows bottom while the Rows is greater than the windows height. I also want to use ansi escape to request the windows size, but this is only working on a real Linux and not on Windows and WSL.

* When used on Windows Terminal, scrolling is always enabled, the only difference is the app will grow, but never shink vertically.

Negative. The scrolling is only enabled if the EnableConsoleScrolling property is enabled, otherwise the app will never scroll. If EnableConsoleScrolling is disabled and the scroll bar is visible before start the Terminal.Gui app, the scroll bar will be disabled when the app start and the scroll bar will be restored after exit the app, making it visible if it was already visible before. If the EnableConsoleScrolling is enabled and the scroll bar is visible before start the Terminal.Gui app, the scroll bar will be disabled when the app start. If the window is shrunken the scroll bar will be visible and we can scroll between our app, in the case of UICatalog will be possible to scroll between the menu bar and the status bar, but never the scrollback buffer while app is running. After exit the app the scroll bar will be visible, if it was visible before, to allow scrollback buffer.

* When used on cmd.exe, setting it to false enables the scroll bar.

False, it shouldn't. Only must enable the scroll bar if the EnableConsoleScrolling property is enabled. Remember that setting to true the scroll bar isn't show immediately, but when the windows is shrunken. When the window is expanded until the windows height is equal to Rows, the scroll bar is invisible and if is shrunken again the scroll bar is visible again.

* The setting has no effect on the CursesDriver on Windows or Linux

For now isn't working but as I said above maybe is possible to make it work. The behavior is intended to make it work with all terminal, but sometimes there are some incompatibilities

I've now tried 2 different Linux terminals (xterm and terminator) and I have fixed all issues having to with THIS issue (independent of HeightAsBuffer). Please review my code.

You have to be more specific and explain what was bad and now it's working. I know that as I said that scrolling wasn't working on Linux if EnableConsoleScrolling property is enabled.

I also took the liberty of fixing the formatting in all the ConsoleDrivers files and removing extraneous comments since so many of the files were already touched.

I agree, it was needed but you know I'm not nothing good with docs :-)

PS: When I create the HeightAsBuffer, now EnableConsoleScrolling, was with the intentions I described above. If you want to give another behavior than that, then I disagree, but it is in your hand decide.

@BDisp
Copy link
Collaborator

BDisp commented Jan 24, 2023

@tig but I admit another scenario for the vertical scroll bar behavior, like an enum:

public enum VerticalScrollBehavior {
	// No scroll at all.
	None,
	// Only allow scrolling into the app.
	AppScrolling,
	// Allow scrolling on all scrollback buffer (original buffer more app buffer)
	// This allows an app write to the console preserving with all scrollback buffer.
	ScrollBackBuffer
}

@tig
Copy link
Collaborator Author

tig commented Mar 3, 2023

We need to retarget this PR at the v2_develop branch or delete it if it's already been merged via other PRs. I don't remember.

@tig tig added the v1 For Issues & PRs targetting v1.x label Mar 17, 2023
@tig
Copy link
Collaborator Author

tig commented Mar 17, 2023

I'm going to get back to working on this asap. I think this may be worth taking into develop / v1, so I've tagged it as such.

Please debate if you don't agree.

@tig
Copy link
Collaborator Author

tig commented Mar 17, 2023

I think we should consider this for v1.

@tig
Copy link
Collaborator Author

tig commented May 10, 2023

  • WindowsDriver: was emitting ESC [3J on both Resize and End. This always clears the scrollback buffer (even if the alternative screen buffer is activated).
  • NetDriver: was emitting ESC [3J.
  • CursesDriver; was emitting ESC [3J instead of calling Curses.refresh() in resize.

We were using ESC [ ? 1049 h/l to activate the alternative buffer in both WindowsDriver and NetDriver. Changed this to ESC [ ? 1047 h/l because it is less destructive (doesn't mess with the cursor) and simply works better on Windows Terminal.

I can't remember what we finally decided to do here.

  • NetDriver is still using [?1049h; WindowsDriver is using 1047 and I think NetDriver should as well.
  • WindowsDrivder is still emittting [?3J in ResizeScreen (for EnableconsoleScrolling); I think it should be using [0J?.

The only other thing in that was in this PR, that does not appear to be in v2_develop is the code added to UpdateScreen that prevents writing to the console if SetCursorPos failed. I don't know what that is for.

@bdiisp, do you have an opinion on what we should do with this PR?

tig added a commit to tig/Terminal.Gui that referenced this pull request May 10, 2023
@BDisp
Copy link
Collaborator

BDisp commented May 10, 2023

If EnableconsoleScrolling is enabled the app can scroll through the console (note that is the app scrolling, not the content existing before the app running). The [?3J allows all the scroll-back is cleared before update screen the app. But, also before that was only working on conhost and not on Windows Terminal (because doesn't allows resize the console buffer by code). The [?1049h and ?1049l allows save and restore the original screen buffer. Now I don't know how it's.

@tig
Copy link
Collaborator Author

tig commented Jul 25, 2023

Dupe of #2764

@tig tig closed this Jul 25, 2023
tig added a commit that referenced this pull request Aug 9, 2023
…ed code (#2612)

* Added ClipRegion; cleaned up driver code

* clip region unit tests

* api docs

* Moved color stuff from ConsoleDriver to Color.cs

* Removes unused ConsoleDriver APIs

* Code cleanup and Removes unused ConsoleDriver APIs

* Code cleanup and Removes unused ConsoleDriver APIs

* Work around #2610

* adjusted unit tests

* initial commit

* Made Rows, Cols, Top, Left virtual

* Made Clipboard non-virtual

* Made EnableConsoleScrolling  non-virtual

* Made Contents non-virtual

* Pulled Row/Col up

* Made MoveTo virtual; fixed stupid FakeDriver cursor issue

* Made CurrentAttribute non-virtual

* Made SetAttribute  non-virtual

* Moved clipboard code out

* Code cleanup

* Removes dependecy on NStack from ConsoleDrivers - WIP

* Fixed unit tests

* Fixed unit tests

* Added list of unit tests needed

* Did some perf testing; tweaked code and charmap to address

* Brough in code from PR #2264 (but commented)

* Tons of code cleanup

* Fighting with ScrollView

* Fixing bugs

* Fixed TabView tests

* Fixed View.Visible test that was not really working

* Fixed unit tests

* Cleaned up clipboard APIs in attempt to track down unit test failure

* Add Cut_Preserves_Selection test

* Removed invalid code

* Removed invalid test code; unit tests now pass

* EscSeq* - Adjusted naming, added more sequences, made code more consistent, simplified, etc...

* Added CSI_SetGraphicsRendition

* NetDriver code cleanup

* code cleanup

* Cleaned up color handling in NetDriver

* refixed tabview unit test

* WindowsDriver color code cleanup

* WindowsDriver color code cleanup

* CursesDriver color code cleanup

* CursesDriver - Adding _BOLD has no effect. Further up the stack we cast the return of ColorToCursesColor from int to short and the _BOLD values don't fit in a short.

* CursesDriver color code - make code more accurate

* CursesDriver color code - make code more accurate

* Simplified ConsoleDriver.GetColors API

* Simplified ConsoleDriver.GetColors API further

* Improved encapslation of Attribute; prep for TrueColor & other attributes like blink

* Fixes #2249. CharacterMap isn't refreshing well non-BMP code points on scroll.

* Use GetRange to take some of the runes before convert to string.

* Attempting to fix unit tests not being cleaned up

* Fixes #2658 - ConsoleDriver.IsRuneSupported

* Fixes #2658 - ConsoleDriver.IsRuneSupported (for WindowsDriver)

* Check all the range values and not only the max value.

* Reducing code.

* Fixes #2674 - Unit test process doesn't exit

* Changed Cell to support IsDirty and list of Runes

* add support for rendering TrueColor output on Windows merging veeman & tznind code

* add colorconverter changes

* fixed merged v2_develop

* Fixing merge bugs

* Fixed merge bugs

* Fixed merge bugs - all unit tests pass

* Debugging netdriver

* More netdriver diag

* API docs for escutils

* Update unicode scenario to stress more stuff

* Contents: Now a 2D array of Cells; WIP

* AddRune and ClearContents no longer virtual/abstract

* WindowsDriver renders correctly again

* Progress on Curses

* Progress on Curses

* broke windowsdriver

* Cleaned up FakeMainLoop

* Cleaned up some build warnings

* Removed _init from AutoInitShutdown as it's not needed anymore

* Removed unused var

* Removed unused var

* Fixed nullabiltiy warning in LineCanvas

* Fixed charmap crash

* Fixes #2758 in v2

* Port testonfail fix to v2

* Remove EnableConsoleScrolling

* Backport #2764 from develop (clear last line)

* Remove uneeded usings

* Progress on unicode

* Merged in changes from PR #2786, Fixes #2784

* revamp charmap rendering

* Charmap option to show glyph widths

* Fixed issue with wide glpyhs being overwritten

* Fixed charmap startcodepoint change issue

* Added abiltiy to see ncurses verison/lib

* Fought with CursesDriver; giving up for now. See notes.

* Leverage Wcwidth nuget library instaed of our own tables

* enhanced charmap Details dialog

* Final attempt at fixing curses

---------

Co-authored-by: BDisp <bd.bdisp@gmail.com>
Co-authored-by: adstep <stephensonadamj@gmail.com>
tig added a commit that referenced this pull request Aug 11, 2023
* Added ClipRegion; cleaned up driver code

* clip region unit tests

* api docs

* Moved color stuff from ConsoleDriver to Color.cs

* Removes unused ConsoleDriver APIs

* Code cleanup and Removes unused ConsoleDriver APIs

* Code cleanup and Removes unused ConsoleDriver APIs

* Work around #2610

* adjusted unit tests

* initial commit

* Made Rows, Cols, Top, Left virtual

* Made Clipboard non-virtual

* Made EnableConsoleScrolling  non-virtual

* Made Contents non-virtual

* Pulled Row/Col up

* Made MoveTo virtual; fixed stupid FakeDriver cursor issue

* Made CurrentAttribute non-virtual

* Made SetAttribute  non-virtual

* Moved clipboard code out

* Code cleanup

* Removes dependecy on NStack from ConsoleDrivers - WIP

* Fixed unit tests

* Fixed unit tests

* Added list of unit tests needed

* Did some perf testing; tweaked code and charmap to address

* Brough in code from PR #2264 (but commented)

* Tons of code cleanup

* Fighting with ScrollView

* Fixing bugs

* Fixed TabView tests

* Fixed View.Visible test that was not really working

* Fixed unit tests

* Cleaned up clipboard APIs in attempt to track down unit test failure

* Add Cut_Preserves_Selection test

* Removed invalid code

* Removed invalid test code; unit tests now pass

* EscSeq* - Adjusted naming, added more sequences, made code more consistent, simplified, etc...

* Added CSI_SetGraphicsRendition

* NetDriver code cleanup

* code cleanup

* Cleaned up color handling in NetDriver

* refixed tabview unit test

* WindowsDriver color code cleanup

* WindowsDriver color code cleanup

* CursesDriver color code cleanup

* CursesDriver - Adding _BOLD has no effect. Further up the stack we cast the return of ColorToCursesColor from int to short and the _BOLD values don't fit in a short.

* CursesDriver color code - make code more accurate

* CursesDriver color code - make code more accurate

* Simplified ConsoleDriver.GetColors API

* Simplified ConsoleDriver.GetColors API further

* Improved encapslation of Attribute; prep for TrueColor & other attributes like blink

* Fixes #2249. CharacterMap isn't refreshing well non-BMP code points on scroll.

* Use GetRange to take some of the runes before convert to string.

* Attempting to fix unit tests not being cleaned up

* Fixes #2658 - ConsoleDriver.IsRuneSupported

* Fixes #2658 - ConsoleDriver.IsRuneSupported (for WindowsDriver)

* Check all the range values and not only the max value.

* Reducing code.

* Fixes #2674 - Unit test process doesn't exit

* Changed Cell to support IsDirty and list of Runes

* add support for rendering TrueColor output on Windows merging veeman & tznind code

* add colorconverter changes

* fixed merged v2_develop

* Fixing merge bugs

* Fixed merge bugs

* Add outline for FileSystemColorProvider

* Add other known folders

* Added remaining cases and test for file colors

* Use color provider in FileDialog

* Fix default color when UseColors to white

* Remove `TestDirectoryContents_Windows_Colors`

* Remove unused helper method

* Fix formatting

* Fixed merge bugs - all unit tests pass

* Debugging netdriver

* More netdriver diag

* API docs for escutils

* Update unicode scenario to stress more stuff

* Contents: Now a 2D array of Cells; WIP

* AddRune and ClearContents no longer virtual/abstract

* WindowsDriver renders correctly again

* Progress on Curses

* Progress on Curses

* broke windowsdriver

* Cleaned up FakeMainLoop

* Cleaned up some build warnings

* Removed _init from AutoInitShutdown as it's not needed anymore

* Removed unused var

* Removed unused var

* Fixed nullabiltiy warning in LineCanvas

* Fixed charmap crash

* Fixes #2758 in v2

* Remove accidentally re-added test

* Removed unit test xml file

* Remove redundant test

---------

Co-authored-by: Tig Kindel <tig@users.noreply.github.com>
Co-authored-by: BDisp <bd.bdisp@gmail.com>
Co-authored-by: adstep <stephensonadamj@gmail.com>
@tig tig deleted the fixes_2261_scroll_buffer_cleared_on_exit branch April 3, 2024 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v1 For Issues & PRs targetting v1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HeightAsBuffer is confusingly named Drivers use incorrect ESC codes and clear the scrollback buffer on exit
2 participants