mirror of
https://github.com/qvacua/vimr.git
synced 2024-12-29 00:34:26 +03:00
Merge remote-tracking branch 'origin/develop' into update-neovim
This commit is contained in:
commit
295890d3fc
@ -17,9 +17,9 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.18.0</string>
|
<string>SNAPSHOT-218</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>217</string>
|
<string>218</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>
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>FMWK</string>
|
<string>FMWK</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.18.0</string>
|
<string>SNAPSHOT-218</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>217</string>
|
<string>218</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,6 +7,18 @@ import Cocoa
|
|||||||
|
|
||||||
class KeyUtils {
|
class KeyUtils {
|
||||||
|
|
||||||
|
static func isControlCode(key: String) -> Bool {
|
||||||
|
guard key.characters.count == 1 else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
guard let firstChar = key.utf16.first else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return firstChar < 32 && firstChar > 0
|
||||||
|
}
|
||||||
|
|
||||||
static func isSpecial(key: String) -> Bool {
|
static func isSpecial(key: String) -> Bool {
|
||||||
guard key.characters.count == 1 else {
|
guard key.characters.count == 1 else {
|
||||||
return false
|
return false
|
||||||
|
@ -27,22 +27,18 @@ extension NeoVimView {
|
|||||||
? event.charactersIgnoringModifiers!.lowercased()
|
? event.charactersIgnoringModifiers!.lowercased()
|
||||||
: event.charactersIgnoringModifiers!
|
: event.charactersIgnoringModifiers!
|
||||||
|
|
||||||
if KeyUtils.isSpecial(key: charsIgnoringModifiers) {
|
let flags = self.vimModifierFlags(modifierFlags) ?? ""
|
||||||
if let vimModifiers = self.vimModifierFlags(modifierFlags) {
|
let isNamedKey = KeyUtils.isSpecial(key: charsIgnoringModifiers)
|
||||||
self.agent.vimInput(
|
let isControlCode = KeyUtils.isControlCode(key: chars) && !isNamedKey
|
||||||
self.wrapNamedKeys(vimModifiers + KeyUtils.namedKeyFrom(key: charsIgnoringModifiers))
|
let isPlain = flags.isEmpty && !isNamedKey
|
||||||
)
|
let isWrapNeeded = !isControlCode && !isPlain
|
||||||
} else {
|
|
||||||
self.agent.vimInput(self.wrapNamedKeys(KeyUtils.namedKeyFrom(key: charsIgnoringModifiers)))
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if let vimModifiers = self.vimModifierFlags(modifierFlags) {
|
|
||||||
self.agent.vimInput(self.wrapNamedKeys(vimModifiers + charsIgnoringModifiers))
|
|
||||||
} else {
|
|
||||||
self.agent.vimInput(self.vimPlainString(chars))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
let namedChars = KeyUtils.namedKeyFrom(key: charsIgnoringModifiers)
|
||||||
|
let finalInput = isWrapNeeded
|
||||||
|
? self.wrapNamedKeys(flags + namedChars)
|
||||||
|
: self.vimPlainString(chars)
|
||||||
|
|
||||||
|
self.agent.vimInput(finalInput)
|
||||||
self.keyDownDone = true
|
self.keyDownDone = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,19 +78,44 @@ extension NeoVimView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override public func performKeyEquivalent(with event: NSEvent) -> Bool {
|
override public func performKeyEquivalent(with event: NSEvent) -> Bool {
|
||||||
let type = event.type
|
if .keyDown != event.type { return false }
|
||||||
let flags = event.modifierFlags
|
let flags = event.modifierFlags.intersection(.deviceIndependentFlagsMask)
|
||||||
|
|
||||||
/* <C-Tab> & <C-S-Tab> do not trigger keyDown events.
|
/* <C-Tab> & <C-S-Tab> do not trigger keyDown events.
|
||||||
Catch the key event here and pass it to keyDown.
|
Catch the key event here and pass it to keyDown.
|
||||||
(By rogual in NeoVim dot app
|
(By rogual in NeoVim dot app
|
||||||
https://github.com/rogual/neovim-dot-app/pull/248/files )
|
https://github.com/rogual/neovim-dot-app/pull/248/files )
|
||||||
*/
|
*/
|
||||||
if .keyDown == type && flags.contains(.control) && 48 == event.keyCode {
|
if flags.contains(.control) && 48 == event.keyCode {
|
||||||
self.keyDown(with: event)
|
self.keyDown(with: event)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guard let chars = event.characters else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Control code \0 causes rpc parsing problems.
|
||||||
|
// So we escape as early as possible
|
||||||
|
if chars == "\0" {
|
||||||
|
self.agent.vimInput(self.wrapNamedKeys("Nul"))
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// For the following two conditions:
|
||||||
|
// See special cases in vim/os_win32.c from vim sources
|
||||||
|
// Also mentioned in MacVim's KeyBindings.plist
|
||||||
|
if .control == flags && chars == "6" {
|
||||||
|
self.agent.vimInput("\u{1e}") // AKA ^^
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if .control == flags && chars == "2" {
|
||||||
|
// <C-2> should generate \0, escaping as above
|
||||||
|
self.agent.vimInput(self.wrapNamedKeys("Nul"))
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// NsEvent already sets \u{1f} for <C--> && <C-_>
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>BNDL</string>
|
<string>BNDL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.18.0</string>
|
<string>SNAPSHOT-218</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>217</string>
|
<string>218</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>0.18.0</string>
|
<string>SNAPSHOT-218</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>217</string>
|
<string>218</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
@ -1803,7 +1803,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 = 217;
|
DYLIB_CURRENT_VERSION = 218;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -1828,7 +1828,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 = 217;
|
DYLIB_CURRENT_VERSION = 218;
|
||||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
@ -2065,7 +2065,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 = 217;
|
CURRENT_PROJECT_VERSION = 218;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
@ -2115,7 +2115,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 = 217;
|
CURRENT_PROJECT_VERSION = 218;
|
||||||
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;
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.18.0</string>
|
<string>SNAPSHOT-218</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>217</string>
|
<string>218</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>
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>BNDL</string>
|
<string>BNDL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>0.18.0</string>
|
<string>SNAPSHOT-218</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>217</string>
|
<string>218</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -7,26 +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>v0.18.0-217</title>
|
<title>SNAPSHOT-218</title>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
<ul>
|
<ul>
|
||||||
<li>GH-481: Bugfix: Quiting with <code>:qa!</code> warns about buffers that are already gone. (thanks @nhtzr for the PR)</li>
|
<li>GH-492: Improve <code>Control</code> key handling: e.g. <code>Ctrl-6</code> works now. (thanks @nhtzr for the PR)</li>
|
||||||
<li>GH-458: Drag & Drop of files onto the main window works. (thanks @nhtzr for the PR)</li>
|
|
||||||
<li>GH-487: Hide the mouse cursor when typing. (thanks @nhtzr for the PR)</li>
|
|
||||||
<li>GH-315: Enable mapping of <code><C-Tab></code> and <code><C-S-Tab></code>. (thanks @nhtzr for the PR)</li>
|
|
||||||
<li>GH-368: Send <code>FocusGained</code> and <code>FocusLost</code> event to neovim backend. (thanks @nhtzr for the PR)</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
]]></description>
|
]]></description>
|
||||||
<releaseNotesLink>
|
<releaseNotesLink>
|
||||||
https://github.com/qvacua/vimr/releases/tag/v0.18.0-217
|
https://github.com/qvacua/vimr/releases/tag/snapshot/218
|
||||||
</releaseNotesLink>
|
</releaseNotesLink>
|
||||||
<pubDate>2017-08-13T07:46:01.861985</pubDate>
|
<pubDate>2017-08-16T17:50:59.561679</pubDate>
|
||||||
<minimumSystemVersion>10.10.0</minimumSystemVersion>
|
<minimumSystemVersion>10.10.0</minimumSystemVersion>
|
||||||
<enclosure url="https://github.com/qvacua/vimr/releases/download/v0.18.0-217/VimR-v0.18.0-217.tar.bz2"
|
<enclosure url="https://github.com/qvacua/vimr/releases/download/snapshot/218/VimR-SNAPSHOT-218.tar.bz2"
|
||||||
sparkle:version="217"
|
sparkle:version="218"
|
||||||
sparkle:shortVersionString="0.18.0"
|
sparkle:shortVersionString="SNAPSHOT-218"
|
||||||
sparkle:dsaSignature="MC0CFQCxuuyXimvYXATNukOdPtHOE1TV/wIUL5MchH/pqdc/WnZaDekiaverBGA="
|
sparkle:dsaSignature="MC4CFQDe/hsRbcyet99lbrWnixj3UtYilwIVAIghLm6PmfF/jwnepWgzch3HwSPf"
|
||||||
length="10703208"
|
length="10703484"
|
||||||
type="application/octet-stream"/>
|
type="application/octet-stream"/>
|
||||||
</item>
|
</item>
|
||||||
</channel>
|
</channel>
|
||||||
|
@ -93,4 +93,13 @@ if [ "${UPDATE_APPCAST}" = true ] ; then
|
|||||||
./bin/commit_and_push_appcast.sh "${BRANCH}" "${COMPOUND_VERSION}" ${IS_SNAPSHOT} ${UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE}
|
./bin/commit_and_push_appcast.sh "${BRANCH}" "${COMPOUND_VERSION}" ${IS_SNAPSHOT} ${UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${IS_SNAPSHOT}" = false ] ; then
|
||||||
|
echo "### Merging ${BRANCH} back to develop"
|
||||||
|
git reset --hard @
|
||||||
|
git fetch origin
|
||||||
|
git checkout -b for_master_to_develop origin/develop
|
||||||
|
git merge --ff-only for_build
|
||||||
|
git push origin HEAD:develop
|
||||||
|
fi
|
||||||
|
|
||||||
echo "### Built VimR"
|
echo "### Built VimR"
|
||||||
|
@ -13,18 +13,13 @@ else
|
|||||||
cp ./build/Release/appcast.xml .
|
cp ./build/Release/appcast.xml .
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "### Commiting and pushing appcast to ${BRANCH}"
|
if [ "${IS_SNAPSHOT}" = false ] && [ "${UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE}" = true ] ; then
|
||||||
|
cp appcast.xml appcast_snapshot.xml
|
||||||
|
fi
|
||||||
|
|
||||||
git commit -S -am "Bump appcast to ${COMPOUND_VERSION}"
|
echo "### Commiting and pushing appcast(s) to ${BRANCH}"
|
||||||
|
|
||||||
|
git add appcast*
|
||||||
|
git commit -S -m "Bump appcast(s) to ${COMPOUND_VERSION}"
|
||||||
git push origin HEAD:"${BRANCH}"
|
git push origin HEAD:"${BRANCH}"
|
||||||
|
|
||||||
if [ "${IS_SNAPSHOT}" = false ] && [ "${UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE}" = true ] ; then
|
|
||||||
echo "### Committing and pushing release appcast to develop"
|
|
||||||
git reset --hard @
|
|
||||||
git fetch origin
|
|
||||||
git checkout -b for_appcast origin/develop
|
|
||||||
git merge --ff-only for_build
|
|
||||||
cp appcast.xml appcast_snapshot.xml
|
|
||||||
git commit appcast_snapshot.xml -m "Update appcast_snapshot with version ${COMPOUND_VERSION}"
|
|
||||||
git push origin HEAD:develop
|
|
||||||
fi
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# next
|
# next
|
||||||
|
|
||||||
|
* GH-492: Improve `Control` key handling: e.g. `Ctrl-6` works now. (thanks @nhtzr for the PR)
|
||||||
* ...
|
* ...
|
||||||
|
|
||||||
# 0.18.0-217
|
# 0.18.0-217
|
||||||
|
Loading…
Reference in New Issue
Block a user