Comments (6)
@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.
https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm/js/hterm_scrollport.js
from xterm.js.
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.
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.
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
andline-height
explicitly on.xterm-rows
(will resolve #149) - Wrap
.xterm-rows
in a.xterm-viewport
element which hasoverflow-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 ony
,ybase
andydisp
from xterm.js.
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)
- Name colours (e.g. "red", "blue") no longer work in 5.4.0 in browser if global `process` variable is defined HOT 3
- Debian 12, xtermjs comes up in page but will not take any input.... HOT 2
- Vercel deployment error HOT 7
- Introduce a stable line ID that continues to increment after being trimmed
- w and # are getting rescaled unexpectedly HOT 1
- Uncaught exception in `syncScrollArea`: reading `dimensions` property of `undefined` HOT 1
- invalid identity escape in regular expression HOT 1
- Unexpected issue regarding `addon-fit` when used in React
- Unable to clear terminal using clear method HOT 8
- Duplicate input when using Chinese input methods
- Vscode sending "\n" instead of "^J" with "\u000A"? HOT 1
- Fit-addon is not compatible with SSR/prerendering HOT 1
- Terminal Image display has low resolution HOT 1
- _smoothScroll seems to occur more than once per frame
- It is not possible to move the cursor outside the active buffer using ANSI commands
- RIS is undocumented in vt functions doc
- @xterm/addon-web-links doesn't support blob URL (URI)
- Support for wider color spaces? HOT 1
- Ctrl+c in terminal does not scroll to the very bottom HOT 1
- Xterm.onResize cannot receive correct data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xterm.js.