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

'Unnecessary' hint fades out only first token #53099

Closed
chrmarti opened this issue Jun 27, 2018 · 2 comments
Closed

'Unnecessary' hint fades out only first token #53099

chrmarti opened this issue Jun 27, 2018 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug languages-diagnostics Source problems reporting verified Verification succeeded

Comments

@chrmarti
Copy link
Contributor

chrmarti commented Jun 27, 2018

Issue Type: Bug

Testing #52218

The 'unnecessary' hint spans the entire document, only the first token is faded:
image

VS Code version: Code - Insiders 1.25.0-insider (f2fa6be, 2018-06-27T05:11:02.122Z)
OS version: Darwin x64 17.6.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (1.15GB free)
Process Argv /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron --extensions-dir /Users/chrmarti/Development/repos/tmp/ext --user-data-dir /Users/chrmarti/Development/repos/tmp/user
Screen Reader no
VM 20%
Extensions: none
@chrmarti chrmarti added the languages-diagnostics Source problems reporting label Jun 27, 2018
@jrieken jrieken removed their assignment Jun 27, 2018
@Gama11
Copy link
Contributor

Gama11 commented Jul 12, 2018

Are there plans to address this in the near future (since it's not assigned to a milestone or tagged as a bug)?

I ran into this when trying to use the new API to fade out inactive conditional compilation blocks in the Haxe extension.

I noticed that if the severity is != Hint, the fading also works properly across the entire range:

Of course, that leaves you with some undesirable squiggly lines, so it's not very useful in practice - but maybe it helps with finding the source of the bug.


Some test code I wrote to isolate it (before finding this issue):

import * as vscode from "vscode";

export function activate(context: vscode.ExtensionContext) {
	var diagnostics = vscode.languages.createDiagnosticCollection("foo");
	vscode.window.onDidChangeActiveTextEditor(editor => {
		if (editor != null) {
			var doc = editor.document;
			var range = new vscode.Range(new vscode.Position(0, 0), new vscode.Position(doc.lineCount, doc.lineAt(doc.lineCount - 1).lineNumber));
			var diagnostic = new vscode.Diagnostic(range, "Inactive section", vscode.DiagnosticSeverity.Hint);
			diagnostic.tags = [vscode.DiagnosticTag.Unnecessary];
			diagnostics.set(editor.document.uri, [diagnostic]);
		}
	});
}

@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Jul 12, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Sep 5, 2018

Fixed by e659ffd

@mjbvz mjbvz closed this as completed Sep 5, 2018
@mjbvz mjbvz added this to the September 2018 milestone Sep 5, 2018
@roblourens roblourens added the verified Verification succeeded label Sep 27, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 20, 2018
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 languages-diagnostics Source problems reporting verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants