Skip to content

Commit

Permalink
Merge pull request #4078 from Tyriar/fix_demo_resize
Browse files Browse the repository at this point in the history
Fix resize on demo
  • Loading branch information
Tyriar committed Aug 28, 2022
2 parents 3105797 + 0237b29 commit 823f734
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion demo/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,11 @@ function initOptions(term: TerminalType): void {
const input = <HTMLInputElement>document.getElementById(`opt-${o}`);
addDomListener(input, 'change', () => {
console.log('change', o, input.value);
if (o === 'lineHeight') {
if (o === 'rows') {
term.resize(term.cols, parseInt(input.value));
} else if (o === 'cols') {
term.resize(parseInt(input.value), term.rows);
} else if (o === 'lineHeight') {
term.options.lineHeight = parseFloat(input.value);
} else if (o === 'scrollSensitivity') {
term.options.scrollSensitivity = parseFloat(input.value);
Expand Down

0 comments on commit 823f734

Please sign in to comment.