-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add terminal scroll commands. #7179
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified and it works correctly, the keybindings allow me to easily navigate the terminal
when there is a lot of content (scrollbar exists).
packages/terminal/src/browser/terminal-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
packages/terminal/src/browser/terminal-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
packages/terminal/src/browser/terminal-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
packages/terminal/src/browser/terminal-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
packages/terminal/src/browser/terminal-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
(this.shell.activeWidget as TerminalWidget).scrollLineDown(); | ||
} | ||
}); | ||
commands.registerCommand(TerminalCommands.SCROLL_TO_TOP, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AndrienkoAleksandr are we missing the keybinding for the opposite Scroll To Bottom
?
It looks like it works by using End
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello. I don't know how, but it already works by End
... Strange... That's why I didn't apply this command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello. I don't know how, but it already works by
End
... Strange... That's why I didn't apply this command.
That's what I noticed as well, End already worked correctly, perhaps we can omit it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, I think we can omit it. If somebody will report issue, we can fix it easily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a small comment regarding the new abstract
methods, please don't forget to squash :)
The functionality works well for me.
@@ -38,6 +38,16 @@ export abstract class TerminalWidget extends BaseWidget { | |||
|
|||
abstract onDidOpen: Event<void>; | |||
|
|||
abstract scrollLineUp(): void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A breaking change note is required (changelog
) for these new abstract
methods.
Anyone currently implementing TerminalWidget
will be broken by the following changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nobody should implement TerminalWidget
, we should rather get rid of boilerplate interface later: https://github.com/eclipse-theia/theia/wiki/Coding-Guidelines#classes-over-interfaces
In other words it looks fine if it is not optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested - it works well for me!
nice improvement, @AndrienkoAleksandr !
@AndrienkoAleksandr it looks good to me, do you plan to change something else? |
6e47981
to
39cc17b
Compare
I am going to merge it today, if you don't mind. |
@AndrienkoAleksandr as usual remove commits which fix issues introduced by a PR and feel free to merge |
Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
39cc17b
to
46ad80f
Compare
Add terminal scroll commands.
What it does
Add terminal scroll commands:
How to test
Review checklist
Reminder for reviewers
Signed-off-by: Oleksandr Andriienko oandriie@redhat.com