Skip to content

Instantly share code, notes, and snippets.

@yamaya
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yamaya/dc21bb9a2c299c31bab8 to your computer and use it in GitHub Desktop.
Save yamaya/dc21bb9a2c299c31bab8 to your computer and use it in GitHub Desktop.
MacVim: Fix don't input Space with Shift using Japanese IME on Yosemite
commit 6b36374325cbcfe58172edfe95b6bbeff42b3bae
Author: Masayuki Yamaya <yamaya@cyberdom.co.jp>
Date: Wed Oct 22 23:59:30 2014 +0900
Fix dont input space with shift on yosemite
diff --git a/src/MacVim/MMTextViewHelper.m b/src/MacVim/MMTextViewHelper.m
index fdc7aaf..3da0c29 100644
--- a/src/MacVim/MMTextViewHelper.m
+++ b/src/MacVim/MMTextViewHelper.m
@@ -187,6 +187,11 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
// with Ctrl-6 or Ctrl-^ when IM is active.
[self doKeyDown:@"\x1e"];
string = nil;
+#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_10)
+ } else if ((flags & NSShiftKeyMask) && [string isEqualToString:@" "]) {
+ // HACK! for Yosemite - Fix for Shift+Space inputing
+ // do nothing
+#endif
} else {
// HACK! interpretKeyEvents: may call insertText: or
// doCommandBySelector:, or it may swallow the key (most likely the
@yamaya
Copy link
Author

yamaya commented Oct 22, 2014

多分、正しくはランタイムのOSのバージョンを取得し分岐する方法だと思う。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment