Skip to content

Commit

Permalink
! Workaround for VS 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed Aug 7, 2021
1 parent 4a3ecb1 commit 50a20e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Codist/CodistPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ protected override async System.Threading.Tasks.Task InitializeAsync(Cancellatio
Commands.NaviBarSearchDeclarationCommand.Initialize();
if (Config.Instance.InitStatus != InitStatus.Normal) {
Config.Instance.SaveConfig(Config.ConfigPath); // save the file to prevent this notification from reoccurrence
new Commands.VersionInfoBar(this).Show(Config.Instance.InitStatus);
try {
new Commands.VersionInfoBar(this).Show(Config.Instance.InitStatus);
}
catch (MissingMemberException) {
// HACK: ignore this for VS 2022 temporarily
}
if (Config.Instance.InitStatus == InitStatus.FirstLoad) {
// automatically load theme when first load
if (ThemeHelper.DocumentPageColor.ToWpfColor().IsDark()) {
Expand Down
2 changes: 1 addition & 1 deletion Codist/Helpers/TextEditorHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public static void CopyOrMoveSyntaxNode(this IWpfTextView view, SyntaxNode sourc
}
}
}
else if (String.Equals(sPath, CodistPackage.DTE.ActiveDocument.FullName, StringComparison.OrdinalIgnoreCase)) {
else if (String.Equals(sPath, view.TextBuffer.GetTextDocument()?.FilePath, StringComparison.OrdinalIgnoreCase)) {
// drag & drop from current file to external file
if (copy == false) {
using (var edit = view.TextBuffer.CreateEdit()) {
Expand Down

0 comments on commit 50a20e0

Please sign in to comment.