From 3576f42cde61f37a6d6ce9407da754ed943830cd Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Wed, 14 Jun 2017 18:20:00 +0200 Subject: [PATCH] GH-302, GH-421 Force activate app when using CLI tool --- VimR/AppDelegate.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VimR/AppDelegate.swift b/VimR/AppDelegate.swift index 331c0d52..3b88904e 100644 --- a/VimR/AppDelegate.swift +++ b/VimR/AppDelegate.swift @@ -231,6 +231,9 @@ extension AppDelegate { _ = Darwin.close(Darwin.open(pipePath, O_WRONLY)) } + // If we don't do this, the window is active, but not in front. + NSApp.activate(ignoringOtherApps: true) + switch action { case .activate, .newWindow: