Skip to content

Commit

Permalink
fix contentmodified exception in lsp?
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikMennen committed Jul 24, 2024
1 parent f7a56a0 commit 051f5c5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using CommunityToolkit.Mvvm.Input;
using DynamicData;
using DynamicData.Binding;
using ImTools;
using OmniSharp.Extensions.LanguageServer.Protocol.Models;
using OneWare.Essentials.EditorExtensions;
using OneWare.Essentials.Extensions;
Expand Down Expand Up @@ -461,8 +462,10 @@ protected virtual async Task UpdateSemanticTokensAsync()

protected virtual async Task UpdateInlayHintsAsync()
{
if (CodeBox.Document.LineCount == 0) return;

var inlayHintContainer =
await Service.RequestInlayHintsAsync(CurrentFile.FullPath, new Range(0, 0, CodeBox.Document.LineCount, 0));
await Service.RequestInlayHintsAsync(CurrentFile.FullPath, new Range(0, 0, CodeBox.Document.LineCount, CodeBox.Document.GetLineByNumber(CodeBox.Document.LineCount).Length));

if (inlayHintContainer is not null)
Editor.Editor.InlayHintGenerator.SetInlineHints(inlayHintContainer.Select(x => new InlayHint
Expand Down

0 comments on commit 051f5c5

Please sign in to comment.