diff --git a/OutlineViewTest/Info.plist b/OutlineViewTest/Info.plist
index 43b22bd6..88dd8dec 100644
--- a/OutlineViewTest/Info.plist
+++ b/OutlineViewTest/Info.plist
@@ -17,9 +17,9 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- SNAPSHOT-163
+ 0.13.0
CFBundleVersion
- 163
+ 164
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
NSHumanReadableCopyright
diff --git a/SwiftNeoVim/Info.plist b/SwiftNeoVim/Info.plist
index 36741a64..858f3dd7 100644
--- a/SwiftNeoVim/Info.plist
+++ b/SwiftNeoVim/Info.plist
@@ -15,11 +15,11 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- SNAPSHOT-163
+ 0.13.0
CFBundleSignature
????
CFBundleVersion
- 163
+ 164
NSHumanReadableCopyright
Copyright © 2016 Tae Won Ha. All rights reserved.
NSPrincipalClass
diff --git a/SwiftNeoVim/NeoVimView.swift b/SwiftNeoVim/NeoVimView.swift
index 38861dfc..eed2da27 100644
--- a/SwiftNeoVim/NeoVimView.swift
+++ b/SwiftNeoVim/NeoVimView.swift
@@ -154,7 +154,7 @@ public class NeoVimView: NSView, NeoVimUiBridgeProtocol, NSUserInterfaceValidati
fileprivate var isCurrentlyPinching = false
fileprivate var pinchTargetScale = CGFloat(1)
- fileprivate var pinchImage = NSImage()
+ fileprivate var pinchBitmap: NSBitmapImageRep?
fileprivate var currentlyResizing = false
fileprivate var currentEmoji = "😎"
@@ -451,10 +451,21 @@ extension NeoVimView {
let context = NSGraphicsContext.current()!.cgContext
if self.isCurrentlyPinching {
+ let interpolationQuality = context.interpolationQuality
+ context.interpolationQuality = .none
+
let boundsSize = self.bounds.size
let targetSize = CGSize(width: boundsSize.width * self.pinchTargetScale,
height: boundsSize.height * self.pinchTargetScale)
- self.pinchImage.draw(in: CGRect(origin: self.bounds.origin, size: targetSize))
+ self.pinchBitmap?.draw(in: CGRect(origin: self.bounds.origin, size: targetSize),
+ from: CGRect.zero,
+ operation: .sourceOver,
+ fraction: 1,
+ respectFlipped: true,
+ hints: nil)
+
+ context.interpolationQuality = interpolationQuality
+
return
}
@@ -1015,8 +1026,7 @@ extension NeoVimView {
case NSEventPhase.began:
let pinchImageRep = self.bitmapImageRepForCachingDisplay(in: self.bounds)!
self.cacheDisplay(in: self.bounds, to: pinchImageRep)
- self.pinchImage = NSImage()
- self.pinchImage.addRepresentation(pinchImageRep)
+ self.pinchBitmap = pinchImageRep
self.isCurrentlyPinching = true
self.needsDisplay = true
diff --git a/SwiftNeoVimTests/Info.plist b/SwiftNeoVimTests/Info.plist
index aed5f69f..ac83a605 100644
--- a/SwiftNeoVimTests/Info.plist
+++ b/SwiftNeoVimTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- SNAPSHOT-163
+ 0.13.0
CFBundleSignature
????
CFBundleVersion
- 163
+ 164
diff --git a/VimR-Workspace-Demo/Info.plist b/VimR-Workspace-Demo/Info.plist
index a413f4d8..e72ea912 100644
--- a/VimR-Workspace-Demo/Info.plist
+++ b/VimR-Workspace-Demo/Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- SNAPSHOT-163
+ 0.13.0
CFBundleSignature
????
CFBundleVersion
- 163
+ 164
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
NSHumanReadableCopyright
diff --git a/VimR.xcodeproj/project.pbxproj b/VimR.xcodeproj/project.pbxproj
index 78892cfc..ca38c4de 100644
--- a/VimR.xcodeproj/project.pbxproj
+++ b/VimR.xcodeproj/project.pbxproj
@@ -1483,7 +1483,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 163;
+ DYLIB_CURRENT_VERSION = 164;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1507,7 +1507,7 @@
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
- DYLIB_CURRENT_VERSION = 163;
+ DYLIB_CURRENT_VERSION = 164;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1699,7 +1699,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 163;
+ CURRENT_PROJECT_VERSION = 164;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -1749,7 +1749,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 163;
+ CURRENT_PROJECT_VERSION = 164;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
diff --git a/VimR/Base.lproj/Credits.rtf b/VimR/Base.lproj/Credits.rtf
index 3d283c7f..d634a6f2 100644
--- a/VimR/Base.lproj/Credits.rtf
+++ b/VimR/Base.lproj/Credits.rtf
@@ -82,6 +82,11 @@ By:
\b0 {\field{\*\fldinst{HYPERLINK "https://github.com/indragiek/CocoaMarkdown"}}{\fldrslt https://github.com/indragiek/CocoaMarkdown}}\
\
+
+\b Swifter\
+
+\b0 {\field{\*\fldinst{HYPERLINK "https://github.com/httpswift/swifter"}}{\fldrslt https://github.com/httpswift/swifter}}\
+\
\b github-markdown-css\
diff --git a/VimR/Info.plist b/VimR/Info.plist
index 23a9260f..f3aa852f 100644
--- a/VimR/Info.plist
+++ b/VimR/Info.plist
@@ -36,7 +36,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- SNAPSHOT-163
+ 0.13.0
CFBundleSignature
????
CFBundleURLTypes
@@ -53,7 +53,7 @@
CFBundleVersion
- 163
+ 164
LSMinimumSystemVersion
$(MACOSX_DEPLOYMENT_TARGET)
NSHumanReadableCopyright
diff --git a/VimR/MarkdownRenderer.swift b/VimR/MarkdownRenderer.swift
index 0a02b129..011a4ad1 100644
--- a/VimR/MarkdownRenderer.swift
+++ b/VimR/MarkdownRenderer.swift
@@ -172,9 +172,6 @@ class MarkdownRenderer: NSObject, Flow, PreviewRenderer {
let menuItems: [NSMenuItem]?
init(source: Observable, scrollSource: Observable, httpServer: Swifter.HttpServer, initialData: PrefData) {
- NSLog("\(#function) \(uuid)")
- NSLog("\(#function) \(self.tempDir)")
-
guard let templateUrl = Bundle.main.url(forResource: "template",
withExtension: "html",
subdirectory: "markdown")
@@ -272,6 +269,10 @@ class MarkdownRenderer: NSObject, Flow, PreviewRenderer {
return nil
}
+ guard FileUtils.fileExists(at: url) else {
+ return nil
+ }
+
return url
default:
diff --git a/VimRTests/Info.plist b/VimRTests/Info.plist
index aed5f69f..ac83a605 100644
--- a/VimRTests/Info.plist
+++ b/VimRTests/Info.plist
@@ -15,10 +15,10 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- SNAPSHOT-163
+ 0.13.0
CFBundleSignature
????
CFBundleVersion
- 163
+ 164
diff --git a/appcast.xml b/appcast.xml
index eca61160..5d395341 100644
--- a/appcast.xml
+++ b/appcast.xml
@@ -7,22 +7,22 @@
Most recent changes with links to updates for VimR.
en
-
- v0.12.6-162
+ v0.13.0-164
-GH-382: Bugfix: Sometimes the working directory is not set correctly when using the command line tool
vimr
.
+GH-339: Add a simple markdown previewer.
]]>
- https://github.com/qvacua/vimr/releases/tag/v0.12.6-162
+ https://github.com/qvacua/vimr/releases/tag/v0.13.0-164
- 2017-01-10T18:14:29.004786
+ 2017-01-22T13:58:21.099701
10.10.0
-
diff --git a/resources/release-notes.md b/resources/release-notes.md
index 9a3cade9..1672cc3c 100644
--- a/resources/release-notes.md
+++ b/resources/release-notes.md
@@ -1,3 +1,12 @@
+# next
+
+* Make pinch-zooming fast (enough) on Retina-displays.
+* Make markdown previewing more robust against non-existing file.
+
+# 0.13.0-164
+
+* GH-339: Add a simple markdown previewer.
+
# 0.12.6-162
* GH-382: Bugfix: Sometimes the working directory is not set correctly when using the command line tool `vimr`.