diff options
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/os_osx.h | 2 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 58a47c102a..190dbcf662 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -76,8 +76,6 @@ public: List<String> args; MainLoop *main_loop; - IP_Unix *ip_unix; - #ifdef COREAUDIO_ENABLED AudioDriverCoreAudio audio_driver; #endif diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 2b002d3b5d..6a214b8669 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -479,7 +479,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; } - (NSRange)markedRange { - return (markedText.length > 0) ? NSMakeRange(0, markedText.length - 1) : kEmptyRange; + return NSMakeRange(0, markedText.length); } - (NSRange)selectedRange { @@ -492,6 +492,10 @@ static const NSRange kEmptyRange = { NSNotFound, 0 }; } else { [markedText initWithString:aString]; } + if (markedText.length == 0) { + [self unmarkText]; + return; + } if (OS_OSX::singleton->im_active) { imeInputEventInProgress = true; OS_OSX::singleton->im_text.parse_utf8([[markedText mutableString] UTF8String]); |