Remove cols/rows from internal term.options#3968
Closed
silamon wants to merge 3 commits intoxtermjs:masterfrom
silamon:rowscolsremoval
Closed
Remove cols/rows from internal term.options#3968silamon wants to merge 3 commits intoxtermjs:masterfrom silamon:rowscolsremoval
silamon wants to merge 3 commits intoxtermjs:masterfrom
silamon:rowscolsremoval
Conversation
Tyriar
requested changes
Jul 30, 2022
Comment on lines
-1403
to
-1417
| 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); | ||
| }); | ||
| }); |
Member
There was a problem hiding this comment.
We'll still want to keep these tests, just change to use different options
src/common/services/BufferService.ts
Outdated
Comment on lines
+39
to
+40
| this.cols = Math.max(80 || 0, MINIMUM_COLS); | ||
| this.rows = Math.max(24 || 0, MINIMUM_ROWS); |
Member
There was a problem hiding this comment.
Do the initial dimensions need to be passed into the ctor now?
Contributor
Author
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.