File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ private async Task UpdateColoursFromFontsAndColorsAsync()
8282 {
8383 await ThreadHelper . JoinableTaskFactory . SwitchToMainThreadAsync ( ) ;
8484 var success = fontAndColorStorage . OpenCategory ( ref categoryWithCoverage , storeFlags ) ;
85+ var usedFontsAndColors = false ;
8586 if ( success == VSConstants . S_OK )
8687 {
8788 // https://github.com/microsoft/vs-threading/issues/993
@@ -101,14 +102,21 @@ System.Windows.Media.Color GetColor(string displayName)
101102 CoverageTouchedArea = GetColor ( "Coverage Touched Area" ) ;
102103 CoverageNotTouchedArea = GetColor ( "Coverage Not Touched Area" ) ;
103104 CoveragePartiallyTouchedArea = GetColor ( "Coverage Partially Touched Area" ) ;
105+ usedFontsAndColors = true ;
106+
104107 } catch ( NotSupportedException )
105108 {
106109 logger . Log ( "No coverage settings available from Fonts and Colors" ) ;
107110 }
108111 }
109- canUseFontsAndColours = false ;
110- UseDefaultColours ( ) ;
112+
111113 fontAndColorStorage . CloseCategory ( ) ;
114+ if ( ! usedFontsAndColors )
115+ {
116+ canUseFontsAndColours = false ;
117+ UseDefaultColours ( ) ;
118+ }
119+
112120 }
113121
114122 private System . Windows . Media . Color ParseColor ( uint color )
You can’t perform that action at this time.
0 commit comments