diff options
| author | Zufu Liu <unknown> | 2019-06-30 08:34:46 +1000 |
|---|---|---|
| committer | Zufu Liu <unknown> | 2019-06-30 08:34:46 +1000 |
| commit | d7e2afd1f88bf735b010461ff505470bfa468547 (patch) | |
| tree | 0305fc8fd126909438c6da42cf90d53a3201b8c2 /cocoa/ScintillaCocoa.mm | |
| parent | 24bff87107d89a09e724993e053e7151945596e8 (diff) | |
| download | scintilla-mirror-d7e2afd1f88bf735b010461ff505470bfa468547.tar.gz | |
Bug [#2038]. Source of input reported in SCN_CHARADDED.
This may be SC_CHARACTERSOURCE_DIRECT_INPUT, SC_CHARACTERSOURCE_TENTATIVE_INPUT,
or SC_CHARACTERSOURCE_IME_RESULT.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
| -rw-r--r-- | cocoa/ScintillaCocoa.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index 0ce912f54..bc6bb3698 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -2175,7 +2175,7 @@ bool ScintillaCocoa::KeyboardInput(NSEvent *event) { /** * Used to insert already processed text provided by the Cocoa text input system. */ -ptrdiff_t ScintillaCocoa::InsertText(NSString *input) { +ptrdiff_t ScintillaCocoa::InsertText(NSString *input, CharacterSource charSource) { if ([input length] == 0) { return 0; } @@ -2190,7 +2190,7 @@ ptrdiff_t ScintillaCocoa::InsertText(NSString *input) { while (sv.length()) { const unsigned char leadByte = sv[0]; const unsigned int bytesInCharacter = UTF8BytesOfLead[leadByte]; - InsertCharacter(sv.substr(0, bytesInCharacter)); + InsertCharacter(sv.substr(0, bytesInCharacter), charSource); sv.remove_prefix(bytesInCharacter); } return encoded.length(); @@ -2203,7 +2203,7 @@ ptrdiff_t ScintillaCocoa::InsertText(NSString *input) { std::string encoded = EncodedBytesString((__bridge CFStringRef)character, encoding); lengthInserted += encoded.length(); - InsertCharacter(encoded); + InsertCharacter(encoded, charSource); } return lengthInserted; |
