Skip to content

Commit

Permalink
Maybe forcing an initial parse will fix this?
Browse files Browse the repository at this point in the history
  • Loading branch information
mhutch committed Sep 26, 2024
1 parent 6ba2032 commit 0ce559e
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Threading;
using System.Threading.Tasks;

using MonoDevelop.Xml.Editor.Tests.Extensions;
Expand All @@ -22,9 +23,10 @@ await this.TestCommands (
after,
EditorAction.Type (typeChars),
filename: filename,
initialize: (tv) => {
initialize: async (tv) => {
tv.Options.SetOptionValue ("BraceCompletion/Enabled", true);
return Task.CompletedTask;
// ensure we have an initial parse before triggering completion
await Catalog.MSBuildParserProvider.GetParser (tv.TextBuffer).GetOrProcessAsync (tv.TextBuffer.CurrentSnapshot, CancellationToken.None);
}
);
//} finally {
Expand Down

0 comments on commit 0ce559e

Please sign in to comment.