aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-03-02 09:08:04 +1100
committerNeil <nyamatongwe@gmail.com>2017-03-02 09:08:04 +1100
commite15a9f49e1c9224d1c81bc5ef1c14f008ee2d87c (patch)
treef348d6817155e07ce008af011a3cc2e6bf6cda02
parentf31063c87e800351ac6416ecdb0b3f9a1b842f7f (diff)
downloadscintilla-mirror-e15a9f49e1c9224d1c81bc5ef1c14f008ee2d87c.tar.gz
Bug [#1881]. Revert part of previous fix as it stopped the accented character
chooser from appearing. Special-case the Chinese "Cangjie" input source.
-rw-r--r--cocoa/ScintillaView.mm12
-rw-r--r--doc/ScintillaHistory.html6
2 files changed, 17 insertions, 1 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index fb299d947..107c421c3 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -569,7 +569,17 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
const NSRange posRangeSel = [mOwner selectedRangePositions];
if (posRangeSel.length == 0)
{
- return NSMakeRange(NSNotFound, 0);
+ NSTextInputContext *tic = [NSTextInputContext currentInputContext];
+ // Chinese input causes malloc crash when empty selection returned with actual
+ // position so return NSNotFound.
+ // If this is applied to European input, it stops the accented character
+ // chooser from appearing.
+ // May need to add more input source names.
+ if ([tic.selectedKeyboardInputSource
+ isEqualToString:@"com.apple.inputmethod.TCIM.Cangjie"])
+ {
+ return NSMakeRange(NSNotFound, 0);
+ }
}
return mOwner.backend->CharactersFromPositions(posRangeSel);
}
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index ad0910e52..47966f3c1 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -531,6 +531,12 @@
<a href="http://sourceforge.net/p/scintilla/bugs/1905/">Bug #1905</a>.
</li>
<li>
+ Fix Cocoa failure to display accented character chooser for European
+ languages by partially reverting a change made to prevent a crash with
+ Chinese input by special-casing the Cangjie input source.
+ <a href="http://sourceforge.net/p/scintilla/bugs/1881/">Bug #1881</a>.
+ </li>
+ <li>
Fix crash on Cocoa with OS X 10.9 due to accessibility API not available.
<a href="http://sourceforge.net/p/scintilla/bugs/1915/">Bug #1915</a>.
</li>