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

Hover broken in 1.16.0-insider #31

Closed
stef-levesque opened this issue Aug 29, 2017 · 4 comments
Closed

Hover broken in 1.16.0-insider #31

stef-levesque opened this issue Aug 29, 2017 · 4 comments
Labels

Comments

@stef-levesque
Copy link
Owner

The hover message is now broken in the 1.16.0-insider version of VSCode. The 1.15.1 version is fine.

The hover content is defined in extension.ts and the coloration from hexdump.tmLanguage

return new vscode.Hover( {language: 'hexdump', value: "content"} );

@jrieken @dbaeumer
Could this come from microsoft/vscode#29076 ?
Is it possible that Hover doesnt take extention .tmLanguage anymore ?
Anyway to reproduce the same colorization with a MarkdownString ?

image

image

@jrieken
Copy link

jrieken commented Aug 30, 2017

Thanks, I will investigate. We did refactor some bits but everything should still work...

@stef-levesque
Copy link
Owner Author

stef-levesque commented Aug 30, 2017

fwiw, it seems to always assume a MarkedString, or MarkdownString, whatever the language set.

For example, this display with the hexdump color syntax:

content = '```hexdump\n' + content + '\n```\n';
return new vscode.Hover( {language: 'plaintext', value: content} );

@jrieken
Copy link

jrieken commented Aug 30, 2017

Yeah, it's is fixed on master. The problem is that the new MarkdownString has value and isTrusted and that this function also accepts a MarkedString

export function isMarkdownString(thing: any): thing is IMarkdownString {
	if (thing instanceof MarkdownString) {
		return true;
	} else if (typeof thing === 'object') {
		return typeof (<IMarkdownString>thing).value === 'string'
			&& (typeof (<IMarkdownString>thing).isTrusted === 'boolean' || (<IMarkdownString>thing).isTrusted === void 0);
	}
	return false;
}

@stef-levesque
Copy link
Owner Author

Now fixed in 1.16.0-insider

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