You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct fix would be to produce a mapping span for zero-length token at least for the special case of a completely empty (zero-length) document. Modifying compiler is a bit risky though, so maybe there is a less impactful workaround.
Also a completely empty razor file is probably not that common in practice. I would say this is probably a lower priority bug, but something we should keep track of.
Also see #10610 for some discussion and a related fix.
The text was updated successfully, but these errors were encountered:
If you add an empty .razor or .cshtml file and try to invoke completion using Ctrl+Space or Ctrl+J, you get no results.
We should get HTML tags and tag helpers (and snippets)
If the document is completely empty (zero length, not even whitespace), the issue is that RazorHtmlWriter doesn't produce mapping spans for zero-length tokens, so position doesn't map to HTML. See https://github.com/dotnet/razor/blob/7b511df1710c54ab1a36ea5e422c7edd7bb29d20/src/Compiler/Microsoft.CodeAnalysis.Razor.Compiler/src/Language/RazorHtmlWriter.cs#L198C13-L198C35
Correct fix would be to produce a mapping span for zero-length token at least for the special case of a completely empty (zero-length) document. Modifying compiler is a bit risky though, so maybe there is a less impactful workaround.
Also a completely empty razor file is probably not that common in practice. I would say this is probably a lower priority bug, but something we should keep track of.
Also see #10610 for some discussion and a related fix.
The text was updated successfully, but these errors were encountered: