diff --git a/Cartfile b/Cartfile
index e9f6021f..c33cc077 100644
--- a/Cartfile
+++ b/Cartfile
@@ -4,10 +4,8 @@ github "eonil/FileSystemEvents" == 1.0.0
github "sparkle-project/Sparkle" == 1.21.3
github "qvacua/CocoaFontAwesome" "master"
github "qvacua/CocoaMarkdown" "master"
-github "qvacua/RxMessagePort" == 0.0.5
-github "qvacua/RxNeovimApi" == 0.3.4
-# remove after 10.12 update
-github "qvacua/RxMsgpackRpc" == 0.0.7
+github "qvacua/RxMessagePort" == 0.0.6
+github "qvacua/RxNeovimApi" == 0.3.4-1
github "sindresorhus/github-markdown-css" == 3.0.1
github "httpswift/swifter" == 1.4.5
github "a2/MessagePack.swift" == 3.0.0
diff --git a/Cartfile.resolved b/Cartfile.resolved
index 6e6b3094..124ed6d3 100644
--- a/Cartfile.resolved
+++ b/Cartfile.resolved
@@ -6,11 +6,11 @@ github "a2/MessagePack.swift" "3.0.0"
github "elegantchaos/DictionaryCoding" "1.0.6"
github "eonil/FileSystemEvents" "1.0.0"
github "httpswift/swifter" "1.4.5"
-github "qvacua/CocoaFontAwesome" "76cf6c4ef3088d84f78988183c56fc6abdc19f83"
-github "qvacua/CocoaMarkdown" "7756ad96d5fb390c66531004868e828bb54d3609"
-github "qvacua/RxMessagePort" "v0.0.5"
-github "qvacua/RxMsgpackRpc" "v0.0.7"
-github "qvacua/RxNeovimApi" "0.3.4"
+github "qvacua/CocoaFontAwesome" "c4d9ac161c43a7d22ae711d112ca6c6d90c86b52"
+github "qvacua/CocoaMarkdown" "c58166490a71ad4d8466f7e7b9faf7cb0917c42f"
+github "qvacua/RxMessagePort" "v0.0.6"
+github "qvacua/RxMsgpackRpc" "v0.0.8"
+github "qvacua/RxNeovimApi" "v0.3.4-1"
github "qvacua/ShortcutRecorder" "71baf522a1e57b5f130055e33dcd800687f6ea80"
github "sindresorhus/github-markdown-css" "v3.0.1"
github "sparkle-project/Sparkle" "1.21.3"
diff --git a/NvimView/DrawerDev/Info.plist b/NvimView/DrawerDev/Info.plist
index dee87dee..ca843cf0 100644
--- a/NvimView/DrawerDev/Info.plist
+++ b/NvimView/DrawerDev/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- SNAPSHOT-302
+ 0.26.0
CFBundleVersion
- 302
+ 303
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
NSHumanReadableCopyright
diff --git a/NvimView/NvimView.xcodeproj/project.pbxproj b/NvimView/NvimView.xcodeproj/project.pbxproj
index 7d214446..1a5e5014 100644
--- a/NvimView/NvimView.xcodeproj/project.pbxproj
+++ b/NvimView/NvimView.xcodeproj/project.pbxproj
@@ -803,7 +803,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 302;
+ CURRENT_PROJECT_VERSION = 303;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -821,7 +821,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
@@ -865,7 +865,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 302;
+ CURRENT_PROJECT_VERSION = 303;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -877,7 +877,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
SWIFT_DISABLE_SAFETY_CHECKS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -894,7 +894,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 302;
+ DYLIB_CURRENT_VERSION = 303;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_VERSION = A;
@@ -916,7 +916,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 302;
+ DYLIB_CURRENT_VERSION = 303;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
FRAMEWORK_VERSION = A;
diff --git a/NvimView/NvimView/AttributesRunDrawer.swift b/NvimView/NvimView/AttributesRunDrawer.swift
index 93caceae..f7b65a7b 100644
--- a/NvimView/NvimView/AttributesRunDrawer.swift
+++ b/NvimView/NvimView/AttributesRunDrawer.swift
@@ -20,6 +20,8 @@ final class AttributesRunDrawer {
}
var usesLigatures: Bool
+ var drawsParallel = false
+
private(set) var cellSize: CGSize = .zero
private(set) var baselineOffset: CGFloat = 0
private(set) var descent: CGFloat = 0
@@ -40,15 +42,11 @@ final class AttributesRunDrawer {
offset: CGPoint,
`in` context: CGContext
) {
- #if DEBUG
- self.drawByParallelComputation(
- attrsRuns,
- defaultAttributes: defaultAttributes,
- offset: offset,
- in: context
- )
- #else
- let runs = attrsRuns.map { self.fontGlyphRuns(from: $0, offset: offset) }
+ let runs = self.drawsParallel ?
+ attrsRuns.parallelMap(chunkSize: 50) { run in
+ self.fontGlyphRuns(from: run, offset: offset)
+ }
+ : attrsRuns.map { self.fontGlyphRuns(from: $0, offset: offset) }
for i in 0..CFBundlePackageType
FMWK
CFBundleShortVersionString
- SNAPSHOT-302
+ 0.26.0
CFBundleVersion
- 302
+ 303
NSHumanReadableCopyright
Copyright © 2017 Tae Won Ha. All rights reserved.
NSPrincipalClass
diff --git a/NvimView/NvimView/NvimView.swift b/NvimView/NvimView/NvimView.swift
index 2efb2e83..0e97fc0e 100644
--- a/NvimView/NvimView/NvimView.swift
+++ b/NvimView/NvimView/NvimView.swift
@@ -139,6 +139,12 @@ public class NvimView: NSView,
}
}
+ public var drawsParallel = false {
+ didSet {
+ self.drawer.drawsParallel = self.drawsParallel
+ }
+ }
+
public var linespacing: CGFloat {
get {
return self._linespacing
diff --git a/NvimView/NvimView/SwiftCommons.swift b/NvimView/NvimView/SwiftCommons.swift
index fde5b056..0b0e8024 100644
--- a/NvimView/NvimView/SwiftCommons.swift
+++ b/NvimView/NvimView/SwiftCommons.swift
@@ -16,20 +16,34 @@ extension Array where Element: Hashable {
extension RandomAccessCollection where Index == Int {
- /// Does not retain the order of elements.
- func parallelMap(_ transform: @escaping (Element) -> T) -> [T] {
- var result = Array()
- result.reserveCapacity(self.count)
+ func parallelMap(
+ chunkSize: Int = 1,
+ _ transform: @escaping (Element) -> T
+ ) -> [T] {
+ let count = self.count
+ guard count > chunkSize else { return self.map(transform) }
- var lock = OS_SPINLOCK_INIT
- DispatchQueue.concurrentPerform(iterations: self.count) { i in
- let mapped = transform(self[self.startIndex + i])
- OSSpinLockLock(&lock)
- result.append(mapped)
- OSSpinLockUnlock(&lock)
+ var result = Array(repeating: nil, count: count)
+
+ // If we don't use Array.withUnsafeMutableBufferPointer,
+ // then we get crashes.
+ result.withUnsafeMutableBufferPointer { pointer in
+ if chunkSize == 1 {
+ DispatchQueue.concurrentPerform(iterations: count) { i in
+ pointer[i] = transform(self[i])
+ }
+ } else {
+ let chunkCount = Int(ceil(Double(self.count) / Double(chunkSize)))
+ DispatchQueue.concurrentPerform(iterations: chunkCount) { chunkIndex in
+ let start = Swift.min(chunkIndex * chunkSize, count)
+ let end = Swift.min(start + chunkSize, count)
+
+ (start..(
diff --git a/NvimView/NvimViewTests/Info.plist b/NvimView/NvimViewTests/Info.plist
index a6c54c92..dfe9f10c 100644
--- a/NvimView/NvimViewTests/Info.plist
+++ b/NvimView/NvimViewTests/Info.plist
@@ -15,8 +15,8 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- SNAPSHOT-302
+ 0.26.0
CFBundleVersion
- 302
+ 303
diff --git a/NvimView/third-party/libintl/lib/libintl.8.dylib b/NvimView/third-party/libintl/lib/libintl.8.dylib
index 01982e4e..e2fdddb5 100755
Binary files a/NvimView/third-party/libintl/lib/libintl.8.dylib and b/NvimView/third-party/libintl/lib/libintl.8.dylib differ
diff --git a/NvimView/third-party/libintl/lib/libintl.a b/NvimView/third-party/libintl/lib/libintl.a
index 55562431..291d3d67 100644
Binary files a/NvimView/third-party/libintl/lib/libintl.a and b/NvimView/third-party/libintl/lib/libintl.a differ
diff --git a/README.md b/README.md
index 6d988eb8..a469e689 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ VimR — Neovim Refined
[Download](https://github.com/qvacua/vimr/releases) •
-[![Bountysource](https://www.bountysource.com/badge/team?team_id=933&style=raised)](https://www.bountysource.com/teams/vimr?utm_source=VimR%20%E2%80%94%20Vim%20Refined&utm_medium=shield&utm_campaign=raised) [![Chat at https://gitter.im/vimr/vimr](https://badges.gitter.im/vimr/vimr.svg)](https://gitter.im/vimr/vimr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Travis builds](https://travis-ci.org/qvacua/vimr.svg?branch=develop)](https://travis-ci.org/qvacua/vimr) [![Stories in Ready](https://badge.waffle.io/qvacua/vimr.svg?label=ready&title=Ready)](http://waffle.io/qvacua/vimr)
+[![Bountysource](https://www.bountysource.com/badge/team?team_id=933&style=raised)](https://www.bountysource.com/teams/vimr?utm_source=VimR%20%E2%80%94%20Vim%20Refined&utm_medium=shield&utm_campaign=raised) [![Chat at https://gitter.im/vimr/vimr](https://badges.gitter.im/vimr/vimr.svg)](https://gitter.im/vimr/vimr?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Stories in Ready](https://badge.waffle.io/qvacua/vimr.svg?label=ready&title=Ready)](http://waffle.io/qvacua/vimr)
![Screenshot 1](https://raw.githubusercontent.com/qvacua/vimr/develop/resources/screenshot1.png)
![Screenshot 0](https://raw.githubusercontent.com/qvacua/vimr/develop/resources/screenshot0.png)
@@ -13,9 +13,9 @@ VimR — Neovim Refined
## About
-Project VimR is an attempt to refine the Neovim experience (or just YA Neovim GUI for mac OS). The goal is to build an editor that uses Neovim inside with many of the convenience GUI features similar to those present in modern editors. We mainly use Swift, but also use Objective-C when its C-nature helps.
+Project VimR is an attempt to refine the Neovim experience (or just YA Neovim GUI for macOS). The goal is to build an editor that uses Neovim inside with many of the convenience GUI features similar to those present in modern editors. We mainly use Swift, but also use Objective-C when its C-nature helps.
-There are other working Neovim GUIs for OS X, e.g. [NyaoVim](https://github.com/rhysd/NyaoVim), [neovim-dot-app](https://github.com/rogual/neovim-dot-app), etc., why another?
+There are other working Neovim GUIs for macOS, e.g. [NyaoVim](https://github.com/rhysd/NyaoVim), [neovim-dot-app](https://github.com/rogual/neovim-dot-app), [Oni](https://onivim.io), etc., why another?
- play around (obviously) with [Neovim](https://github.com/qvacua/neovim),
- play around with Swift (and especially with [RxSwift](https://github.com/ReactiveX/RxSwift)) and
@@ -33,17 +33,14 @@ If you want to support VimR financially, you can use [Bountysource](https://www.
Pre-built binaries can be found under [Releases](https://github.com/qvacua/vimr/releases).
-## Implemented Features
+## Some Features
-* Multiple windows.
* Basic input including Emojis and Hangul (+Hanja): We don't know whether other input systems work...
* Markdown preview
* Generic HTML preview (retains the scroll position when reloading)
-* Basic mouse support: Left button actions and scrolling.
* Fuzzy file finder a la Xcode's "Open Quickly..."
-* Basic trackpad support: Pinching for zooming and two-finger scrolling.
+* Trackpad support: Pinching for zooming and two-finger scrolling.
* Ligatures: Turned off by default. Turn it on in the Preferences.
-* Basic File and Edit menu items.
* Command line tool.
* (Simple) File browser
* Flexible workspace model a la JetBrain's IDEs
@@ -59,7 +56,7 @@ git submodule init
git submodule update
```
-You have to use Xcode 9. First install `homebrew`, then in the project root:
+You have to use Xcode 10.1. First install `homebrew`, then in the project root:
```bash
xcode-select --install # install the Xcode command line tools, if you haven't already
@@ -75,7 +72,7 @@ brew bundle
```
VimR.app
+-- NvimView.framework
- +-- NeoVimView
+ +-- NVimView
+-- runtime files for Neovim
+-- NvimServer
+-- libnvim
diff --git a/VimR/VimR.xcodeproj/project.pbxproj b/VimR/VimR.xcodeproj/project.pbxproj
index 52a6c73e..0656d0c1 100644
--- a/VimR/VimR.xcodeproj/project.pbxproj
+++ b/VimR/VimR.xcodeproj/project.pbxproj
@@ -1334,7 +1334,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 302;
+ CURRENT_PROJECT_VERSION = 303;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -1352,7 +1352,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "-D DEBUG";
@@ -1392,7 +1392,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 302;
+ CURRENT_PROJECT_VERSION = 303;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -1404,7 +1404,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
SWIFT_DISABLE_SAFETY_CHECKS = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
diff --git a/VimR/VimR/AdvancedPrefReducer.swift b/VimR/VimR/AdvancedPrefReducer.swift
index 16a2070f..fe78921c 100644
--- a/VimR/VimR/AdvancedPrefReducer.swift
+++ b/VimR/VimR/AdvancedPrefReducer.swift
@@ -17,7 +17,11 @@ class AdvancedPrefReducer: ReducerType {
case let .setUseLiveResize(value):
state.mainWindowTemplate.useLiveResize = value
- state.mainWindows.keys.forEach { state.mainWindows[$0]?.useLiveResize = value }
+ state.mainWindows.keys.forEach { state.mainWindows[$0]?.useLiveResize = value }
+
+ case let .setDrawsParallel(value):
+ state.mainWindowTemplate.drawsParallel = value
+ state.mainWindows.keys.forEach { state.mainWindows[$0]?.drawsParallel = value }
case let .setTrackpadScrollResistance(value):
state.mainWindowTemplate.trackpadScrollResistance = value
diff --git a/VimR/VimR/AdvencedPref.swift b/VimR/VimR/AdvencedPref.swift
index 5f03da63..26165812 100644
--- a/VimR/VimR/AdvencedPref.swift
+++ b/VimR/VimR/AdvencedPref.swift
@@ -17,6 +17,7 @@ class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
case setUseSnapshotUpdate(Bool)
case setTrackpadScrollResistance(Double)
case setUseLiveResize(Bool)
+ case setDrawsParallel(Bool)
}
override var displayName: String {
@@ -34,6 +35,7 @@ class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
self.useSnapshotUpdate = state.useSnapshotUpdate
self.sensitivity = 1 / state.mainWindowTemplate.trackpadScrollResistance
self.useLiveResize = state.mainWindowTemplate.useLiveResize
+ self.drawsParallel = state.mainWindowTemplate.drawsParallel
super.init(frame: .zero)
@@ -63,11 +65,13 @@ class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
private var useInteractiveZsh: Bool
private var useSnapshotUpdate: Bool
private var useLiveResize: Bool
+ private var drawsParallel: Bool
private var sensitivity: Double
private let useInteractiveZshCheckbox = NSButton(forAutoLayout: ())
private let useSnapshotUpdateCheckbox = NSButton(forAutoLayout: ())
private let useLiveResizeCheckbox = NSButton(forAutoLayout: ())
+ private let drawsParallelCheckbox = NSButton(forAutoLayout: ())
private let sensitivitySlider = NSSlider(forAutoLayout: ())
required init?(coder: NSCoder) {
@@ -78,6 +82,7 @@ class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
self.useSnapshotUpdateCheckbox.boolState = self.useSnapshotUpdate
self.useInteractiveZshCheckbox.boolState = self.useInteractiveZsh
self.useLiveResizeCheckbox.boolState = self.useLiveResize
+ self.drawsParallelCheckbox.boolState = self.drawsParallel
// We don't update the value of the NSSlider since we don't know when events are fired.
}
@@ -108,7 +113,7 @@ class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
""")
let useLiveResize = self.useLiveResizeCheckbox
- self.configureCheckbox(button: self.useLiveResizeCheckbox,
+ self.configureCheckbox(button: useLiveResize,
title: "Use Live Window Resizing",
action: #selector(AdvancedPref.useLiveResizeAction(_:)))
@@ -117,6 +122,19 @@ class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
If you do, please report them at [GitHub](https://github.com/qvacua/vimr/issues).
""")
+ let drawsParallelBox = self.drawsParallelCheckbox
+ self.configureCheckbox(button: drawsParallelBox,
+ title: "Use Concurrent Rendering",
+ action: #selector(AdvancedPref.drawParallelAction(_:)))
+
+ let drawsParallelInfo = self.infoTextField(
+ markdown: """
+ VimR can compute the glyphs concurrently. This may result in faster rendering,
+ depending on the situation. It will definitely result in higher CPU usage, e.g.
+ when scrolling very fast.
+ """
+ )
+
let sensitivityTitle = self.titleTextField(title: "Scroll Sensitivity:")
let sensitivity = self.sensitivitySlider
sensitivity.maxValue = 1 / 5.0
@@ -142,6 +160,8 @@ class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
self.addSubview(sensitivityInfo)
self.addSubview(useLiveResize)
self.addSubview(useLiveResizeInfo)
+ self.addSubview(drawsParallelBox)
+ self.addSubview(drawsParallelInfo)
paneTitle.autoPinEdge(toSuperviewEdge: .top, withInset: 18)
paneTitle.autoPinEdge(toSuperviewEdge: .left, withInset: 18)
@@ -165,7 +185,14 @@ class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
useLiveResizeInfo.autoPinEdge(.left, to: .left, of: useLiveResize)
useLiveResizeInfo.autoSetDimension(.width, toSize: 300)
- useSnapshotUpdate.autoPinEdge(.top, to: .bottom, of: useLiveResizeInfo, withOffset: 18)
+ drawsParallelBox.autoPinEdge(.top, to: .bottom, of: useLiveResizeInfo, withOffset: 18)
+ drawsParallelBox.autoPinEdge(.left, to: .right, of: sensitivityTitle, withOffset: 5)
+
+ drawsParallelInfo.autoPinEdge(.top, to: .bottom, of: drawsParallelBox, withOffset: 5)
+ drawsParallelInfo.autoPinEdge(.left, to: .left, of: drawsParallelBox)
+ drawsParallelInfo.autoSetDimension(.width, toSize: 300)
+
+ useSnapshotUpdate.autoPinEdge(.top, to: .bottom, of: drawsParallelInfo, withOffset: 18)
useSnapshotUpdate.autoPinEdge(.left, to: .right, of: sensitivityTitle, withOffset: 5)
useSnapshotUpdateInfo.autoPinEdge(.top, to: .bottom, of: useSnapshotUpdate, withOffset: 5)
@@ -188,6 +215,10 @@ extension AdvancedPref {
self.emit(.setUseLiveResize(sender.boolState))
}
+ @objc func drawParallelAction(_ sender: NSButton) {
+ self.emit(.setDrawsParallel(sender.boolState))
+ }
+
@objc func sensitivitySliderAction(_ sender: NSSlider) {
self.emit(.setTrackpadScrollResistance(1 / sender.doubleValue))
}
diff --git a/VimR/VimR/Info.plist b/VimR/VimR/Info.plist
index 2bd530e0..63dc4da9 100644
--- a/VimR/VimR/Info.plist
+++ b/VimR/VimR/Info.plist
@@ -1224,7 +1224,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- SNAPSHOT-302
+ 0.26.0
CFBundleSignature
????
CFBundleURLTypes
@@ -1241,7 +1241,7 @@
CFBundleVersion
- 302
+ 303
LSApplicationCategoryType
public.app-category.productivity
LSMinimumSystemVersion
diff --git a/VimR/VimR/MainWindow.swift b/VimR/VimR/MainWindow.swift
index ec6deeaa..25fa3b5b 100644
--- a/VimR/VimR/MainWindow.swift
+++ b/VimR/VimR/MainWindow.swift
@@ -215,6 +215,7 @@ class MainWindow: NSObject,
self.defaultFont = state.appearance.font
self.linespacing = state.appearance.linespacing
self.usesLigatures = state.appearance.usesLigatures
+ self.usesLigatures = state.drawsParallel
self.editorPosition = state.preview.editorPosition
self.previewPosition = state.preview.previewPosition
@@ -253,6 +254,7 @@ class MainWindow: NSObject,
state.trackpadScrollResistance
)
self.neoVimView.usesLiveResize = state.useLiveResize
+ self.neoVimView.drawsParallel = self.drawsParallel
self.updateNeoVimAppearance()
Observable
@@ -401,6 +403,11 @@ class MainWindow: NSObject,
self.neoVimView.usesLiveResize = state.useLiveResize
}
+ if self.drawsParallel != state.drawsParallel {
+ self.drawsParallel = state.drawsParallel
+ self.neoVimView.drawsParallel = self.drawsParallel
+ }
+
if self.defaultFont != state.appearance.font
|| self.linespacing != state.appearance.linespacing
|| self.usesLigatures != state.appearance.usesLigatures {
@@ -460,6 +467,7 @@ class MainWindow: NSObject,
private var defaultFont = NvimView.defaultFont
private var linespacing = NvimView.defaultLinespacing
private var usesLigatures = false
+ private var drawsParallel = false
private var previewPosition = Marked(Position.beginning)
diff --git a/VimR/VimR/States.swift b/VimR/VimR/States.swift
index d82cf053..10b051fa 100644
--- a/VimR/VimR/States.swift
+++ b/VimR/VimR/States.swift
@@ -263,6 +263,7 @@ extension MainWindow {
var trackpadScrollResistance = 5.0
var useLiveResize = false
+ var drawsParallel = false
var isTemporarySession = false
@@ -308,6 +309,7 @@ extension MainWindow {
case trackpadScrollResistance = "trackpad-scroll-resistance"
case useInteractiveZsh = "use-interactive-zsh"
case useLiveResize = "use-live-resize"
+ case drawsParallel = "draws-parallel"
case isShowHidden = "is-show-hidden"
case appearance = "appearance"
@@ -326,6 +328,7 @@ extension MainWindow {
self.trackpadScrollResistance = try container.decode(forKey: .trackpadScrollResistance,
default: State.default.trackpadScrollResistance)
self.useLiveResize = try container.decode(forKey: .useLiveResize, default: State.default.useLiveResize)
+ self.drawsParallel = try container.decode(forKey: .drawsParallel, default: State.default.drawsParallel)
if let frameRawValue = try container.decodeIfPresent(String.self, forKey: .frame) {
self.frame = NSRectFromString(frameRawValue)
} else {
@@ -380,6 +383,7 @@ extension MainWindow {
try container.encode(NSStringFromRect(self.frame), forKey: .frame)
try container.encode(self.trackpadScrollResistance, forKey: .trackpadScrollResistance)
try container.encode(self.useLiveResize, forKey: .useLiveResize)
+ try container.encode(self.drawsParallel, forKey: .drawsParallel)
try container.encode(self.isLeftOptionMeta, forKey: .isLeftOptionMeta)
try container.encode(self.isRightOptionMeta, forKey: .isRightOptionMeta)
try container.encode(self.useInteractiveZsh, forKey: .useInteractiveZsh)
diff --git a/VimR/VimR/SwiftCommons.swift b/VimR/VimR/SwiftCommons.swift
index ef335ef3..6a95d1b2 100644
--- a/VimR/VimR/SwiftCommons.swift
+++ b/VimR/VimR/SwiftCommons.swift
@@ -21,42 +21,6 @@ extension String {
}
}
-extension Array {
-
- /// Concurrent and chunked version of `Array.map`.
- ///
- /// - parameters:
- /// - chunk: Batch size; defaults to `100`.
- /// - queue: Defaults to `dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)`.
- /// - transform: The transform function.
- /// - returns: Transformed array of `self`.
- func concurrentChunkMap(
- _ chunk: Int = 100,
- queue: DispatchQueue = .global(qos: .userInitiated),
- transform: (Element) -> R
- ) -> [R] {
- let count = self.count
-
- let chunkedCount = Int(ceil(Float(count) / Float(chunk)))
- var result: [[R]] = []
-
- var spinLock = OS_SPINLOCK_INIT
-
- DispatchQueue.concurrentPerform(iterations: chunkedCount) { idx in
- let startIndex = Swift.min(idx * chunk, count)
- let endIndex = Swift.min(startIndex + chunk, count)
-
- let mappedChunk = self[startIndex.. [Element] {
diff --git a/VimR/VimRTests/Info.plist b/VimR/VimRTests/Info.plist
index 068edc1b..389683f6 100644
--- a/VimR/VimRTests/Info.plist
+++ b/VimR/VimRTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- SNAPSHOT-302
+ 0.26.0
CFBundleSignature
????
CFBundleVersion
- 302
+ 303
diff --git a/appcast.xml b/appcast.xml
index ed04f8fc..035ae9fe 100644
--- a/appcast.xml
+++ b/appcast.xml
@@ -7,36 +7,28 @@
Most recent changes with links to updates for VimR.
en
-
- v0.25.0-297
+ v0.26.0-303
-Neovim 0.3.4
-GH-625:
vimr --cur-env
will pass the current environment variables to the new neovim process. This will result in virtualenv
support.
-GH-443: vimr --line ${LINE_NUMBER} ${SOME_FILE}
will open the file and go to the given line. If the file is already open in a UI window, then that window will be selected and the cursor will be moved to the given line. This can be used for example to reverse-search LaTeX.
-GH-603: Bugfix: Cmd-V
pastes at the wrong location in the insert mode.
-GH-659: Bugfix (introduced in a snapshot): Turning off ligatures does not really turn off ligatures.
-GH-664: Bugfix: VimR crashes for some shell configurations.
-GH-666: Adapt to the new UI-API of Neovim
-Dependencies updates:
-- ReactiveX/RxSwift@4.4.1
-- httpswift/swifter@1.4.5
-- PureLayout/PureLayout@3.1.4
-- sindresorhus/github-markdown-css@3.0.1
-- sparkle-project/Sparkle@1.21.3
-
-
+Minimum macOS requirement is now 10.12 Sierra.
+Optional parallel computation of glyphs. This may result in faster rendering depending on the situation.
+GH-314: You can customize the key shortcut for all menu items in the Shortcut preferences pane.
+GH-501: Add key shortcuts to toggle the Buffer List, Markdown Preview, and HTML Preview tools.
+GH-649: Add commands that can control some of GUI elements.
+GH-506: Set font, size and linespacing via ~/.config/nvim/ginit.vim
.
+Draw the disclosure triangle in appropriate color of the current color scheme (and improve handling of changes of cwd
in the file browser).
]]>
- https://github.com/qvacua/vimr/releases/tag/v0.25.0-297
+ https://github.com/qvacua/vimr/releases/tag/v0.26.0-303
- 2019-02-23T17:55:14.811734
+ 2019-03-06T16:41:54.852561
10.10.0
-
diff --git a/appcast_snapshot.xml b/appcast_snapshot.xml
index 63fb863d..035ae9fe 100644
--- a/appcast_snapshot.xml
+++ b/appcast_snapshot.xml
@@ -7,22 +7,28 @@
Most recent changes with links to updates for VimR.
en
-
- SNAPSHOT-302
+ v0.26.0-303
+Minimum macOS requirement is now 10.12 Sierra.
+Optional parallel computation of glyphs. This may result in faster rendering depending on the situation.
+GH-314: You can customize the key shortcut for all menu items in the Shortcut preferences pane.
+GH-501: Add key shortcuts to toggle the Buffer List, Markdown Preview, and HTML Preview tools.
+GH-649: Add commands that can control some of GUI elements.
GH-506: Set font, size and linespacing via
~/.config/nvim/ginit.vim
.
+Draw the disclosure triangle in appropriate color of the current color scheme (and improve handling of changes of cwd
in the file browser).
]]>
- https://github.com/qvacua/vimr/releases/tag/snapshot/302
+ https://github.com/qvacua/vimr/releases/tag/v0.26.0-303
- 2019-03-05T09:14:18.762884
+ 2019-03-06T16:41:54.852561
10.10.0
-
diff --git a/bin/build_deps.sh b/bin/build_deps.sh
index a6af38c3..ce396e21 100755
--- a/bin/build_deps.sh
+++ b/bin/build_deps.sh
@@ -3,7 +3,7 @@
set -e
GETTEXT_VERSION="0.19.8.1"
-DEPLOYMENT_TARGET="10.11"
+DEPLOYMENT_TARGET="10.12"
echo "### Building deps"
diff --git a/bin/build_libnvim.sh b/bin/build_libnvim.sh
index 260d19ce..9a99ea48 100755
--- a/bin/build_libnvim.sh
+++ b/bin/build_libnvim.sh
@@ -2,7 +2,7 @@
set -e
-DEPLOYMENT_TARGET="10.11"
+DEPLOYMENT_TARGET="10.12"
echo "### Building libnvim"
diff --git a/resources/advanced-pref.png b/resources/advanced-pref.png
new file mode 100644
index 00000000..5f9af800
Binary files /dev/null and b/resources/advanced-pref.png differ
diff --git a/resources/appearance-pref.png b/resources/appearance-pref.png
new file mode 100644
index 00000000..fe9c77d5
Binary files /dev/null and b/resources/appearance-pref.png differ
diff --git a/resources/release-notes.md b/resources/release-notes.md
index 652e7eba..39da54a1 100644
--- a/resources/release-notes.md
+++ b/resources/release-notes.md
@@ -1,11 +1,16 @@
-# 0.26.0-???
+# 0.27.0-???
+* ...
+
+# 0.26.0-303
+
+* Minimum macOS requirement is now 10.12 Sierra.
+* Optional parallel computation of glyphs. This may result in faster rendering depending on the situation.
* GH-314: You can customize the key shortcut for all menu items in the *Shortcut* preferences pane.
* GH-501: Add key shortcuts to toggle the Buffer List, Markdown Preview, and HTML Preview tools.
* GH-649: Add commands that can control some of GUI elements.
* GH-506: Set font, size and linespacing via `~/.config/nvim/ginit.vim`.
* Draw the disclosure triangle in appropriate color of the current color scheme (and improve handling of changes of `cwd` in the file browser).
-* ...
# 0.25.0-297
diff --git a/resources/screenshot1.png b/resources/screenshot1.png
index 5a2e62d3..cd435046 100644
Binary files a/resources/screenshot1.png and b/resources/screenshot1.png differ
diff --git a/resources/shortcuts-pref.png b/resources/shortcuts-pref.png
new file mode 100644
index 00000000..57fdca48
Binary files /dev/null and b/resources/shortcuts-pref.png differ