changeset 104046:95a3747ab8d5

* nsterm.m (EmacsView-keyUp:): Only act when running under Tiger.
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Thu, 23 Jul 2009 11:52:45 +0000
parents 1b791c5d1cee
children f3ac65e9abd6
files src/ChangeLog src/nsterm.m
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Jul 23 07:09:28 2009 +0000
+++ b/src/ChangeLog	Thu Jul 23 11:52:45 2009 +0000
@@ -1,3 +1,7 @@
+2009-07-23  Adrian Robert  <Adrian.B.Robert@gmail.com>
+
+	* nsterm.m (EmacsView-keyUp:): Only act when running under Tiger.
+
 2009-07-22  Jason Rumney  <jasonr@gnu.org>
 
 	* w32fns.c (w32_wnd_proc) [WM_IME_STARTCOMPOSITION]: Position
--- a/src/nsterm.m	Thu Jul 23 07:09:28 2009 +0000
+++ b/src/nsterm.m	Thu Jul 23 11:52:45 2009 +0000
@@ -4561,12 +4561,14 @@
 /* Needed to pick up Ctrl-tab and possibly other events that OS X has
    decided not to send key-down for.
    See http://osdir.com/ml/editors.vim.mac/2007-10/msg00141.html
+   This only applies on Tiger and earlier.
    If it matches one of these, send it on to keyDown. */
 -(void)keyUp: (NSEvent *)theEvent
 {
   int flags = [theEvent modifierFlags];
   int code = [theEvent keyCode];
-  if (code == 0x30 && (flags & NSControlKeyMask) && !(flags & NSCommandKeyMask))
+  if (floor (NSAppKitVersionNumber) <= 824 /*NSAppKitVersionNumber10_4*/ &&
+      code == 0x30 && (flags & NSControlKeyMask) && !(flags & NSCommandKeyMask))
     {
       if (NS_KEYLOG)
         fprintf (stderr, "keyUp: passed test");