DEV Community

Warun C. ⚡
Warun C. ⚡

Posted on

1

xTerm.js - Setting Scrollback to '9999999' for Enable scroll buffer.

Setting scrollback to infinite? #518

How is it possible to set the scrollback to be infinite? Basically, I want the CircularList to never overwrite old data and increase to the memory limits of the browser.

The scrollback buffer is used to store the data that has been typed into the terminal, but has not yet been scrolled off the screen.

Setting Scrollback!

scrollback is not buffer-size

The buffer-size property is used to control how much data can be stored in the terminal buffer, including the scrollback buffer.

{ 
  scrollback: 9999999,
  buffer-size: 9999999
}
Enter fullscreen mode Exit fullscreen mode

Example code in HTML

<!doctype html>
<html>
<head>
<script src= "node_modules/xterm/lib/xterm.js"></script>
</head>
<body>
<div id="terminal"></div>
<script>
var term = new Terminal ({ scrollback: 9999999 });
</script>
</body>
</html>

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay