mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-25 06:43:24 +03:00
Merge remote-tracking branch 'origin/develop' into update-neovim
This commit is contained in:
commit
0905dc5234
@ -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;
|
||||
|
@ -15,9 +15,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-246</string>
|
||||
<string>SNAPSHOT-247</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>246</string>
|
||||
<string>247</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2017 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
@ -67,8 +67,6 @@ public class Connection {
|
||||
expectsReturnValue: Bool)
|
||||
-> MsgPackRpc.Response {
|
||||
|
||||
|
||||
|
||||
let packed = pack(
|
||||
[
|
||||
.uint(UInt64(type)),
|
||||
|
@ -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!")
|
@ -28,6 +28,7 @@
|
||||
4B9E33801FCB47F900E0C4BC /* Result.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Result.h; sourceTree = "<group>"; };
|
||||
4B9E33811FCB47F900E0C4BC /* Result.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result.swift; sourceTree = "<group>"; };
|
||||
4B9E33821FCB47F900E0C4BC /* ResultProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResultProtocol.swift; sourceTree = "<group>"; };
|
||||
4BC8843F1FDC6A45000E95A2 /* NvimMsgPack.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = NvimMsgPack.playground; sourceTree = "<group>"; 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;
|
||||
|
@ -15,9 +15,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-246</string>
|
||||
<string>SNAPSHOT-247</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>246</string>
|
||||
<string>247</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2017 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
@ -53,7 +53,6 @@ typedef NS_ENUM(NSInteger, NeoVimAgentMsgId) {
|
||||
NeoVimAgentMsgIdResize,
|
||||
NeoVimAgentMsgIdScroll,
|
||||
|
||||
NeoVimAgentMsgIdGetPwd,
|
||||
NeoVimAgentMsgIdGetEscapeFileNames,
|
||||
|
||||
NeoVimAgentMsgIdFocusGained,
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 = "<group>"; };
|
||||
4B90F0271FD2AFAD008A39E0 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = "<group>"; };
|
||||
4B90F0281FD2AFAD008A39E0 /* Grid.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Grid.swift; sourceTree = "<group>"; };
|
||||
4B90F02A1FD2AFAD008A39E0 /* NeoVimUiBridgeProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NeoVimUiBridgeProtocol.m; sourceTree = "<group>"; };
|
||||
4B90F02A1FD2AFAD008A39E0 /* NvimUiBridgeProtocol.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NvimUiBridgeProtocol.m; sourceTree = "<group>"; };
|
||||
4B90F02B1FD2AFAD008A39E0 /* CellAttributes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CellAttributes.swift; sourceTree = "<group>"; };
|
||||
4B90F02C1FD2AFAE008A39E0 /* NvimAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NvimAgent.m; sourceTree = "<group>"; };
|
||||
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;
|
||||
|
@ -15,9 +15,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-246</string>
|
||||
<string>SNAPSHOT-247</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>246</string>
|
||||
<string>247</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2017 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
3
VimR.xcworkspace/contents.xcworkspacedata
generated
3
VimR.xcworkspace/contents.xcworkspacedata
generated
@ -10,9 +10,6 @@
|
||||
<FileRef
|
||||
location = "group:MsgPackRpc/MsgPackRpc.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:NvimMsgPack.playground">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:NvimMsgPack/NvimMsgPack.xcodeproj">
|
||||
</FileRef>
|
||||
|
@ -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<NeoVimWindow>()
|
||||
}
|
||||
|
||||
// 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)
|
||||
}
|
||||
}
|
@ -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
|
||||
)
|
||||
}
|
@ -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"
|
||||
}
|
||||
}
|
@ -1,241 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12120"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="Application" customModule="MacNeovim" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="delegate" destination="byW-nc-M1N" id="BqP-gv-wrk"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="MacNeovim" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="MacNeovim" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About MacNeovim" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide MacNeovim" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit MacNeovim" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="-1" id="4Si-XN-c54"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="-1" id="bVn-NM-KNZ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="-1" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="-1" id="teZ-XB-qJY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
||||
<connections>
|
||||
<action selector="saveDocumentAs:" target="-1" id="mDf-zr-I0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||
<connections>
|
||||
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||
<connections>
|
||||
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||
<connections>
|
||||
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||
<connections>
|
||||
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||
<connections>
|
||||
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Format" id="jxT-CU-nIS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
||||
<menuItem title="Reset To Default Size" keyEquivalent="0" id="0wB-iK-0Ka">
|
||||
<connections>
|
||||
<action selector="resetFontSize:" target="-1" id="QmT-bh-Rny"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
||||
<connections>
|
||||
<action selector="makeFontBigger:" target="-1" id="CED-Pm-wl1"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
||||
<connections>
|
||||
<action selector="makeFontSmaller:" target="-1" id="Hs0-qQ-XvT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
||||
<items>
|
||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="-1" id="iX2-gA-Ilz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="-1" id="KcB-kA-TuK"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
<items>
|
||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="NewApplication Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
<point key="canvasLocation" x="134" y="-99"/>
|
||||
</menu>
|
||||
<customObject id="byW-nc-M1N" customClass="AppDelegate" customModule="MacNeovim" customModuleProvider="target"/>
|
||||
</objects>
|
||||
</document>
|
@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12120"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NeoVimWindow" customModule="MacNeovim" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="sQ5-K7-HVp"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<window title="MacNeovim" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" frameAutosaveName="neovim-window" animationBehavior="default" id="QvC-M9-y7g">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2304" height="1273"/>
|
||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="-2" id="o5a-mn-6tC"/>
|
||||
</connections>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-246</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>246</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.productivity</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2017 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
@ -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) {
|
||||
}
|
||||
}
|
@ -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 = "<group>"; };
|
||||
1929B56C8ED31834BA9D8543 /* FileItemUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileItemUtils.swift; sourceTree = "<group>"; };
|
||||
1929B5D45C9792BBE76B8AFF /* StringCommonsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringCommonsTest.swift; sourceTree = "<group>"; };
|
||||
1929B5E3E722EFA5172E3455 /* Application.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = "<group>"; };
|
||||
1929B617C229B19DB3E987B8 /* PreviewService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreviewService.swift; sourceTree = "<group>"; };
|
||||
1929B67A10E6BB2986B2416E /* OpenedFileListReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenedFileListReducer.swift; sourceTree = "<group>"; };
|
||||
1929B694508FB5FDE607513A /* ToolsPrefReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToolsPrefReducer.swift; sourceTree = "<group>"; };
|
||||
@ -252,7 +235,6 @@
|
||||
1929B8042AC566CDF6C998A3 /* FileUtilsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileUtilsTest.swift; sourceTree = "<group>"; };
|
||||
1929B8241CDE58F7AAF89AE4 /* PrefUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrefUtils.swift; sourceTree = "<group>"; };
|
||||
1929B85023B042C485409CE1 /* HtmlPreviewTool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HtmlPreviewTool.swift; sourceTree = "<group>"; };
|
||||
1929B868F11F398A159EF554 /* NeoVimWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NeoVimWindow.swift; sourceTree = "<group>"; };
|
||||
1929B8EF9A9F5ACC175452BD /* PreviewUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreviewUtils.swift; sourceTree = "<group>"; };
|
||||
1929B9355C892BEBA7496C71 /* DictionaryCommonsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DictionaryCommonsTest.swift; sourceTree = "<group>"; };
|
||||
1929B9AF20D7BD6E5C975128 /* FoundationCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FoundationCommons.swift; sourceTree = "<group>"; };
|
||||
@ -300,12 +282,6 @@
|
||||
4B6423991D8EFE3000FC78C8 /* WorkspaceTool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WorkspaceTool.swift; path = Workspace/WorkspaceTool.swift; sourceTree = "<group>"; };
|
||||
4B6A70931D60E04200E12030 /* AppKitCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppKitCommons.swift; sourceTree = "<group>"; };
|
||||
4B6A70951D6100E300E12030 /* SwiftCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftCommons.swift; sourceTree = "<group>"; };
|
||||
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 = "<group>"; };
|
||||
4B7780901EAA25FF00CB4E10 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
4B7780951EAA25FF00CB4E10 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4B7780A31EAA2D3100CB4E10 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
4B7780A81EAA2E3200CB4E10 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/NeoVimWindow.xib; sourceTree = "<group>"; };
|
||||
4B97E2CD1D33F53D00FC0660 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainWindow.xib; sourceTree = "<group>"; };
|
||||
4BB1BEA81D48773200463C29 /* RxSwiftCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxSwiftCommons.swift; sourceTree = "<group>"; };
|
||||
4BB409E61DD68CCC005F39A2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/FileBrowserMenu.xib; sourceTree = "<group>"; };
|
||||
@ -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 = "<group>";
|
||||
};
|
||||
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 = "<group>";
|
||||
};
|
||||
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 = "<group>";
|
||||
@ -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 = "<group>";
|
||||
};
|
||||
4B7780A41EAA2D3100CB4E10 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
4B7780A31EAA2D3100CB4E10 /* Base */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B7780A91EAA2E3200CB4E10 /* NeoVimWindow.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
4B7780A81EAA2E3200CB4E10 /* Base */,
|
||||
);
|
||||
name = NeoVimWindow.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
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 = (
|
||||
|
@ -104,29 +104,29 @@ class Context {
|
||||
self.stateSubject.onCompleted()
|
||||
}
|
||||
|
||||
fileprivate let stateSubject = PublishSubject<AppState>()
|
||||
fileprivate let scheduler = SerialDispatchQueueScheduler(qos: .userInitiated)
|
||||
fileprivate let disposeBag = DisposeBag()
|
||||
private let stateSubject = PublishSubject<AppState>()
|
||||
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<MainWindow.State>) {
|
||||
private func emitAppState(_ mainWindow: UuidState<MainWindow.State>) {
|
||||
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<ActionType>() -> Observable<StateActionPair<AppState, ActionType>> {
|
||||
private func actionSourceForAppState<ActionType>() -> Observable<StateActionPair<AppState, ActionType>> {
|
||||
return self.actionEmitter.observable
|
||||
.mapOmittingNil { $0 as? ActionType }
|
||||
.map { self.appStateActionPair(for: $0) }
|
||||
}
|
||||
|
||||
fileprivate func actionSourceForMainWindow<ActionType>()
|
||||
private func actionSourceForMainWindow<ActionType>()
|
||||
-> Observable<StateActionPair<UuidState<MainWindow.State>, ActionType>> {
|
||||
return self.actionEmitter.observable
|
||||
.mapOmittingNil { $0 as? UuidAction<ActionType> }
|
||||
.mapOmittingNil { self.mainWindowStateActionPair(for: $0) }
|
||||
}
|
||||
|
||||
fileprivate func prefStateSource<ActionType>(
|
||||
private func prefStateSource<ActionType>(
|
||||
by reduce: @escaping (StateActionPair<AppState, ActionType>) -> StateActionPair<AppState, ActionType>,
|
||||
prefService: PrefService
|
||||
) -> Observable<AppState> {
|
||||
@ -159,11 +159,11 @@ class Context {
|
||||
.map { $0.state }
|
||||
}
|
||||
|
||||
fileprivate func appStateActionPair<ActionType>(for action: ActionType) -> StateActionPair<AppState, ActionType> {
|
||||
private func appStateActionPair<ActionType>(for action: ActionType) -> StateActionPair<AppState, ActionType> {
|
||||
return StateActionPair(state: self.appState, action: action, modified: false)
|
||||
}
|
||||
|
||||
fileprivate func mainWindowStateActionPair<ActionType>(for action: UuidAction<ActionType>)
|
||||
private func mainWindowStateActionPair<ActionType>(for action: UuidAction<ActionType>)
|
||||
-> StateActionPair<UuidState<MainWindow.State>, ActionType>? {
|
||||
guard let mainWindowState = self.appState.mainWindows[action.uuid] else {
|
||||
return nil
|
||||
|
@ -32,7 +32,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-246</string>
|
||||
<string>SNAPSHOT-247</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
@ -49,7 +49,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>246</string>
|
||||
<string>247</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.productivity</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-246</string>
|
||||
<string>SNAPSHOT-247</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>246</string>
|
||||
<string>247</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -7,24 +7,22 @@
|
||||
<description>Most recent changes with links to updates for VimR.</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>SNAPSHOT-246</title>
|
||||
<title>SNAPSHOT-247</title>
|
||||
<description><![CDATA[
|
||||
<ul>
|
||||
<li>Some High Sierra related fixes</li>
|
||||
<li>Do not crash on launch</li>
|
||||
<li>Too narrow entries in the file browser and buffers list.</li>
|
||||
<li>GH-553: Bugfix: Do not crash when there's an error in <code>init.vim</code>.</li>
|
||||
</ul>
|
||||
]]></description>
|
||||
<releaseNotesLink>
|
||||
https://github.com/qvacua/vimr/releases/tag/snapshot/246
|
||||
https://github.com/qvacua/vimr/releases/tag/snapshot/247
|
||||
</releaseNotesLink>
|
||||
<pubDate>2017-12-09T17:57:47.512444</pubDate>
|
||||
<pubDate>2017-12-10T13:39:21.178131</pubDate>
|
||||
<minimumSystemVersion>10.10.0</minimumSystemVersion>
|
||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/snapshot/246/VimR-SNAPSHOT-246.tar.bz2"
|
||||
sparkle:version="246"
|
||||
sparkle:shortVersionString="SNAPSHOT-246"
|
||||
sparkle:dsaSignature="MC0CFQDzBKxwPeP9IlKVvTwZqbQTR6gFAwIUQN9zAHmttTpkoH/OCs+//tw12yk="
|
||||
length="14730787"
|
||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/snapshot/247/VimR-SNAPSHOT-247.tar.bz2"
|
||||
sparkle:version="247"
|
||||
sparkle:shortVersionString="SNAPSHOT-247"
|
||||
sparkle:dsaSignature="MC0CFQCvAQp3uJZ3YNzspqFWM3u23hHlTQIUPL/r8dRo+/G4ZFKV6VWQX0H0cAw="
|
||||
length="14731761"
|
||||
type="application/octet-stream"/>
|
||||
</item>
|
||||
</channel>
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user