Skip to content

Commit

Permalink
fix #29
Browse files Browse the repository at this point in the history
  • Loading branch information
yatli committed Jul 9, 2019
1 parent 5038f3e commit 07c5b35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ module Program =
extKey.SetValue("", progId)
}


// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
[<EntryPoint>]
[<CompiledName "Main">]
let main(args: string[]) =
Expand All @@ -103,6 +99,8 @@ module Program =
builder.Instance.ApplicationLifetime <- lifetime
let _ = builder.SetupWithoutStarting()

// Avalonia is initialized. SynchronizationContext-reliant code should be working by now;

AppDomain.CurrentDomain.UnhandledException.Add(fun exArgs ->
let filename = Path.Combine(config.configdir, sprintf "fvim-crash-%s.txt" (DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss")))
use dumpfile = new StreamWriter(filename)
Expand Down
2 changes: 1 addition & 1 deletion neovim/neovim.rpc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ type Process() =
| _, Some(_) -> failwith "neovim: already started"
| _ -> ()

let args = "--embed" :: args
let args = "--embed" :: (List.map (fun (x: string) -> if x.Contains(' ') then "'" + x + "'" else x) args)
let psi = ProcessStartInfo(prog, String.Join(" ", preargs @ args))
psi.CreateNoWindow <- true
psi.ErrorDialog <- false
Expand Down

0 comments on commit 07c5b35

Please sign in to comment.