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 #2793. Windows Terminal still show vertical scroll bar using WindowsDriver. #2794

Merged

Conversation

BDisp
Copy link
Collaborator

@BDisp BDisp commented Aug 9, 2023

Fixes #2793 - Since WT doesn't allows resizing the buffer using Win32 API, we need to use the "\x1b[3J" escape sequence. This issue only happens running WindowsDriver on Windows Terminal. @tig please reconsider this because we mustn't allow WT breaking the back buffer because the scroll bar is enabled after resizing. With all others drivers this issue doesn't happens on WT.

Edit:
There is no need to use "\x1b[3J" but only "\x1b[?1049h" to activate alternate buffer on enter and "\x1b[?1049l" to disable alternate buffer on exit. Only valid for the Windows Terminal.

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

@BDisp BDisp requested a review from tig as a code owner August 9, 2023 00:13
@tig
Copy link
Collaborator

tig commented Aug 13, 2023

I think this finally fixes things!

Can you please address my review comment?

@BDisp
Copy link
Collaborator Author

BDisp commented Aug 13, 2023

I think this finally fixes things!

I also think so.

Can you please address my review comment?

@tig I don't see any review comment of your. Where it's?

@tig
Copy link
Collaborator

tig commented Aug 14, 2023

I think this finally fixes things!

I also think so.

Can you please address my review comment?

@tig I don't see any review comment of your. Where it's?

image

@BDisp
Copy link
Collaborator Author

BDisp commented Aug 14, 2023

@tig but do you know why I'm not seeing the reviews that is in the image in this PR?

Terminal.Gui/Core/Border.cs Outdated Show resolved Hide resolved
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs Outdated Show resolved Hide resolved
@tig
Copy link
Collaborator

tig commented Aug 14, 2023

Maybe I didn't submit correctly? I just tried again.

@BDisp
Copy link
Collaborator Author

BDisp commented Aug 14, 2023

For me the isWindowsTerminal only returns true if I run from the UICatalog WT profile or running from a Windows Terminal. Both I have to attach to the VS2022 if I want to debug.

@BDisp
Copy link
Collaborator Author

BDisp commented Aug 14, 2023

Thinking better, to really test if this PR does the job we want is better running on an open terminal to see the behavior after exit the app. If it's through VS2022 debugger we will not see that behavior. Run with different terminals.

@tig
Copy link
Collaborator

tig commented Aug 14, 2023

Thinking better, to really test if this PR does the job we want is better running on an open terminal to see the behavior after exit the app. If it's through VS2022 debugger we will not see that behavior. Run with different terminals.

I agree. This is how I do my testing.

@tig tig merged commit 140168b into gui-cs:develop Aug 14, 2023
1 check passed
@BDisp BDisp deleted the v1_windows-terminal-scroll-windowsdriver-fix_2793 branch August 14, 2023 22:14
@BDisp
Copy link
Collaborator Author

BDisp commented Aug 14, 2023

I agree. This is how I do my testing.

@tig can you use the mouse on ConEmu? I don't know if there is some setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows Terminal still show vertical scroll bar using WindowsDriver.
2 participants