mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-29 00:34:26 +03:00
Merge branch 'develop' into update-neovim
This commit is contained in:
commit
cca384fae4
@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-193</string>
|
||||
<string>SNAPSHOT-195</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>193</string>
|
||||
<string>195</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.productivity</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-193</string>
|
||||
<string>SNAPSHOT-195</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>193</string>
|
||||
<string>195</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -15,11 +15,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-193</string>
|
||||
<string>SNAPSHOT-195</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>193</string>
|
||||
<string>195</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2016 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
@ -7,7 +7,28 @@ import Cocoa
|
||||
|
||||
class KeyUtils {
|
||||
|
||||
static let specialKeys = [
|
||||
static func isSpecial(key: String) -> Bool {
|
||||
guard key.characters.count == 1 else {
|
||||
return false
|
||||
}
|
||||
|
||||
if let firstChar = key.utf16.first {
|
||||
return specialKeys.keys.contains(Int(firstChar))
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
static func namedKeyFrom(key: String) -> String {
|
||||
if let firstChar = key.utf16.first, specialKeys.keys.contains(Int(firstChar)) {
|
||||
return specialKeys[Int(firstChar)]!
|
||||
}
|
||||
|
||||
return key
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate let specialKeys = [
|
||||
NSUpArrowFunctionKey: "Up",
|
||||
NSDownArrowFunctionKey: "Down",
|
||||
NSLeftArrowFunctionKey: "Left",
|
||||
@ -56,27 +77,5 @@ class KeyUtils {
|
||||
NSF33FunctionKey: "F33",
|
||||
NSF34FunctionKey: "F34",
|
||||
NSF35FunctionKey: "F35",
|
||||
]
|
||||
|
||||
static func isSpecial(key: String) -> Bool {
|
||||
guard key.characters.count == 1 else {
|
||||
return false
|
||||
}
|
||||
|
||||
if let firstChar = key.utf16.first {
|
||||
return KeyUtils.specialKeys.keys.contains(Int(firstChar))
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
static func namedKeyFrom(key: String) -> String {
|
||||
if let firstChar = key.utf16.first {
|
||||
if KeyUtils.specialKeys.keys.contains(Int(firstChar)) {
|
||||
return KeyUtils.specialKeys[Int(firstChar)]!
|
||||
}
|
||||
}
|
||||
|
||||
return key
|
||||
}
|
||||
}
|
||||
0x19: "Tab",
|
||||
]
|
||||
|
@ -1036,6 +1036,7 @@ extension NeoVimView: NSTextInputClient {
|
||||
let control = modifierFlags.contains(.control)
|
||||
let option = modifierFlags.contains(.option)
|
||||
let command = modifierFlags.contains(.command)
|
||||
let shift = modifierFlags.contains(.shift)
|
||||
|
||||
if control {
|
||||
result += "C-"
|
||||
@ -1049,6 +1050,10 @@ extension NeoVimView: NSTextInputClient {
|
||||
result += "D-"
|
||||
}
|
||||
|
||||
if shift {
|
||||
result += "S-"
|
||||
}
|
||||
|
||||
if result.characters.count > 0 {
|
||||
return result
|
||||
}
|
||||
|
@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-193</string>
|
||||
<string>SNAPSHOT-195</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>193</string>
|
||||
<string>195</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -17,11 +17,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-193</string>
|
||||
<string>SNAPSHOT-195</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>193</string>
|
||||
<string>195</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -1693,7 +1693,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 193;
|
||||
DYLIB_CURRENT_VERSION = 195;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1718,7 +1718,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 193;
|
||||
DYLIB_CURRENT_VERSION = 195;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1955,7 +1955,7 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 193;
|
||||
CURRENT_PROJECT_VERSION = 195;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@ -2005,7 +2005,7 @@
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 193;
|
||||
CURRENT_PROJECT_VERSION = 195;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
|
@ -39,9 +39,8 @@ class FileOutlineView: NSOutlineView,
|
||||
self.doubleAction = #selector(FileOutlineView.doubleClickAction)
|
||||
|
||||
source
|
||||
.filter { state in
|
||||
return state.lastFileSystemUpdate.mark != self.lastFileSystemUpdateMark
|
||||
}
|
||||
.filter { !self.reloadData(for: $0) }
|
||||
.filter { $0.lastFileSystemUpdate.mark != self.lastFileSystemUpdateMark }
|
||||
.throttle(2 * FileMonitor.fileSystemEventsLatency + 1,
|
||||
latest: true,
|
||||
scheduler: SerialDispatchQueueScheduler(qos: .background))
|
||||
@ -59,25 +58,14 @@ class FileOutlineView: NSOutlineView,
|
||||
self.beFirstResponder()
|
||||
}
|
||||
|
||||
var reloadData = false
|
||||
|
||||
if self.isShowHidden != state.fileBrowserShowHidden {
|
||||
self.isShowHidden = state.fileBrowserShowHidden
|
||||
reloadData = true
|
||||
}
|
||||
|
||||
if state.cwd != self.cwd {
|
||||
self.lastFileSystemUpdateMark = state.lastFileSystemUpdate.mark
|
||||
self.root = FileBrowserItem(state.cwd)
|
||||
|
||||
reloadData = true
|
||||
}
|
||||
|
||||
if reloadData {
|
||||
self.lastFileSystemUpdateMark = state.lastFileSystemUpdate.mark
|
||||
self.reloadData()
|
||||
guard self.reloadData(for: state) else {
|
||||
return
|
||||
}
|
||||
|
||||
self.isShowHidden = state.fileBrowserShowHidden
|
||||
self.lastFileSystemUpdateMark = state.lastFileSystemUpdate.mark
|
||||
self.root = FileBrowserItem(state.cwd)
|
||||
self.reloadData()
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
}
|
||||
@ -128,6 +116,18 @@ class FileOutlineView: NSOutlineView,
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
fileprivate func reloadData(for state: StateType) -> Bool {
|
||||
if self.isShowHidden != state.fileBrowserShowHidden {
|
||||
return true
|
||||
}
|
||||
|
||||
if state.cwd != self.cwd {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
fileprivate func update(_ url: URL) {
|
||||
guard let fileBrowserItem = self.fileBrowserItem(with: url) else {
|
||||
return
|
||||
|
@ -32,7 +32,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-193</string>
|
||||
<string>SNAPSHOT-195</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
@ -49,7 +49,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>193</string>
|
||||
<string>195</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.productivity</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
@ -241,10 +241,6 @@ class MainWindow: NSObject,
|
||||
self.windowController.showWindow(self)
|
||||
}
|
||||
|
||||
func closeAllNeoVimWindowsWithoutSaving() {
|
||||
self.neoVimView.closeAllWindowsWithoutSaving()
|
||||
}
|
||||
|
||||
fileprivate let emit: (UuidAction<Action>) -> Void
|
||||
fileprivate let disposeBag = DisposeBag()
|
||||
|
||||
@ -284,6 +280,10 @@ class MainWindow: NSObject,
|
||||
|
||||
fileprivate var isClosing = false
|
||||
|
||||
fileprivate func closeAllNeoVimWindowsWithoutSaving() {
|
||||
self.neoVimView.closeAllWindowsWithoutSaving()
|
||||
}
|
||||
|
||||
fileprivate func updateNeoVimAppearance() {
|
||||
self.neoVimView.font = self.defaultFont
|
||||
self.neoVimView.linespacing = self.linespacing
|
||||
|
@ -15,10 +15,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-193</string>
|
||||
<string>SNAPSHOT-195</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>193</string>
|
||||
<string>195</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -7,22 +7,22 @@
|
||||
<description>Most recent changes with links to updates for VimR.</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>SNAPSHOT-193</title>
|
||||
<title>SNAPSHOT-195</title>
|
||||
<description><![CDATA[
|
||||
<ul>
|
||||
<li>GH-430: Bugfix: The cursor disappears when using arrow keys in the command mode.</li>
|
||||
<li>GH-403, GH-447: <code>Shift-Tab</code> works (thanks to @mkhl)</li>
|
||||
</ul>
|
||||
]]></description>
|
||||
<releaseNotesLink>
|
||||
https://github.com/qvacua/vimr/releases/tag/snapshot/193
|
||||
https://github.com/qvacua/vimr/releases/tag/snapshot/195
|
||||
</releaseNotesLink>
|
||||
<pubDate>2017-05-12T23:20:22.770207</pubDate>
|
||||
<pubDate>2017-05-17T19:40:40.275108</pubDate>
|
||||
<minimumSystemVersion>10.10.0</minimumSystemVersion>
|
||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/snapshot/193/VimR-SNAPSHOT-193.tar.bz2"
|
||||
sparkle:version="193"
|
||||
sparkle:shortVersionString="SNAPSHOT-193"
|
||||
sparkle:dsaSignature="MC4CFQC1aDJi3Q89AC6a+d/EBdDNdpPQOQIVAIJ8w231RvNEZ25jXIeOAUuddkWK"
|
||||
length="12372402"
|
||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/snapshot/195/VimR-SNAPSHOT-195.tar.bz2"
|
||||
sparkle:version="195"
|
||||
sparkle:shortVersionString="SNAPSHOT-195"
|
||||
sparkle:dsaSignature="MC4CFQCwD/Vg2FqkoYzR1xmBgij6V9MuHgIVAKXOZ5TFeYY/yyCRm+0p5ymLVVE4"
|
||||
length="12366293"
|
||||
type="application/octet-stream"/>
|
||||
</item>
|
||||
</channel>
|
||||
|
@ -3,6 +3,7 @@
|
||||
* GH-395: Bugfix: Massive file system changes in the working directory causes VimR to freeze.
|
||||
* GH-430: Bugfix: The cursor disappears when using arrow keys in the command mode.
|
||||
* GH-450: Mild file browser refactoring
|
||||
* GH-403, GH-447: `Shift-Tab` works (thanks to @mkhl)
|
||||
|
||||
# 0.15.0-191
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user