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

No scroll bar on terminal #77

Closed
Tyriar opened this issue Jun 2, 2016 · 6 comments
Closed

No scroll bar on terminal #77

Tyriar opened this issue Jun 2, 2016 · 6 comments
Assignees
Labels
type/enhancement Features or improvements to existing features
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Jun 2, 2016

It would be great if a virtual scroll bar was provided.

@parisk parisk added the type/enhancement Features or improvements to existing features label Jun 2, 2016
@parisk
Copy link
Contributor

parisk commented Jun 2, 2016

The terminal scrolling definitely needs an enhancement and physical scrolling with a scrollbar would be a great addition. The only tricky thing to do there is handling switching back and forth with curses applications like Vim.

@Tyriar
Copy link
Member Author

Tyriar commented Jul 15, 2016

hterm handles the scrollbar really well but only has the currently displayed viewport in the DOM. We should see how they implement it.

@Tyriar
Copy link
Member Author

Tyriar commented Jul 15, 2016

https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm/js/hterm_scrollport.js

@Tyriar
Copy link
Member Author

Tyriar commented Aug 2, 2016

I'm going to work on this as part of vscode 1.5.0, the current rough plan/approach is:

  • Detect row height and set height and line-height explicitly on .xterm-rows (will resolve Lines containing unicode characters differ in height #149)
  • Wrap .xterm-rows in a .xterm-viewport element which has overflow-y: scroll
  • Create an .xterm-scroll-area element which sizes based on the total number of rows in the buffer, this will be invisible but will position itself based on y, ybase and ydisp

@parisk
Copy link
Contributor

parisk commented Aug 3, 2016

Sounds 👍 . What is the purpose of .xterm-scroll-area element though? Will it be used for the displaying of the scroll bar?

@Tyriar
Copy link
Member Author

Tyriar commented Aug 3, 2016

@parisk yes, it's a large element that's programmatically sized and is used for the scrollbar. After playing with this implementation I ended up getting it working but needed to pull .xterm-rows out of .xterm-viewport, otherwise every refresh would recall the scroll method. That made it very difficult to handle the 3 scroll cases; wheel, drag and drop scroll bar and up/down arrows.

I'll probably put out a PR later today.

@Tyriar Tyriar mentioned this issue Aug 3, 2016
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Features or improvements to existing features
Projects
None yet
Development

No branches or pull requests

2 participants