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

editor.getWord() fails when it's the first word of the file #2140

Closed
th3coop opened this issue Nov 9, 2016 · 0 comments
Closed

editor.getWord() fails when it's the first word of the file #2140

th3coop opened this issue Nov 9, 2016 · 0 comments
Assignees
Milestone

Comments

@th3coop
Copy link
Member

th3coop commented Nov 9, 2016

Short Summary

ko/editor.getWord() fails when you are on the first word of the file.

Steps to Reproduce

  • Create a file
  • add a word to it (it must be on the first line)
  • put your cursor in that word
  • run require("ko/editor").getWord()

Expected results

THe command to run

Actual results

  • Command will fail in the console with no error

Additional Information

NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "Error calling method on NPObject!" {file: "file:///C:/mozbuilds/IDE-10.10/moz3500-ko10.10/mozilla/ko-rel/dist/bin/components/scimoz_wrapper.js" line: 2922}]'[JavaScript Error: "Error calling method on NPObject!" {file: "file:///C:/mozbuilds/IDE-10.10/moz3500-ko10.10/mozilla/ko-rel/dist/bin/components/scimoz_wrapper.js" line: 2922}]' when calling method: [ISciMoz::getTextRange]

You actually get more information if you put it in an EJS block in a snippet:
capture

@th3coop th3coop added this to the 10.2 milestone Nov 9, 2016
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

No branches or pull requests

2 participants