diff --git a/MsgPackRpc/MsgPackRpc.xcodeproj/project.pbxproj b/MsgPackRpc/MsgPackRpc.xcodeproj/project.pbxproj
index 42eacf0d..62efbbc7 100644
--- a/MsgPackRpc/MsgPackRpc.xcodeproj/project.pbxproj
+++ b/MsgPackRpc/MsgPackRpc.xcodeproj/project.pbxproj
@@ -218,7 +218,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 246;
+ CURRENT_PROJECT_VERSION = 247;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -278,7 +278,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 246;
+ CURRENT_PROJECT_VERSION = 247;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -308,7 +308,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 246;
+ DYLIB_CURRENT_VERSION = 247;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = MsgPackRpc/Info.plist;
@@ -331,7 +331,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 246;
+ DYLIB_CURRENT_VERSION = 247;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = MsgPackRpc/Info.plist;
diff --git a/MsgPackRpc/MsgPackRpc/Info.plist b/MsgPackRpc/MsgPackRpc/Info.plist
index f420cad5..6fd9eac0 100644
--- a/MsgPackRpc/MsgPackRpc/Info.plist
+++ b/MsgPackRpc/MsgPackRpc/Info.plist
@@ -15,9 +15,9 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- SNAPSHOT-246
+ SNAPSHOT-247
CFBundleVersion
- 246
+ 247
NSHumanReadableCopyright
Copyright © 2017 Tae Won Ha. All rights reserved.
NSPrincipalClass
diff --git a/MsgPackRpc/MsgPackRpc/MsgPackRpc.swift b/MsgPackRpc/MsgPackRpc/MsgPackRpc.swift
index 5c91007e..24d2bd65 100644
--- a/MsgPackRpc/MsgPackRpc/MsgPackRpc.swift
+++ b/MsgPackRpc/MsgPackRpc/MsgPackRpc.swift
@@ -67,8 +67,6 @@ public class Connection {
expectsReturnValue: Bool)
-> MsgPackRpc.Response {
-
-
let packed = pack(
[
.uint(UInt64(type)),
diff --git a/NvimMsgPack.playground/Contents.swift b/NvimMsgPack/NvimMsgPack.playground/Contents.swift
similarity index 88%
rename from NvimMsgPack.playground/Contents.swift
rename to NvimMsgPack/NvimMsgPack.playground/Contents.swift
index 78338f1a..13cb06e0 100644
--- a/NvimMsgPack.playground/Contents.swift
+++ b/NvimMsgPack/NvimMsgPack.playground/Contents.swift
@@ -11,7 +11,7 @@ guard let nvim = NvimApi(at: "/tmp/nvim.sock") else {
nvim.connect()
-if nvim.getMode().value?.dictionaryValue?[.string("blocked")]?.boolValue == true {
+if nvim.getMode().value?["blocking"]?.boolValue == true {
print("blocked!")
} else {
print("not blocked!")
diff --git a/NvimMsgPack.playground/contents.xcplayground b/NvimMsgPack/NvimMsgPack.playground/contents.xcplayground
similarity index 100%
rename from NvimMsgPack.playground/contents.xcplayground
rename to NvimMsgPack/NvimMsgPack.playground/contents.xcplayground
diff --git a/NvimMsgPack/NvimMsgPack.xcodeproj/project.pbxproj b/NvimMsgPack/NvimMsgPack.xcodeproj/project.pbxproj
index f2b0cec9..0e17b74c 100644
--- a/NvimMsgPack/NvimMsgPack.xcodeproj/project.pbxproj
+++ b/NvimMsgPack/NvimMsgPack.xcodeproj/project.pbxproj
@@ -28,6 +28,7 @@
4B9E33801FCB47F900E0C4BC /* Result.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Result.h; sourceTree = ""; };
4B9E33811FCB47F900E0C4BC /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = ""; };
4B9E33821FCB47F900E0C4BC /* ResultProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResultProtocol.swift; sourceTree = ""; };
+ 4BC8843F1FDC6A45000E95A2 /* NvimMsgPack.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = NvimMsgPack.playground; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -45,6 +46,7 @@
4B9E33621FCB475600E0C4BC = {
isa = PBXGroup;
children = (
+ 4BC8843F1FDC6A45000E95A2 /* NvimMsgPack.playground */,
4B9E336E1FCB475600E0C4BC /* NvimMsgPack */,
4B9E336D1FCB475600E0C4BC /* Products */,
4B9E33771FCB476D00E0C4BC /* Frameworks */,
@@ -216,7 +218,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 246;
+ CURRENT_PROJECT_VERSION = 247;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -276,7 +278,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 246;
+ CURRENT_PROJECT_VERSION = 247;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -306,7 +308,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 246;
+ DYLIB_CURRENT_VERSION = 247;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = NvimMsgPack/Info.plist;
@@ -329,7 +331,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 246;
+ DYLIB_CURRENT_VERSION = 247;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = NvimMsgPack/Info.plist;
diff --git a/NvimMsgPack/NvimMsgPack/Info.plist b/NvimMsgPack/NvimMsgPack/Info.plist
index f420cad5..6fd9eac0 100644
--- a/NvimMsgPack/NvimMsgPack/Info.plist
+++ b/NvimMsgPack/NvimMsgPack/Info.plist
@@ -15,9 +15,9 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- SNAPSHOT-246
+ SNAPSHOT-247
CFBundleVersion
- 246
+ 247
NSHumanReadableCopyright
Copyright © 2017 Tae Won Ha. All rights reserved.
NSPrincipalClass
diff --git a/NvimView/NeoVimMsgIds.h b/NvimView/NeoVimMsgIds.h
index f65ff140..50b50551 100644
--- a/NvimView/NeoVimMsgIds.h
+++ b/NvimView/NeoVimMsgIds.h
@@ -53,7 +53,6 @@ typedef NS_ENUM(NSInteger, NeoVimAgentMsgId) {
NeoVimAgentMsgIdResize,
NeoVimAgentMsgIdScroll,
- NeoVimAgentMsgIdGetPwd,
NeoVimAgentMsgIdGetEscapeFileNames,
NeoVimAgentMsgIdFocusGained,
diff --git a/NvimView/NvimServer/NeoVimServer.m b/NvimView/NvimServer/NeoVimServer.m
index 85ee1b09..e14b3f25 100644
--- a/NvimView/NvimServer/NeoVimServer.m
+++ b/NvimView/NvimServer/NeoVimServer.m
@@ -78,8 +78,6 @@ static CFDataRef local_server_callback(CFMessagePortRef local, SInt32 msgid, CFD
case NeoVimAgentMsgIdDelete: return data_sync(data, outputCondition, neovim_delete);
- case NeoVimAgentMsgIdGetPwd: return data_sync(data, outputCondition, neovim_pwd);
-
case NeoVimAgentMsgIdFocusGained: return data_sync(data, outputCondition, neovim_focus_gained);
#ifdef DEBUG
diff --git a/NvimView/NvimServer/server_globals.h b/NvimView/NvimServer/server_globals.h
index cbcad8a1..96ddc12c 100644
--- a/NvimView/NvimServer/server_globals.h
+++ b/NvimView/NvimServer/server_globals.h
@@ -21,8 +21,6 @@ extern void neovim_vim_input(void **argv);
extern void neovim_vim_input_marked_text(void **argv);
extern void neovim_delete(void **argv);
-extern void neovim_pwd(void **argv);
-
extern void neovim_focus_gained(void **argv);
extern void neovim_debug1(void **argv);
diff --git a/NvimView/NvimServer/server_ui.m b/NvimView/NvimServer/server_ui.m
index 178fe1ad..5e0abe00 100644
--- a/NvimView/NvimServer/server_ui.m
+++ b/NvimView/NvimServer/server_ui.m
@@ -860,23 +860,6 @@ void neovim_delete(void **argv) {
});
}
-void neovim_pwd(void **argv) {
- work_and_write_data_sync(argv, ^NSData *(NSData *data) {
- char_u *temp = xmalloc(MAXPATHL);
- if (os_dirname(temp, MAXPATHL) == FAIL) {
- xfree(temp);
- return nil;
- }
-
- NSString *pwd = [NSString stringWithCString:(const char *) temp encoding:NSUTF8StringEncoding];
- xfree(temp);
-
- NSData *resultData = [NSKeyedArchiver archivedDataWithRootObject:pwd];
-
- return resultData;
- });
-}
-
void neovim_focus_gained(void **argv) {
work_and_write_data_sync(argv, ^NSData *(NSData *data) {
const bool *values = data.bytes;
diff --git a/NvimView/NvimView.xcodeproj/project.pbxproj b/NvimView/NvimView.xcodeproj/project.pbxproj
index fce7191f..6a56a385 100644
--- a/NvimView/NvimView.xcodeproj/project.pbxproj
+++ b/NvimView/NvimView.xcodeproj/project.pbxproj
@@ -35,7 +35,7 @@
4B90F0441FD2AFAE008A39E0 /* MMCoreTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90F0261FD2AFAD008A39E0 /* MMCoreTextView.h */; settings = {ATTRIBUTES = (Private, ); }; };
4B90F0451FD2AFAE008A39E0 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0271FD2AFAD008A39E0 /* Logger.swift */; };
4B90F0461FD2AFAE008A39E0 /* Grid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0281FD2AFAD008A39E0 /* Grid.swift */; };
- 4B90F0481FD2AFAE008A39E0 /* NeoVimUiBridgeProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F02A1FD2AFAD008A39E0 /* NeoVimUiBridgeProtocol.m */; };
+ 4B90F0481FD2AFAE008A39E0 /* NvimUiBridgeProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F02A1FD2AFAD008A39E0 /* NvimUiBridgeProtocol.m */; };
4B90F0491FD2AFAE008A39E0 /* CellAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F02B1FD2AFAD008A39E0 /* CellAttributes.swift */; };
4B90F04A1FD2AFAE008A39E0 /* NvimAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F02C1FD2AFAE008A39E0 /* NvimAgent.m */; };
4B90F0521FD2AFD3008A39E0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90F0511FD2AFD3008A39E0 /* main.m */; };
@@ -126,7 +126,7 @@
4B90F0261FD2AFAD008A39E0 /* MMCoreTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMCoreTextView.h; sourceTree = ""; };
4B90F0271FD2AFAD008A39E0 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; };
4B90F0281FD2AFAD008A39E0 /* Grid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Grid.swift; sourceTree = ""; };
- 4B90F02A1FD2AFAD008A39E0 /* NeoVimUiBridgeProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NeoVimUiBridgeProtocol.m; sourceTree = ""; };
+ 4B90F02A1FD2AFAD008A39E0 /* NvimUiBridgeProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NvimUiBridgeProtocol.m; sourceTree = ""; };
4B90F02B1FD2AFAD008A39E0 /* CellAttributes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CellAttributes.swift; sourceTree = ""; };
4B90F02C1FD2AFAE008A39E0 /* NvimAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NvimAgent.m; sourceTree = ""; };
4B90F04F1FD2AFD3008A39E0 /* NvimServer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = NvimServer; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -214,7 +214,7 @@
4B2016EC1FD45EED0038528A /* NvimAutoCommandEvent.generated.m */,
4B90F01D1FD2AFAC008A39E0 /* NvimObjectsExtensions.swift */,
4B90F00F1FD2AFAC008A39E0 /* NvimUiBridgeProtocol.h */,
- 4B90F02A1FD2AFAD008A39E0 /* NeoVimUiBridgeProtocol.m */,
+ 4B90F02A1FD2AFAD008A39E0 /* NvimUiBridgeProtocol.m */,
4B90F0101FD2AFAC008A39E0 /* NvimView.swift */,
4B90F01B1FD2AFAC008A39E0 /* NvimView+Api.swift */,
4B90F0141FD2AFAC008A39E0 /* NvimView+Dragging.swift */,
@@ -405,7 +405,7 @@
files = (
4B90F0381FD2AFAE008A39E0 /* ColorUtils.swift in Sources */,
4B90F03E1FD2AFAE008A39E0 /* MMCoreTextView.m in Sources */,
- 4B90F0481FD2AFAE008A39E0 /* NeoVimUiBridgeProtocol.m in Sources */,
+ 4B90F0481FD2AFAE008A39E0 /* NvimUiBridgeProtocol.m in Sources */,
4B90F03F1FD2AFAE008A39E0 /* NvimView+Draw.swift in Sources */,
4B90F02F1FD2AFAE008A39E0 /* NvimView+Resize.swift in Sources */,
4B90F0341FD2AFAE008A39E0 /* CocoaExtensions.swift in Sources */,
@@ -484,7 +484,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 246;
+ CURRENT_PROJECT_VERSION = 247;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -542,7 +542,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 246;
+ CURRENT_PROJECT_VERSION = 247;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -569,7 +569,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 246;
+ DYLIB_CURRENT_VERSION = 247;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_VERSION = A;
@@ -591,7 +591,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 246;
+ DYLIB_CURRENT_VERSION = 247;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_VERSION = A;
diff --git a/NvimView/NvimView/Info.plist b/NvimView/NvimView/Info.plist
index f420cad5..6fd9eac0 100644
--- a/NvimView/NvimView/Info.plist
+++ b/NvimView/NvimView/Info.plist
@@ -15,9 +15,9 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- SNAPSHOT-246
+ SNAPSHOT-247
CFBundleVersion
- 246
+ 247
NSHumanReadableCopyright
Copyright © 2017 Tae Won Ha. All rights reserved.
NSPrincipalClass
diff --git a/NvimView/NvimView/NvimAgent.h b/NvimView/NvimView/NvimAgent.h
index de0a6205..49e9ef56 100644
--- a/NvimView/NvimView/NvimAgent.h
+++ b/NvimView/NvimView/NvimAgent.h
@@ -31,8 +31,6 @@ NS_ASSUME_NONNULL_BEGIN
- (bool)runLocalServerAndNeoVimWithWidth:(NSInteger)width height:(NSInteger)height;
-- (NSURL *)pwd;
-
- (void)vimInput:(NSString *)string;
- (void)vimInputMarkedText:(NSString *)markedText;
- (void)deleteCharacters:(NSInteger)count;
diff --git a/NvimView/NvimView/NvimAgent.m b/NvimView/NvimView/NvimAgent.m
index 4733691b..fc8ac4a7 100644
--- a/NvimView/NvimView/NvimAgent.m
+++ b/NvimView/NvimView/NvimAgent.m
@@ -250,25 +250,6 @@ static CFDataRef local_server_callback(CFMessagePortRef local __unused, SInt32 m
return !_isInitErrorPresent;
}
-- (NSURL *)pwd {
- NSData *data = [self sendMessageWithId:NeoVimAgentMsgIdGetPwd data:nil expectsReply:YES];
- if (data == nil) {
- return [NSURL fileURLWithPath:NSHomeDirectory()];
- }
-
- NSString *path = [NSKeyedUnarchiver unarchiveObjectWithData:data];
- if (path == nil) {
- return [NSURL fileURLWithPath:NSHomeDirectory()];
- }
-
- NSURL *pwd = [NSURL fileURLWithPath:path];
- if (pwd == nil) {
- return [NSURL fileURLWithPath:NSHomeDirectory()];
- }
-
- return pwd;
-}
-
- (void)vimInput:(NSString *)string {
NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
[self sendMessageWithId:NeoVimAgentMsgIdInput data:data expectsReply:NO];
diff --git a/NvimView/NvimView/NeoVimUiBridgeProtocol.m b/NvimView/NvimView/NvimUiBridgeProtocol.m
similarity index 100%
rename from NvimView/NvimView/NeoVimUiBridgeProtocol.m
rename to NvimView/NvimView/NvimUiBridgeProtocol.m
diff --git a/NvimView/NvimView/NvimView+Resize.swift b/NvimView/NvimView/NvimView+Resize.swift
index 75263ac9..01d68f61 100644
--- a/NvimView/NvimView/NvimView+Resize.swift
+++ b/NvimView/NvimView/NvimView+Resize.swift
@@ -62,12 +62,14 @@ extension NvimView {
if noErrorDuringInitialization == false {
self.logger.fault("There was an error launching neovim.")
- let alert = NSAlert()
- alert.alertStyle = .warning
- alert.messageText = "Error during initialization"
- alert.informativeText = "There was an error during the initialization of NeoVim. " +
- "Use :messages to view the error messages."
- alert.runModal()
+ DispatchQueue.main.async {
+ let alert = NSAlert()
+ alert.alertStyle = .warning
+ alert.messageText = "Error during initialization"
+ alert.informativeText = "There was an error during the initialization of NeoVim. " +
+ "Use :messages to view the error messages."
+ alert.runModal()
+ }
}
}
diff --git a/VimR.xcworkspace/contents.xcworkspacedata b/VimR.xcworkspace/contents.xcworkspacedata
index e3126c82..1c7e595b 100644
--- a/VimR.xcworkspace/contents.xcworkspacedata
+++ b/VimR.xcworkspace/contents.xcworkspacedata
@@ -10,9 +10,6 @@
-
-
diff --git a/VimR/MacNeovim/AppDelegate.swift b/VimR/MacNeovim/AppDelegate.swift
deleted file mode 100644
index 9cfdaf31..00000000
--- a/VimR/MacNeovim/AppDelegate.swift
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Tae Won Ha - http://taewon.de - @hataewon
- * See LICENSE
- */
-
-import Cocoa
-
-@NSApplicationMain
-class AppDelegate: NSObject, NSApplicationDelegate, NeoVimWindowDelegate {
-
- fileprivate var neoVimWindows = Set()
-}
-
-// MARK: - NSApplicationDelegate
-extension AppDelegate {
-
- func applicationOpenUntitledFile(_ sender: NSApplication) -> Bool {
- self.newDocument(self)
- return true
- }
-
- func applicationShouldTerminate(_ sender: NSApplication) -> NSApplicationTerminateReply {
- if self.neoVimWindows.isEmpty {
- return .terminateNow
- }
-
- let isDirty = self.neoVimWindows.reduce(false) { $0 ? true : $1.window.isDocumentEdited }
- guard isDirty else {
- self.neoVimWindows.forEach { $0.closeNeoVimWithoutSaving() }
- return .terminateNow
- }
-
- let alert = NSAlert()
- alert.addButton(withTitle: "Cancel")
- alert.addButton(withTitle: "Discard and Quit")
- alert.messageText = "There are windows with unsaved buffers!"
- alert.alertStyle = .warning
-
- if alert.runModal() == NSAlertSecondButtonReturn {
- self.neoVimWindows.forEach { $0.closeNeoVimWithoutSaving() }
- return .terminateNow
- }
-
- return .terminateCancel
- }
-}
-
-// MARK: - NeoVimWindow.Delegate
-extension AppDelegate {
-
- func neoVimWindowDidClose(neoVimWindow: NeoVimWindow) {
- self.neoVimWindows.remove(neoVimWindow)
- }
-}
-
-// MARK: - IBActions
-extension AppDelegate {
-
- @IBAction func newDocument(_: Any?) {
- let neoVimWindow = NeoVimWindow(delegate: self)
- self.neoVimWindows.insert(neoVimWindow)
-
- neoVimWindow.window.makeKeyAndOrderFront(self)
- }
-}
\ No newline at end of file
diff --git a/VimR/MacNeovim/Application.swift b/VimR/MacNeovim/Application.swift
deleted file mode 100644
index 5b5ec248..00000000
--- a/VimR/MacNeovim/Application.swift
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Tae Won Ha - http://taewon.de - @hataewon
- * See LICENSE
- */
-
-import Cocoa
-
-class Application: NSApplication {
-
- override init() {
- setPressAndHoldSetting()
- super.init()
- }
-
- required init?(coder: NSCoder) {
- setPressAndHoldSetting()
- super.init(coder: coder)
- }
-}
-
-fileprivate func setPressAndHoldSetting() {
- // disable default press and hold behavior (copied from MacVim)
- CFPreferencesSetAppValue(
- "ApplePressAndHoldEnabled" as NSString,
- "NO" as NSString,
- kCFPreferencesCurrentApplication
- )
-}
\ No newline at end of file
diff --git a/VimR/MacNeovim/Assets.xcassets/AppIcon.appiconset/Contents.json b/VimR/MacNeovim/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 2db2b1c7..00000000
--- a/VimR/MacNeovim/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "mac",
- "size" : "16x16",
- "scale" : "1x"
- },
- {
- "idiom" : "mac",
- "size" : "16x16",
- "scale" : "2x"
- },
- {
- "idiom" : "mac",
- "size" : "32x32",
- "scale" : "1x"
- },
- {
- "idiom" : "mac",
- "size" : "32x32",
- "scale" : "2x"
- },
- {
- "idiom" : "mac",
- "size" : "128x128",
- "scale" : "1x"
- },
- {
- "idiom" : "mac",
- "size" : "128x128",
- "scale" : "2x"
- },
- {
- "idiom" : "mac",
- "size" : "256x256",
- "scale" : "1x"
- },
- {
- "idiom" : "mac",
- "size" : "256x256",
- "scale" : "2x"
- },
- {
- "idiom" : "mac",
- "size" : "512x512",
- "scale" : "1x"
- },
- {
- "idiom" : "mac",
- "size" : "512x512",
- "scale" : "2x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
\ No newline at end of file
diff --git a/VimR/MacNeovim/Base.lproj/MainMenu.xib b/VimR/MacNeovim/Base.lproj/MainMenu.xib
deleted file mode 100644
index cfabdcd3..00000000
--- a/VimR/MacNeovim/Base.lproj/MainMenu.xib
+++ /dev/null
@@ -1,241 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/VimR/MacNeovim/Base.lproj/NeoVimWindow.xib b/VimR/MacNeovim/Base.lproj/NeoVimWindow.xib
deleted file mode 100644
index 8bb8052a..00000000
--- a/VimR/MacNeovim/Base.lproj/NeoVimWindow.xib
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/VimR/MacNeovim/Info.plist b/VimR/MacNeovim/Info.plist
deleted file mode 100644
index f2272d90..00000000
--- a/VimR/MacNeovim/Info.plist
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIconFile
-
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- $(PRODUCT_NAME)
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- SNAPSHOT-246
- CFBundleVersion
- 246
- LSApplicationCategoryType
- public.app-category.productivity
- LSMinimumSystemVersion
- $(MACOSX_DEPLOYMENT_TARGET)
- NSHumanReadableCopyright
- Copyright © 2017 Tae Won Ha. All rights reserved.
- NSMainNibFile
- MainMenu
- NSPrincipalClass
- NSApplication
-
-
diff --git a/VimR/MacNeovim/NeoVimWindow.swift b/VimR/MacNeovim/NeoVimWindow.swift
deleted file mode 100644
index 630bbb02..00000000
--- a/VimR/MacNeovim/NeoVimWindow.swift
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * Tae Won Ha - http://taewon.de - @hataewon
- * See LICENSE
- */
-
-import Cocoa
-import SwiftNeoVim
-import PureLayout
-
-protocol NeoVimWindowDelegate: class {
-
- func neoVimWindowDidClose(neoVimWindow: NeoVimWindow)
-}
-
-class NeoVimWindow: NSObject, NSWindowDelegate, NeoVimViewDelegate {
-
- var window: NSWindow {
- return self.windowController.window!
- }
-
- var view: NSView {
- return self.windowController.window!.contentView!
- }
-
- weak var delegate: NeoVimWindowDelegate?
-
- init(delegate: NeoVimWindowDelegate) {
- self.delegate = delegate
- self.windowController = NSWindowController(windowNibName: "NeoVimWindow")
- self.neoVimView = NeoVimView(frame: .zero, config: NeoVimView.Config(useInteractiveZsh: false))
-
- // The following setting make the scrolling really slow...
- self.neoVimView.usesLigatures = true
- self.neoVimView.font = NSFont(name: "FiraCode-Regular", size: 12)!
-
- super.init()
- self.addViews()
-
- self.window.delegate = self
- self.window.makeFirstResponder(self.neoVimView)
- }
-
- func closeNeoVimWithoutSaving() {
- self.neoVimView.quitNeoVimWithoutSaving()
- self.delegate?.neoVimWindowDidClose(neoVimWindow: self)
- self.windowController.close()
- }
-
- fileprivate let windowController: NSWindowController
- fileprivate let neoVimView: NeoVimView
-
- fileprivate func addViews() {
- self.neoVimView.configureForAutoLayout()
- self.view.addSubview(self.neoVimView)
- self.neoVimView.autoPinEdgesToSuperviewEdges()
-
- self.neoVimView.delegate = self
- }
-
- required init?(coder: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-}
-
-// MARK: - NSWindowDelegate
-extension NeoVimWindow {
-
- func windowShouldClose(_: Any) -> Bool {
- guard self.neoVimView.isCurrentBufferDirty() else {
- self.neoVimView.closeCurrentTab()
- return false
- }
-
- let alert = NSAlert()
- alert.addButton(withTitle: "Cancel")
- alert.addButton(withTitle: "Discard and Close")
- alert.messageText = "The current buffer has unsaved changes!"
- alert.alertStyle = .warning
- alert.beginSheetModal(for: self.window, completionHandler: { response in
- if response == NSAlertSecondButtonReturn {
- self.neoVimView.closeCurrentTabWithoutSaving()
- }
- })
-
- return false
- }
-}
-
-// MARK: - NeoVimViewDelegate
-extension NeoVimWindow {
-
- func neoVimStopped() {
- self.delegate?.neoVimWindowDidClose(neoVimWindow: self)
- self.windowController.close()
- }
-
- func set(title: String) {
- self.window.title = title
- }
-
- func set(dirtyStatus: Bool) {
- self.window.isDocumentEdited = dirtyStatus
- }
-
- func cwdChanged() {
- }
-
- func bufferListChanged() {
- }
-
- func tabChanged() {
- }
-
- func currentBufferChanged(_ currentBuffer: NeoVimBuffer) {
- self.window.representedURL = currentBuffer.url
- }
-
- func ipcBecameInvalid(reason: String) {
- let alert = NSAlert()
- alert.addButton(withTitle: "Close")
- alert.messageText = "Sorry, an error occurred."
- alert.informativeText = "VimR encountered an error from which it cannot recover. This window will now close.\n"
- + reason
- alert.alertStyle = .critical
- alert.beginSheetModal(for: self.window) { _ in
- self.neoVimStopped()
- }
- }
-
- func scroll() {
- }
-
- func cursor(to: Position) {
- }
-}
diff --git a/VimR/VimR.xcodeproj/project.pbxproj b/VimR/VimR.xcodeproj/project.pbxproj
index 7e55cb8b..6bfee8d4 100644
--- a/VimR/VimR.xcodeproj/project.pbxproj
+++ b/VimR/VimR.xcodeproj/project.pbxproj
@@ -41,7 +41,6 @@
1929B6460862447A31B5B082 /* ImageAndTextTableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BDC3F82CB4CB4FE56D1B /* ImageAndTextTableCell.swift */; };
1929B66F795867B8C07FAAD4 /* DictionaryCommonsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B9355C892BEBA7496C71 /* DictionaryCommonsTest.swift */; };
1929B67DA3EB21A631EF1DBB /* FileUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BA8AC40B901B20F20B71 /* FileUtils.swift */; };
- 1929B6B886CFBCBF01D4B04A /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B5E3E722EFA5172E3455 /* Application.swift */; };
1929B6BE1610892E6C4C0CE6 /* GeneralPrefReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B0EB3F49C42A57D083AF /* GeneralPrefReducer.swift */; };
1929B6C0393DE40E34F4A49A /* ToolsPrefReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B694508FB5FDE607513A /* ToolsPrefReducer.swift */; };
1929B6D8F5FC723B7109031F /* OpenQuicklyReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B12CE56A9B36980288A4 /* OpenQuicklyReducer.swift */; };
@@ -56,7 +55,6 @@
1929B990A143763A56CFCED0 /* PrefService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B364460D86F17E80943C /* PrefService.swift */; };
1929BA715337FE26155B2071 /* OpenedFileList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BA43449BA41666CD55ED /* OpenedFileList.swift */; };
1929BA76A1D97D8226F7CFB1 /* Debouncer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B6AD3396160AA2C46919 /* Debouncer.swift */; };
- 1929BAA19A6BEE73963BD4A8 /* NeoVimWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B868F11F398A159EF554 /* NeoVimWindow.swift */; };
1929BAAD7336FDFF1F78E749 /* ScorerTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BF69B01107F358CF7EAD /* ScorerTest.swift */; };
1929BAE4900D72A7877741B1 /* PrefWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BE168F31344B69E61B62 /* PrefWindow.swift */; };
1929BAFF1E011321D3186EE6 /* UiRoot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BD4149D5A25C82064DD8 /* UiRoot.swift */; };
@@ -93,10 +91,6 @@
4B64239A1D8EFE3000FC78C8 /* WorkspaceTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6423991D8EFE3000FC78C8 /* WorkspaceTool.swift */; };
4B6A70941D60E04200E12030 /* AppKitCommons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6A70931D60E04200E12030 /* AppKitCommons.swift */; };
4B6A70961D6100E300E12030 /* SwiftCommons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6A70951D6100E300E12030 /* SwiftCommons.swift */; };
- 4B77808D1EAA25FF00CB4E10 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B77808C1EAA25FF00CB4E10 /* AppDelegate.swift */; };
- 4B7780911EAA25FF00CB4E10 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B7780901EAA25FF00CB4E10 /* Assets.xcassets */; };
- 4B7780A21EAA2D3100CB4E10 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B7780A41EAA2D3100CB4E10 /* MainMenu.xib */; };
- 4B7780A71EAA2E3200CB4E10 /* NeoVimWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B7780A91EAA2E3200CB4E10 /* NeoVimWindow.xib */; };
4B96FB3B1EBBC56F00E4E164 /* FileItemIgnorePattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B69499B2569793350CEC /* FileItemIgnorePattern.swift */; };
4B96FB3C1EBBC56F00E4E164 /* FileUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BA8AC40B901B20F20B71 /* FileUtils.swift */; };
4B96FB3D1EBBC56F00E4E164 /* Matcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BEEB33113B0E33C3830F /* Matcher.swift */; };
@@ -202,16 +196,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- 4B77809D1EAA262300CB4E10 /* Embed Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- );
- name = "Embed Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
@@ -233,7 +217,6 @@
1929B5046239709E33516F5C /* Pref128ToCurrentConverter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Pref128ToCurrentConverter.swift; sourceTree = ""; };
1929B56C8ED31834BA9D8543 /* FileItemUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileItemUtils.swift; sourceTree = ""; };
1929B5D45C9792BBE76B8AFF /* StringCommonsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringCommonsTest.swift; sourceTree = ""; };
- 1929B5E3E722EFA5172E3455 /* Application.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = ""; };
1929B617C229B19DB3E987B8 /* PreviewService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreviewService.swift; sourceTree = ""; };
1929B67A10E6BB2986B2416E /* OpenedFileListReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenedFileListReducer.swift; sourceTree = ""; };
1929B694508FB5FDE607513A /* ToolsPrefReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToolsPrefReducer.swift; sourceTree = ""; };
@@ -252,7 +235,6 @@
1929B8042AC566CDF6C998A3 /* FileUtilsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileUtilsTest.swift; sourceTree = ""; };
1929B8241CDE58F7AAF89AE4 /* PrefUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrefUtils.swift; sourceTree = ""; };
1929B85023B042C485409CE1 /* HtmlPreviewTool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HtmlPreviewTool.swift; sourceTree = ""; };
- 1929B868F11F398A159EF554 /* NeoVimWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NeoVimWindow.swift; sourceTree = ""; };
1929B8EF9A9F5ACC175452BD /* PreviewUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreviewUtils.swift; sourceTree = ""; };
1929B9355C892BEBA7496C71 /* DictionaryCommonsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DictionaryCommonsTest.swift; sourceTree = ""; };
1929B9AF20D7BD6E5C975128 /* FoundationCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FoundationCommons.swift; sourceTree = ""; };
@@ -300,12 +282,6 @@
4B6423991D8EFE3000FC78C8 /* WorkspaceTool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WorkspaceTool.swift; path = Workspace/WorkspaceTool.swift; sourceTree = ""; };
4B6A70931D60E04200E12030 /* AppKitCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppKitCommons.swift; sourceTree = ""; };
4B6A70951D6100E300E12030 /* SwiftCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftCommons.swift; sourceTree = ""; };
- 4B77808A1EAA25FF00CB4E10 /* MacNeovim.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MacNeovim.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 4B77808C1EAA25FF00CB4E10 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- 4B7780901EAA25FF00CB4E10 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 4B7780951EAA25FF00CB4E10 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 4B7780A31EAA2D3100CB4E10 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
- 4B7780A81EAA2E3200CB4E10 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/NeoVimWindow.xib; sourceTree = ""; };
4B97E2CD1D33F53D00FC0660 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainWindow.xib; sourceTree = ""; };
4BB1BEA81D48773200463C29 /* RxSwiftCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxSwiftCommons.swift; sourceTree = ""; };
4BB409E61DD68CCC005F39A2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/FileBrowserMenu.xib; sourceTree = ""; };
@@ -338,13 +314,6 @@
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
- 4B7780871EAA25FF00CB4E10 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
4BEBA5021CFF374B00673FDF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -561,20 +530,6 @@
name = Workspace;
sourceTree = "";
};
- 4B77808B1EAA25FF00CB4E10 /* MacNeovim */ = {
- isa = PBXGroup;
- children = (
- 4B77808C1EAA25FF00CB4E10 /* AppDelegate.swift */,
- 4B7780901EAA25FF00CB4E10 /* Assets.xcassets */,
- 4B7780951EAA25FF00CB4E10 /* Info.plist */,
- 1929B5E3E722EFA5172E3455 /* Application.swift */,
- 1929B868F11F398A159EF554 /* NeoVimWindow.swift */,
- 4B7780A41EAA2D3100CB4E10 /* MainMenu.xib */,
- 4B7780A91EAA2E3200CB4E10 /* NeoVimWindow.xib */,
- );
- path = MacNeovim;
- sourceTree = "";
- };
4B97E2CF1D33F92200FC0660 /* resources */ = {
isa = PBXGroup;
children = (
@@ -620,7 +575,6 @@
children = (
4BEBA5071CFF374B00673FDF /* VimR */,
4BEBA5171CFF374B00673FDF /* VimRTests */,
- 4B77808B1EAA25FF00CB4E10 /* MacNeovim */,
4B5012001EBA791000F76C46 /* Frameworks */,
4BEBA5061CFF374B00673FDF /* Products */,
);
@@ -633,7 +587,6 @@
children = (
4BEBA5051CFF374B00673FDF /* VimR.app */,
4BEBA5141CFF374B00673FDF /* VimRTests.xctest */,
- 4B77808A1EAA25FF00CB4E10 /* MacNeovim.app */,
);
name = Products;
sourceTree = "";
@@ -687,24 +640,6 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
- 4B7780891EAA25FF00CB4E10 /* MacNeovim */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 4B7780981EAA25FF00CB4E10 /* Build configuration list for PBXNativeTarget "MacNeovim" */;
- buildPhases = (
- 4B7780861EAA25FF00CB4E10 /* Sources */,
- 4B7780871EAA25FF00CB4E10 /* Frameworks */,
- 4B7780881EAA25FF00CB4E10 /* Resources */,
- 4B77809D1EAA262300CB4E10 /* Embed Frameworks */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = MacNeovim;
- productName = MacNeovim;
- productReference = 4B77808A1EAA25FF00CB4E10 /* MacNeovim.app */;
- productType = "com.apple.product-type.application";
- };
4BEBA5041CFF374B00673FDF /* VimR */ = {
isa = PBXNativeTarget;
buildConfigurationList = 4BEBA51D1CFF374B00673FDF /* Build configuration list for PBXNativeTarget "VimR" */;
@@ -753,10 +688,6 @@
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Tae Won Ha";
TargetAttributes = {
- 4B7780891EAA25FF00CB4E10 = {
- CreatedOnToolsVersion = 8.3.2;
- ProvisioningStyle = Automatic;
- };
4BEBA5041CFF374B00673FDF = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = H96Q2NKTQH;
@@ -783,22 +714,11 @@
targets = (
4BEBA5041CFF374B00673FDF /* VimR */,
4BEBA5131CFF374B00673FDF /* VimRTests */,
- 4B7780891EAA25FF00CB4E10 /* MacNeovim */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
- 4B7780881EAA25FF00CB4E10 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 4B7780911EAA25FF00CB4E10 /* Assets.xcassets in Resources */,
- 4B7780A21EAA2D3100CB4E10 /* MainMenu.xib in Resources */,
- 4B7780A71EAA2E3200CB4E10 /* NeoVimWindow.xib in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
4BEBA5031CFF374B00673FDF /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -845,16 +765,6 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
- 4B7780861EAA25FF00CB4E10 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 4B77808D1EAA25FF00CB4E10 /* AppDelegate.swift in Sources */,
- 1929B6B886CFBCBF01D4B04A /* Application.swift in Sources */,
- 1929BAA19A6BEE73963BD4A8 /* NeoVimWindow.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
4BEBA5011CFF374B00673FDF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -978,22 +888,6 @@
name = PrefWindow.xib;
sourceTree = "";
};
- 4B7780A41EAA2D3100CB4E10 /* MainMenu.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 4B7780A31EAA2D3100CB4E10 /* Base */,
- );
- name = MainMenu.xib;
- sourceTree = "";
- };
- 4B7780A91EAA2E3200CB4E10 /* NeoVimWindow.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 4B7780A81EAA2E3200CB4E10 /* Base */,
- );
- name = NeoVimWindow.xib;
- sourceTree = "";
- };
4B97E2CE1D33F53D00FC0660 /* MainWindow.xib */ = {
isa = PBXVariantGroup;
children = (
@@ -1037,47 +931,6 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
- 4B7780961EAA25FF00CB4E10 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CODE_SIGN_IDENTITY = "";
- COMBINE_HIDPI_IMAGES = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Carthage/Build/Mac",
- );
- INFOPLIST_FILE = MacNeovim/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.MacNeovim;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_VERSION = 3.0;
- };
- name = Debug;
- };
- 4B7780971EAA25FF00CB4E10 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CODE_SIGN_IDENTITY = "";
- COMBINE_HIDPI_IMAGES = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Carthage/Build/Mac",
- );
- INFOPLIST_FILE = MacNeovim/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.MacNeovim;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 3.0;
- };
- name = Release;
- };
4BEBA51B1CFF374B00673FDF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -1105,7 +958,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 246;
+ CURRENT_PROJECT_VERSION = 247;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -1160,7 +1013,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 246;
+ CURRENT_PROJECT_VERSION = 247;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -1249,15 +1102,6 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- 4B7780981EAA25FF00CB4E10 /* Build configuration list for PBXNativeTarget "MacNeovim" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4B7780961EAA25FF00CB4E10 /* Debug */,
- 4B7780971EAA25FF00CB4E10 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
4BEBA5001CFF374B00673FDF /* Build configuration list for PBXProject "VimR" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/VimR/VimR/Context.swift b/VimR/VimR/Context.swift
index c38b3c38..a5924ee6 100644
--- a/VimR/VimR/Context.swift
+++ b/VimR/VimR/Context.swift
@@ -104,29 +104,29 @@ class Context {
self.stateSubject.onCompleted()
}
- fileprivate let stateSubject = PublishSubject()
- fileprivate let scheduler = SerialDispatchQueueScheduler(qos: .userInitiated)
- fileprivate let disposeBag = DisposeBag()
+ private let stateSubject = PublishSubject()
+ private let scheduler = SerialDispatchQueueScheduler(qos: .userInitiated)
+ private let disposeBag = DisposeBag()
- fileprivate var appState: AppState
+ private var appState: AppState
- fileprivate let prefService = PrefService()
+ private let prefService = PrefService()
- fileprivate func emitAppState(_ mainWindow: UuidState) {
+ private func emitAppState(_ mainWindow: UuidState) {
self.appState.mainWindows[mainWindow.uuid] = mainWindow.payload
self.stateSubject.onNext(self.appState)
self.cleanUpAppState()
}
- fileprivate func emitAppState(_ appState: AppState) {
+ private func emitAppState(_ appState: AppState) {
self.appState = appState
self.stateSubject.onNext(self.appState)
self.cleanUpAppState()
}
- fileprivate func cleanUpAppState() {
+ private func cleanUpAppState() {
self.appState.mainWindows.keys.forEach { uuid in
self.appState.mainWindows[uuid]?.cwdToSet = nil
self.appState.mainWindows[uuid]?.currentBufferToSet = nil
@@ -135,20 +135,20 @@ class Context {
}
}
- fileprivate func actionSourceForAppState() -> Observable> {
+ private func actionSourceForAppState() -> Observable> {
return self.actionEmitter.observable
.mapOmittingNil { $0 as? ActionType }
.map { self.appStateActionPair(for: $0) }
}
- fileprivate func actionSourceForMainWindow()
+ private func actionSourceForMainWindow()
-> Observable, ActionType>> {
return self.actionEmitter.observable
.mapOmittingNil { $0 as? UuidAction }
.mapOmittingNil { self.mainWindowStateActionPair(for: $0) }
}
- fileprivate func prefStateSource(
+ private func prefStateSource(
by reduce: @escaping (StateActionPair) -> StateActionPair,
prefService: PrefService
) -> Observable {
@@ -159,11 +159,11 @@ class Context {
.map { $0.state }
}
- fileprivate func appStateActionPair(for action: ActionType) -> StateActionPair {
+ private func appStateActionPair(for action: ActionType) -> StateActionPair {
return StateActionPair(state: self.appState, action: action, modified: false)
}
- fileprivate func mainWindowStateActionPair(for action: UuidAction)
+ private func mainWindowStateActionPair(for action: UuidAction)
-> StateActionPair, ActionType>? {
guard let mainWindowState = self.appState.mainWindows[action.uuid] else {
return nil
diff --git a/VimR/VimR/Info.plist b/VimR/VimR/Info.plist
index fafb31d8..90ef25bb 100644
--- a/VimR/VimR/Info.plist
+++ b/VimR/VimR/Info.plist
@@ -32,7 +32,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- SNAPSHOT-246
+ SNAPSHOT-247
CFBundleSignature
????
CFBundleURLTypes
@@ -49,7 +49,7 @@
CFBundleVersion
- 246
+ 247
LSApplicationCategoryType
public.app-category.productivity
LSMinimumSystemVersion
diff --git a/VimR/VimRTests/Info.plist b/VimR/VimRTests/Info.plist
index 2d8842dc..aef5b488 100644
--- a/VimR/VimRTests/Info.plist
+++ b/VimR/VimRTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- SNAPSHOT-246
+ SNAPSHOT-247
CFBundleSignature
????
CFBundleVersion
- 246
+ 247
diff --git a/appcast_snapshot.xml b/appcast_snapshot.xml
index d480b2cf..90aed48d 100644
--- a/appcast_snapshot.xml
+++ b/appcast_snapshot.xml
@@ -7,24 +7,22 @@
Most recent changes with links to updates for VimR.
en
-
- SNAPSHOT-246
+ SNAPSHOT-247
-Some High Sierra related fixes
-Do not crash on launch
-Too narrow entries in the file browser and buffers list.
+GH-553: Bugfix: Do not crash when there's an error in
init.vim
.
]]>
- https://github.com/qvacua/vimr/releases/tag/snapshot/246
+ https://github.com/qvacua/vimr/releases/tag/snapshot/247
- 2017-12-09T17:57:47.512444
+ 2017-12-10T13:39:21.178131
10.10.0
-
diff --git a/resources/release-notes.md b/resources/release-notes.md
index 12275fe7..2386b3b6 100644
--- a/resources/release-notes.md
+++ b/resources/release-notes.md
@@ -2,6 +2,10 @@
* GH-571: Bugfix: Read-only buffers are considered as modified. For example NERDTree buffers won't trigger the "Please save first" dialog anymore.
* GH-387: Show all buffers (the same as `:buffers`) in the buffers list
+* GH-553: Bugfix: Do not crash when there's an error in `init.vim`.
+* Some High Sierra related fixes
+ - Do not crash on launch
+ - Too narrow entries in the file browser and buffers list.
# 0.20.1-244