-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Remove cols/rows from internal term.options #3968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Tyriar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also aligns xterm with xterm-headless after #3960.
Opps 🤦
| describe('options', () => { | ||
| beforeEach(async () => { | ||
| term = new TestTerminal({}); | ||
| }); | ||
| it('get options', () => { | ||
| assert.equal(term.options.cols, 80); | ||
| assert.equal(term.options.rows, 24); | ||
| }); | ||
| it('set options', async () => { | ||
| term.options.cols = 40; | ||
| assert.equal(term.options.cols, 40); | ||
| term.options.rows = 20; | ||
| assert.equal(term.options.rows, 20); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll still want to keep these tests, just change to use different options
src/common/services/BufferService.ts
Outdated
| this.cols = Math.max(80 || 0, MINIMUM_COLS); | ||
| this.rows = Math.max(24 || 0, MINIMUM_ROWS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the initial dimensions need to be passed into the ctor now?
|
Removing cols/rows from ITerminalOptions isn't going to work. Closing this PR and we will have to keep rows and cols in the internal ITerminalOptions. |
This branch helps towards #3948. Keeping terminal.rows/terminal.cols and terminal.options.rows/terminal.options.cols in sync shouldn't be a problem then.
Also aligns xterm with xterm-headless after #3960.