Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

[release-7.8] Retrieve editor markup on the UI thread. Fixes F# tooltips. #7283

Merged
merged 1 commit into from
Mar 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,16 @@ module Highlight =
|> Async.AwaitTask
|> Async.RunSynchronously

let syntaxHighlight s =
Runtime.RunInMainThread(fun() -> editor.Text <- s) |> Async.AwaitTask |> Async.RunSynchronously
let getHighlightedMarkup s =
editor.Text <- s
let data = editor.GetContent<ITextEditorDataProvider>().GetTextEditorData()
data.GetMarkup(0, s.Length, false, true, false, true)

let syntaxHighlight s =
Runtime.RunInMainThread (fun () -> getHighlightedMarkup s)
|> Async.AwaitTask
|> Async.RunSynchronously

let asUnderline = sprintf "_STARTUNDERLINE_%s_ENDUNDERLINE_" // we replace with real markup after highlighting

module SymbolTooltips =
Expand Down