Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

@yamaya yamaya commented Oct 22, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.