mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-24 03:25:03 +03:00
Merge remote-tracking branch 'origin/develop' into update-neovim
This commit is contained in:
commit
d05eb08ec7
@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-347</string>
|
||||
<string>SNAPSHOT-349</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>347</string>
|
||||
<string>349</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -17,9 +17,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-347</string>
|
||||
<string>SNAPSHOT-349</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>347</string>
|
||||
<string>349</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -38,9 +38,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-347</string>
|
||||
<string>SNAPSHOT-349</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>347</string>
|
||||
<string>349</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
@ -1182,7 +1182,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 347;
|
||||
CURRENT_PROJECT_VERSION = 349;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@ -1245,7 +1245,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 347;
|
||||
CURRENT_PROJECT_VERSION = 349;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
@ -1275,7 +1275,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 347;
|
||||
DYLIB_CURRENT_VERSION = 349;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
|
||||
FRAMEWORK_VERSION = A;
|
||||
@ -1297,7 +1297,7 @@
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 347;
|
||||
DYLIB_CURRENT_VERSION = 349;
|
||||
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-347</string>
|
||||
<string>SNAPSHOT-349</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>347</string>
|
||||
<string>349</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2017 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
@ -92,4 +92,5 @@ private let specialKeys = [
|
||||
0x09: "Tab",
|
||||
0x19: "Tab",
|
||||
0xd: "CR",
|
||||
0x20: "Space",
|
||||
]
|
||||
|
@ -122,6 +122,14 @@ extension NvimView {
|
||||
return false
|
||||
}
|
||||
|
||||
// Space key (especially in combination with modifiers) can result in
|
||||
// unexpected chars (e.g. ctrl-space = \0), so catch the event early and
|
||||
// pass it to keyDown.
|
||||
if 49 == event.keyCode {
|
||||
self.keyDown(with: event)
|
||||
return true
|
||||
}
|
||||
|
||||
guard let chars = event.characters else {
|
||||
return false;
|
||||
}
|
||||
|
@ -15,8 +15,8 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-347</string>
|
||||
<string>SNAPSHOT-349</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>347</string>
|
||||
<string>349</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -1435,7 +1435,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 347;
|
||||
CURRENT_PROJECT_VERSION = 349;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@ -1495,7 +1495,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 347;
|
||||
CURRENT_PROJECT_VERSION = 349;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
|
@ -7,7 +7,7 @@ import Cocoa
|
||||
import PureLayout
|
||||
import RxSwift
|
||||
|
||||
class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate {
|
||||
class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate, NSFontChanging {
|
||||
|
||||
typealias StateType = AppState
|
||||
|
||||
@ -49,6 +49,8 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
self.addViews()
|
||||
self.updateViews()
|
||||
|
||||
sharedFontManager.target = self
|
||||
|
||||
source
|
||||
.observeOn(MainScheduler.instance)
|
||||
.subscribe(onNext: { state in
|
||||
@ -86,10 +88,7 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
|
||||
private let colorschemeCheckbox = NSButton(forAutoLayout: ())
|
||||
private let fileIconCheckbox = NSButton(forAutoLayout: ())
|
||||
|
||||
private let sizes = [9, 10, 11, 12, 13, 14, 16, 18, 24, 36, 48, 64]
|
||||
private let sizeCombo = NSComboBox(forAutoLayout: ())
|
||||
private let fontPopup = NSPopUpButton(frame: .zero, pullsDown: false)
|
||||
private let fontPanelButton = NSButton(forAutoLayout: ())
|
||||
private let linespacingField = NSTextField(forAutoLayout: ())
|
||||
private let characterspacingField = NSTextField(forAutoLayout: ())
|
||||
private let ligatureCheckbox = NSButton(forAutoLayout: ())
|
||||
@ -139,25 +138,12 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
)
|
||||
|
||||
let fontTitle = self.titleTextField(title: "Default Font:")
|
||||
|
||||
let fontPopup = self.fontPopup
|
||||
fontPopup.target = self
|
||||
fontPopup.action = #selector(AppearancePref.fontPopupAction)
|
||||
|
||||
// This takes quite some time.
|
||||
DispatchQueue.global(qos: .userInitiated).async {
|
||||
let fontNames = sharedFontManager.monospacedRegularFontNames()
|
||||
DispatchQueue.main.async {
|
||||
fontPopup.addItems(withTitles: fontNames)
|
||||
self.updateViews()
|
||||
}
|
||||
}
|
||||
|
||||
let sizeCombo = self.sizeCombo
|
||||
sizeCombo.delegate = self
|
||||
sizeCombo.target = self
|
||||
sizeCombo.action = #selector(AppearancePref.sizeComboBoxDidEnter(_:))
|
||||
self.sizes.forEach { string in sizeCombo.addItem(withObjectValue: string) }
|
||||
let fontPanelButton = self.fontPanelButton
|
||||
fontPanelButton.bezelStyle = .rounded
|
||||
fontPanelButton.isBordered = true
|
||||
fontPanelButton.setButtonType(.momentaryPushIn)
|
||||
fontPanelButton.target = self
|
||||
fontPanelButton.action = #selector(AppearancePref.showFontPanel(_:))
|
||||
|
||||
let linespacingTitle = self.titleTextField(title: "Line Spacing:")
|
||||
let linespacingField = self.linespacingField
|
||||
@ -209,8 +195,7 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
self.addSubview(fileIcon)
|
||||
self.addSubview(fileIconInfo)
|
||||
self.addSubview(fontTitle)
|
||||
self.addSubview(fontPopup)
|
||||
self.addSubview(sizeCombo)
|
||||
self.addSubview(fontPanelButton)
|
||||
self.addSubview(linespacingTitle)
|
||||
self.addSubview(linespacingField)
|
||||
self.addSubview(characterspacingTitle)
|
||||
@ -235,16 +220,10 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
fileIconInfo.autoPinEdge(.left, to: .left, of: fileIcon)
|
||||
|
||||
fontTitle.autoPinEdge(toSuperviewEdge: .left, withInset: 18, relation: .greaterThanOrEqual)
|
||||
fontTitle.autoAlignAxis(.baseline, toSameAxisOf: fontPopup)
|
||||
fontTitle.autoAlignAxis(.baseline, toSameAxisOf: fontPanelButton)
|
||||
|
||||
fontPopup.autoPinEdge(.top, to: .bottom, of: fileIconInfo, withOffset: 18)
|
||||
fontPopup.autoPinEdge(.left, to: .right, of: fontTitle, withOffset: 5)
|
||||
fontPopup.autoSetDimension(.width, toSize: 240)
|
||||
|
||||
sizeCombo.autoSetDimension(.width, toSize: 60)
|
||||
// If we use .Baseline the combo box is placed one pixel off...
|
||||
sizeCombo.autoAlignAxis(.horizontal, toSameAxisOf: fontPopup)
|
||||
sizeCombo.autoPinEdge(.left, to: .right, of: fontPopup, withOffset: 5)
|
||||
fontPanelButton.autoPinEdge(.top, to: .bottom, of: fileIconInfo, withOffset: 18)
|
||||
fontPanelButton.autoPinEdge(.left, to: .right, of: fontTitle, withOffset: 5)
|
||||
|
||||
linespacingTitle.autoPinEdge(
|
||||
toSuperviewEdge: .left,
|
||||
@ -254,7 +233,7 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
linespacingTitle.autoPinEdge(.right, to: .right, of: fontTitle)
|
||||
linespacingTitle.autoAlignAxis(.baseline, toSameAxisOf: linespacingField)
|
||||
|
||||
linespacingField.autoPinEdge(.top, to: .bottom, of: sizeCombo, withOffset: 18)
|
||||
linespacingField.autoPinEdge(.top, to: .bottom, of: fontPanelButton, withOffset: 18)
|
||||
linespacingField.autoPinEdge(.left, to: .right, of: linespacingTitle, withOffset: 5)
|
||||
linespacingField.autoSetDimension(.width, toSize: 60)
|
||||
NotificationCenter.default.addObserver(
|
||||
@ -294,8 +273,8 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
}
|
||||
|
||||
private func updateViews() {
|
||||
if let familyName = self.font.familyName { self.fontPopup.selectItem(withTitle: familyName) }
|
||||
self.sizeCombo.stringValue = String(Int(self.font.pointSize))
|
||||
sharedFontPanel.setPanelFont(font, isMultiple: false)
|
||||
self.fontPanelButton.title = font.displayName.map { "\($0) \(font.pointSize)" } ?? "Show fonts..."
|
||||
self.linespacingField.stringValue = String(format: "%.2f", self.linespacing)
|
||||
self.characterspacingField.stringValue = String(format: "%.2f", self.characterspacing)
|
||||
self.ligatureCheckbox.boolState = self.usesLigatures
|
||||
@ -311,6 +290,16 @@ class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - NSFontChanging
|
||||
extension AppearancePref {
|
||||
func changeFont(_ sender: NSFontManager?) {
|
||||
guard let fontManager = sender else { return }
|
||||
let font = fontManager.convert(self.font)
|
||||
|
||||
self.emit(.setFont(font))
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Actions
|
||||
extension AppearancePref {
|
||||
|
||||
@ -326,28 +315,8 @@ extension AppearancePref {
|
||||
self.emit(.setUsesLigatures(sender.boolState))
|
||||
}
|
||||
|
||||
@objc func fontPopupAction(_ sender: NSPopUpButton) {
|
||||
guard let selectedItem = self.fontPopup.selectedItem else { return }
|
||||
guard selectedItem.title != self.font.familyName else { return }
|
||||
guard let newFont = NSFont(name: selectedItem.title, size: self.font.pointSize) else { return }
|
||||
|
||||
self.emit(.setFont(newFont))
|
||||
}
|
||||
|
||||
func comboBoxSelectionDidChange(_ notification: Notification) {
|
||||
guard (notification.object as! NSComboBox) === self.sizeCombo else { return }
|
||||
|
||||
let newFontSize = self.cappedFontSize(Int(self.sizes[self.sizeCombo.indexOfSelectedItem]))
|
||||
let newFont = sharedFontManager.convert(self.font, toSize: newFontSize)
|
||||
|
||||
self.emit(.setFont(newFont))
|
||||
}
|
||||
|
||||
@objc func sizeComboBoxDidEnter(_ sender: AnyObject!) {
|
||||
let newFontSize = self.cappedFontSize(self.sizeCombo.integerValue)
|
||||
let newFont = sharedFontManager.convert(self.font, toSize: newFontSize)
|
||||
|
||||
self.emit(.setFont(newFont))
|
||||
@objc func showFontPanel(_ sender: NSButton) {
|
||||
sharedFontPanel.makeKeyAndOrderFront(sender)
|
||||
}
|
||||
|
||||
func linespacingAction() {
|
||||
@ -389,3 +358,4 @@ extension AppearancePref {
|
||||
}
|
||||
|
||||
private let sharedFontManager = NSFontManager.shared
|
||||
private let sharedFontPanel = NSFontPanel.shared
|
||||
|
@ -1224,7 +1224,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>SNAPSHOT-347</string>
|
||||
<string>SNAPSHOT-349</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
@ -1241,7 +1241,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>347</string>
|
||||
<string>349</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-347</string>
|
||||
<string>SNAPSHOT-349</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>347</string>
|
||||
<string>349</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
@ -7,22 +7,26 @@
|
||||
<description>Most recent changes with links to updates for VimR.</description>
|
||||
<language>en</language>
|
||||
<item>
|
||||
<title>SNAPSHOT-347</title>
|
||||
<title>SNAPSHOT-349</title>
|
||||
<description><![CDATA[
|
||||
<ul>
|
||||
<li>Improve drawing performance.</li>
|
||||
<li>GH-792: Use the macOS Font Panel to select the font: Thank you @apaleslimghost!<ul>
|
||||
<li>If you select a variable width font, the rendering will be broken.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>GH-786: Improve space key handling which enables <c-space> to be mapped: Thank you @cypheon!</li>
|
||||
</ul>
|
||||
]]></description>
|
||||
<releaseNotesLink>
|
||||
https://github.com/qvacua/vimr/releases/tag/snapshot/347
|
||||
https://github.com/qvacua/vimr/releases/tag/snapshot/349
|
||||
</releaseNotesLink>
|
||||
<pubDate>2020-03-10T21:36:52.552729</pubDate>
|
||||
<pubDate>2020-06-19T11:44:01.746186</pubDate>
|
||||
<minimumSystemVersion>10.12.0</minimumSystemVersion>
|
||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/snapshot/347/VimR-SNAPSHOT-347.tar.bz2"
|
||||
sparkle:version="347"
|
||||
sparkle:shortVersionString="SNAPSHOT-347"
|
||||
sparkle:dsaSignature="MCwCFFJBf//mmjwwPtTUwsMwxcfAsVOOAhQ2dOcIku8wb+DHCfQW97AKaqj7fA=="
|
||||
length="14983113"
|
||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/snapshot/349/VimR-SNAPSHOT-349.tar.bz2"
|
||||
sparkle:version="349"
|
||||
sparkle:shortVersionString="SNAPSHOT-349"
|
||||
sparkle:dsaSignature="MC0CFQDZ/QdAra04p6Ls81XhDFgSMCDneAIUX+p/Exesv4JFLHBdCSHD8bzJXj4="
|
||||
length="14948375"
|
||||
type="application/octet-stream"/>
|
||||
</item>
|
||||
</channel>
|
||||
|
@ -54,6 +54,8 @@ pip3 install waiting
|
||||
|
||||
echo "### Building VimR"
|
||||
|
||||
git lfs pull
|
||||
|
||||
./bin/prepare_repositories.sh
|
||||
./bin/clean_old_builds.sh
|
||||
|
||||
|
@ -35,6 +35,7 @@ pushd NvimView/neovim
|
||||
CFLAGS="-mmacosx-version-min=${deployment_target}" \
|
||||
MACOSX_DEPLOYMENT_TARGET=${deployment_target} \
|
||||
CMAKE_FLAGS="-DCUSTOM_UI=0 -DCMAKE_INSTALL_PREFIX=/tmp/nvim-runtime" \
|
||||
DEPS_CMAKE_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=${deployment_target} -DCMAKE_CXX_COMPILER=$(xcrun -find c++)" \
|
||||
install
|
||||
|
||||
rm -rf build
|
||||
|
@ -22,7 +22,7 @@ fi
|
||||
echo "### Commiting and pushing appcast(s) to ${branch}"
|
||||
|
||||
git add appcast*
|
||||
git commit -S -m "Bump appcast(s) to ${compound_version}"
|
||||
git commit -m "Bump appcast(s) to ${compound_version}"
|
||||
git push origin HEAD:"${branch}"
|
||||
|
||||
popd > /dev/null
|
||||
|
@ -8,10 +8,10 @@ readonly branch=${branch:?"Eg develop"}
|
||||
readonly tag=${tag:?"v0.29.0-329"}
|
||||
|
||||
echo "### Committing version bump"
|
||||
git commit -S -am "Bump version: ${tag}"
|
||||
git commit -am "Bump version: ${tag}"
|
||||
|
||||
echo "### tagging VimR"
|
||||
git tag -s -m "${tag}" "${tag}"
|
||||
git tag -m "${tag}" "${tag}"
|
||||
|
||||
echo "### Pushing commit and tag to vimr repository"
|
||||
git push origin HEAD:"${branch}"
|
||||
|
Loading…
Reference in New Issue
Block a user