GithubHelp home page GithubHelp logo

No scroll bar on terminal about xterm.js HOT 6 CLOSED

Tyriar avatar Tyriar commented on May 10, 2024 6
No scroll bar on terminal

from xterm.js.

Comments (6)

Tyriar avatar Tyriar commented on May 10, 2024 3

@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.

from xterm.js.

Tyriar avatar Tyriar commented on May 10, 2024 1

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

from xterm.js.

parisk avatar parisk commented on May 10, 2024

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.

from xterm.js.

Tyriar avatar Tyriar commented on May 10, 2024

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

from xterm.js.

Tyriar avatar Tyriar commented on May 10, 2024

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 #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

from xterm.js.

parisk avatar parisk commented on May 10, 2024

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

from xterm.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.