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

validate end positions before calling lineAt #9

Merged
merged 1 commit into from
Sep 13, 2016
Merged

validate end positions before calling lineAt #9

merged 1 commit into from
Sep 13, 2016

Conversation

HookyQR
Copy link

@HookyQR HookyQR commented Sep 10, 2016

This stops the multitude of exceptions thrown when deleting the last line of text in the editor.

@shardulm94
Copy link
Owner

Hi @HookyQR,
Thanks for your pull request. I should be able to review and merge this in the next few days.

@shardulm94
Copy link
Owner

shardulm94 commented Sep 13, 2016

@HookyQR Can you help me reproduce this issue? I was not able to reproduce it.

@HookyQR
Copy link
Author

HookyQR commented Sep 13, 2016

  • Open a new window.
  • Toggle Dev Tools (Help -> Toggle Dev Tools)
  • In the editor window, hit Enter, then backspace.

Result (In Dev tools console):

shell.ts:428
Illegal value for `line`: Error: Illegal value for `line`
    at t.lineAt (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:11:15517)
    at Object._document.lineAt (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:11:14525)
    at TrailingSpaces.matchTrailingSpaces (/Users/hooky/.vscode/extensions/shardulm94.trailing-spaces-0.2.10/out/src/trailing-spaces/trailing-spaces.js:231:95)
    at /Users/hooky/.vscode/extensions/shardulm94.trailing-spaces-0.2.10/out/src/trailing-spaces/trailing-spaces.js:72:27
    at e.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:6:13653)
    at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:6:15829)
    at t.$acceptModelChanged (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:11:13505)
    at t.e.handle (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:10:22905)
    at s (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:7:30449)
    at p (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:7:31126)

@shardulm94 shardulm94 merged commit 16fb1a0 into shardulm94:master Sep 13, 2016
@shardulm94
Copy link
Owner

Thanks again for the pull! The update has been published.

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