Skip to content

Cannot read property "split" of undefined, when pressing TAB #10754

Closed

Description

  • VSCode Version: 1.4.0
  • OS Version: Windows 10 14393.51

Steps to Reproduce:

  1. Load the sample code from below, set HTML as Language Mode
  2. Place cursor at Line 8, Col 5
  3. Press Tab
  4. Note message
<!DOCTYPE html>
<html lang="en">
    <head data-prerender-ignore="">
        <script type="text/javascript">
            var trackingConfig = {
                postId: "118290"
            }
    </script>

canttab

Activity

  1. changed the title [-]Cannot ready property "split" of undefined, when pressing TAB[/-] [+]Cannot read property "split" of undefined, when pressing TAB[/+] on Aug 21, 2016
  2. alexdima commented on Aug 22, 2016

    @alexdima
    Member

    Looks like it occurs in emmet's editorAccessor, which calls getModeIdAtPosition, that apparently returns null.

    image

  3. added
    bug
    editor-core
    on Aug 22, 2016
  4. ramamurthynagaraj commented on Aug 22, 2016

    @ramamurthynagaraj

    alexandrudima , created a PR for this issue.

    The issue can also be fixed by removing the optimization at https://github.com/Microsoft/vscode/blob/master/src/vs/editor/common/model/textModelWithTokens.ts#L495 which checks just the first element to be ModeTransition, but other elements are not. Let me know if this fix makes more sense than the PR I submitted, so that I can provide a PR for that as well.

  5. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugeditor-coreverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions