Skip to content

Commit 809f412

Browse files
TIHanbrettfo
authored andcommitted
Stop statusbar updates (#6339)
* Removed status bar updates until VS has a fix * Using underscores
1 parent 4b225e7 commit 809f412

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

vsintegration/src/FSharp.Editor/Navigation/GoToDefinition.fs

+24-21
Original file line numberDiff line numberDiff line change
@@ -115,38 +115,41 @@ type internal FSharpNavigableItem(document: Document, textSpan: TextSpan) =
115115
member __.DisplayTaggedParts = ImmutableArray<TaggedText>.Empty
116116
member __.ChildItems = ImmutableArray<INavigableItem>.Empty
117117

118+
// TODO: Uncomment code when VS has a fix for updating the status bar.
118119
type internal StatusBar(statusBar: IVsStatusbar) =
119-
let mutable searchIcon = int16 Microsoft.VisualStudio.Shell.Interop.Constants.SBAI_Find :> obj
120+
let mutable _searchIcon = int16 Microsoft.VisualStudio.Shell.Interop.Constants.SBAI_Find :> obj
120121

121-
let clear() =
122+
let _clear() =
122123
// unfreeze the statusbar
123124
statusBar.FreezeOutput 0 |> ignore
124125
statusBar.Clear() |> ignore
125126

126-
member __.Message(msg: string) =
127-
let _, frozen = statusBar.IsFrozen()
128-
// unfreeze the status bar
129-
if frozen <> 0 then statusBar.FreezeOutput 0 |> ignore
130-
statusBar.SetText msg |> ignore
131-
// freeze the status bar
132-
statusBar.FreezeOutput 1 |> ignore
133-
134-
member this.TempMessage(msg: string) =
135-
this.Message msg
136-
async {
137-
do! Async.Sleep 4000
138-
match statusBar.GetText() with
139-
| 0, currentText when currentText <> msg -> ()
140-
| _ -> clear()
141-
}|> Async.Start
127+
member __.Message(_msg: string) =
128+
()
129+
//let _, frozen = statusBar.IsFrozen()
130+
//// unfreeze the status bar
131+
//if frozen <> 0 then statusBar.FreezeOutput 0 |> ignore
132+
//statusBar.SetText msg |> ignore
133+
//// freeze the status bar
134+
//statusBar.FreezeOutput 1 |> ignore
135+
136+
member this.TempMessage(_msg: string) =
137+
()
138+
//this.Message msg
139+
//async {
140+
// do! Async.Sleep 4000
141+
// match statusBar.GetText() with
142+
// | 0, currentText when currentText <> msg -> ()
143+
// | _ -> clear()
144+
//}|> Async.Start
142145

143-
member __.Clear() = clear()
146+
member __.Clear() = () //clear()
144147

145148
/// Animated magnifying glass that displays on the status bar while a symbol search is in progress.
146149
member __.Animate() : IDisposable =
147-
statusBar.Animation (1, &searchIcon) |> ignore
150+
//statusBar.Animation (1, &searchIcon) |> ignore
148151
{ new IDisposable with
149-
member __.Dispose() = statusBar.Animation(0, &searchIcon) |> ignore }
152+
member __.Dispose() = () } //statusBar.Animation(0, &searchIcon) |> ignore }
150153

151154
type internal GoToDefinition(checker: FSharpChecker, projectInfoManager: FSharpProjectOptionsManager) =
152155
let userOpName = "GoToDefinition"

0 commit comments

Comments
 (0)