Skip to content

validate end positions before calling lineAt - #9

Merged
shardulm94 merged 1 commit into
shardulm94:masterfrom
HookyQR:master
Sep 13, 2016
Merged

validate end positions before calling lineAt#9
shardulm94 merged 1 commit into
shardulm94:masterfrom
HookyQR:master

Conversation

@HookyQR

@HookyQR HookyQR commented Sep 10, 2016

Copy link
Copy Markdown

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

@shardulm94

Copy link
Copy Markdown
Owner

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

@shardulm94

shardulm94 commented Sep 13, 2016

Copy link
Copy Markdown
Owner

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

@HookyQR

HookyQR commented Sep 13, 2016

Copy link
Copy Markdown
Author
  • 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
Copy Markdown
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