Skip to content

cache buffer to fix VS Code issue #111562 - #3203

Merged
Tyriar merged 1 commit into
xtermjs:masterfrom
meganrogge:master
Jan 4, 2021
Merged

Tyriar merged 1 commit into
xtermjs:masterfrom
meganrogge:master

Conversation

@meganrogge

@meganrogge meganrogge commented Jan 4, 2021 •

Copy link
Copy Markdown
Member

@meganrogge meganrogge changed the title cache buffer to fix #111562 cache buffer to fix VS Code issue #111562 Jan 4, 2021
@Tyriar Tyriar added this to the 4.10.0 milestone Jan 4, 2021

@Tyriar Tyriar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Tyriar
Tyriar merged commit 4de6f1c into xtermjs:master Jan 4, 2021

@mofux mofux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking over the merged PR I think I found this not to be working as expected. Please see the comment for details.

@meganrogge @Tyriar

Comment on lines +62 to +65
if (!this._buffer) {
return new BufferNamespaceApi(this._core.buffers);
}
return this._buffer;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this fix doesn't work because this._buffer is never assigned. I think it should have been:

if (!this._buffer) {
  this._buffer = new BufferNamespaceApi(this._core.buffers);
}
return this._buffer;

@meganrogge meganrogge Jan 4, 2021 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes you're absolutely correct. i'll create another pull request now to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants