Fix snippet insrtion

This commit is contained in:
1024jp 2019-01-11 21:20:17 +09:00
parent ed49f0bd95
commit 7f489451a1
2 changed files with 12 additions and 1 deletions

View File

@ -2,6 +2,15 @@
Change Log
==========================
3.6.11 (unreleased)
--------------------------
### Fixes
- Fix an issue where the snippet insertion did not work.
3.6.11 (309)
--------------------------

View File

@ -9,7 +9,7 @@
// ---------------------------------------------------------------------------
//
// © 2004-2007 nakamuxu
// © 2014-2018 1024jp
// © 2014-2019 1024jp
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -85,6 +85,8 @@ struct Shortcut: Hashable {
init(modifierMask: NSEvent.ModifierFlags, keyEquivalent: String) {
self.modifierMask = {
let modifierMask = modifierMask.intersection([.shift, .control, .option, .command])
// -> For in case that a modifierMask taken from a menu item can lack Shift definition if the combination is "Shift + alphabet character" keys.
if let keyEquivalentScalar = keyEquivalent.unicodeScalars.last,
CharacterSet.uppercaseLetters.contains(keyEquivalentScalar) {