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