question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Calling `XTerm.fit` with a non-visable terminal results in thrown error

See original GitHub issue

Details

  • Electron: 9.1.2
  • Chrome: 83.0.4103.122
  • OS version: macos 10.15
  • xterm.js version: 4.9.0

Steps to reproduce

  1. Have the terminal not being rendered
  2. Using the FitAddon call fit()
  3. Observe the This API only accepts integers error.

Seems like this has regressed from #525 but that was over 3 years ago (with at least one major refactor) so I couldn’t find when this happened.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jerchcommented, Jun 30, 2022
1reaction
enncycommented, Mar 7, 2022

I thank that’s the best way to use FitAddon :

const dimensions = fitAddon.proposeDimensions();
if (dimensions?.cols && dimensions?.rows) {
    xterm.resize(dimensions.cols, dimensions.rows);
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

xterm-for-react with xterm-addon-fit throws unable to read ...
I am using xterm-for-react for terminal integration and I want to resize that terminal window as my wrapper div tag around the component ......
Read more >
Change-Log for NCURSES - Thomas E. Dickey
20210731 + add extensions in xterm+tmux and ecma+strikeout to ms-terminal, ... tputs' error check to allow it to be used without first calling...
Read more >
xterm.js in EcnlProtoTool/trunk/webapp/webmrbc/xterm/src
57, * http://invisible-island.net/xterm/ctlseqs/ctlseqs.html ... 800, throw new Error('Terminal requires a parent element.');.
Read more >
Parser Hooks & Terminal Sequences - Xterm.js
For every finished sequence the parser stops parsing and calls the attached sequence handlers (in-band processing). The sequence handlers are hookable (“parser ...
Read more >
curses — Terminal handling for character-cell displays ...
The module curses defines the following exception: exception curses.error¶. Exception raised when a curses library function returns an ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found