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

convertOutputPositionToInputPosition can throw 'Not supported' when landing in an invisible line #3662

Closed
alexdima opened this issue Mar 3, 2016 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Milestone

Comments

@alexdima
Copy link
Member

alexdima commented Mar 3, 2016

fyi @egamma

@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority stable-candiate labels Mar 3, 2016
@alexdima alexdima self-assigned this Mar 3, 2016
@alexdima alexdima added this to the Feb 2016 milestone Mar 3, 2016
@alexdima
Copy link
Member Author

alexdima commented Mar 3, 2016

From unit tests, I could find a reproducible case. It happens when the last line in a model is folded (hidden). Have a javascript file:

something {
  asd
  asd
  asd
  asd }
  • Place cursor at the end of the first line (such that you get bracket matching)
  • Fold the region
  • Observe error:
Not supported: Error: Not supported
    at IdentitySplitLine.getOutputLineMaxColumn (file:///C:/Alex/src/vscode/out/vs/editor/common/viewModel/splitLinesCollection.js:41:23)
    at SplitLinesCollection.getOutputLineMaxColumn (file:///C:/Alex/src/vscode/out/vs/editor/common/viewModel/splitLinesCollection.js:482:42)
    at ViewModel.getLineMaxColumn (file:///C:/Alex/src/vscode/out/vs/editor/common/viewModel/viewModel.js:312:31)
    at View.getCenteredRangeInViewport (file:///C:/Alex/src/vscode/out/vs/editor/browser/view/viewImpl.js:454:107)
    at CodeEditorWidget.getCenteredRangeInViewport (file:///C:/Alex/src/vscode/out/vs/editor/browser/widget/codeEditorWidget.js:87:31)
    at ViewModel.getCurrentCenteredModelRange (file:///C:/Alex/src/vscode/out/vs/editor/common/commonCodeEditor.js:539:146)
    at file:///C:/Alex/src/vscode/out/vs/editor/common/viewModel/viewModel.js:125:56
    at ViewModel.EventEmitter.deferredEmit (file:///C:/Alex/src/vscode/out/vs/base/common/eventEmitter.js:230:26)
    at ViewModel.onEvents (file:///C:/Alex/src/vscode/out/vs/editor/common/viewModel/viewModel.js:121:18)
    at Array.<anonymous> (file:///C:/Alex/src/vscode/out/vs/editor/common/viewModel/viewModel.js:117:102)

@alexdima
Copy link
Member Author

alexdima commented Mar 3, 2016

@egamma It can also happen when the first line is collapsed. It is not clear to me how you got in this state, but it looks like your first line was collapsed in the editor view state:

"contributionsState": {
    "editor.contrib.folding": [
        {
            "startLineNumber": 1,
            "endLineNumber": 5,
            "indent": 0,
            "isCollapsed": true
        },

@alexdima
Copy link
Member Author

alexdima commented Mar 3, 2016

fyi @aeschli

@egamma
Copy link
Member

egamma commented Mar 3, 2016

goodness!

@alexdima alexdima assigned aeschli and unassigned alexdima Mar 21, 2016
@aeschli aeschli added the verified Verification succeeded label Mar 21, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants