Skip to content
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

Handle if getCoords returns null in the AltClickHandler #1401

Merged
merged 3 commits into from
May 11, 2018

Conversation

npezza93
Copy link
Contributor

Fixes #1397

);

if (!coordinates) {
return null;
Copy link
Member

Choose a reason for hiding this comment

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

Since this is the constructor this should either be just return; or invert the if.

return null;
}

[this._endCol, this._endRow] = coordinates.map((coordinate: number) => {
Copy link
Member

Choose a reason for hiding this comment

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

It's think it's called like new AltClickHandler(...).move(), do we need to check _endCol/_endRow at the start of move?

@npezza93 npezza93 force-pushed the alt-click-map-bug branch from 987be0e to 4edbd50 Compare May 9, 2018 23:35
@Tyriar Tyriar added this to the 3.4.0 milestone May 11, 2018
@Tyriar Tyriar merged commit 139a246 into xtermjs:master May 11, 2018
@Tyriar
Copy link
Member

Tyriar commented May 11, 2018

Thanks @npezza93 😃

@npezza93 npezza93 deleted the alt-click-map-bug branch May 11, 2018 23:03
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.

2 participants