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

didChange should not require the range to be set #227

Closed
docwhat opened this issue Aug 15, 2018 · 1 comment
Closed

didChange should not require the range to be set #227

docwhat opened this issue Aug 15, 2018 · 1 comment
Assignees
Labels

Comments

@docwhat
Copy link

docwhat commented Aug 15, 2018

didChange should handle events that don't have the range and rangeLength set.

The documentation for a didChange event:

/**
 * An event describing a change to a text document. If range and rangeLength are omitted
 * the new text is considered to be the full content of the document.
 */
interface TextDocumentContentChangeEvent {
	/**
	 * The range of the document that changed.
	 */
	range?: Range;

	/**
	 * The length of the range that got replaced.
	 */
	rangeLength?: number;

	/**
	 * The new text of the range/document.
	 */
	text: string;
}

However, when using LanguageClient-neovim I get this error:

[Error] Notification handler 'textDocument/didChange' failed with message: Cannot read property 'start' of undefined

The only place in the code that invokes the property start is line 551 of server.ts.

@rcjsuen rcjsuen added the bug label Aug 15, 2018
@rcjsuen rcjsuen self-assigned this Aug 15, 2018
@rcjsuen
Copy link
Owner

rcjsuen commented Aug 16, 2018

@docwhat Thank you very much for the bug report. I have fixed the issue and it should be included in the next release of the language server.

Please do not hesitate to open up another issue if you find something else that seems off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants