From d7e2afd1f88bf735b010461ff505470bfa468547 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sun, 30 Jun 2019 08:34:46 +1000 Subject: 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. --- doc/ScintillaDoc.html | 42 ++++++++++++++++++++++++++++++++++++++++-- doc/ScintillaHistory.html | 5 +++++ 2 files changed, 45 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 9ef5b3055..b96f6eea2 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -3818,7 +3818,7 @@ struct Sci_TextToFind { Scintilla may ignore this call in some cases. For example, the inline behaviour might only be supported for some languages.

When the inline IME mode is active, characters are added tentatively before being finalised and an SCN_CHARADDED - notification is sent for each character.

+ notification (with characterSource set to SC_CHARACTERSOURCE_TENTATIVE_INPUT) is sent for each character.

These bidirectional features are experimental and incomplete.
@@ -7276,7 +7276,7 @@ struct SCNotification { int updated; /* SCN_UPDATEUI */ int listCompletionMethod; /* SCN_AUTOCSELECTION, SCN_AUTOCCOMPLETED, SCN_USERLISTSELECTION */ - + int characterSource; /* SCN_CHARADDED */ }; @@ -7378,6 +7378,44 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); for DBCS, it is (first byte * 256 + second byte) for 2 byte characters and the byte value for 1 byte characters. This notification is sent before the character has been styled so processing that depends on styling should instead be performed in the SCN_UPDATEUI notification.

+

The SCNotification::characterSource field is the source of the character.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolValueMeaning
SC_CHARACTERSOURCE_DIRECT_INPUT0Direct input characters, including characters generated by calling keyboard commands like SCI_NEWLINE.
SC_CHARACTERSOURCE_TENTATIVE_INPUT1Tentative input characters. They are used by IME (inline mode, see SCI_SETIMEINTERACTION) + to composite final string, normally different from final composited string (which is the string that has been truly added into current document), + and may be withdrawn when the user cancels typing (e.g. by pressing Esc key). + Some system (at least Cocoa) also use tentative input for non-IME features like using dead key to composite diacritical marks (grave accent, etc.). + These characters are not added to macro recording. Most applications can simply ignore the notification when this value is set. +
SC_CHARACTERSOURCE_IME_RESULT2IME (either inline or windowed mode) full composited string. Modern IME is able to composite English word or sentence, + when this value is set, current character may not a Chinese, Japanese or Korean character. + Currently, this is only set on Windows.

SCN_SAVEPOINTREACHED
SCN_SAVEPOINTLEFT
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 27afa47b3..118859ac2 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -570,6 +570,11 @@ Feature #1297.

  • + Source of input (direct / IME composition / IME result) reported in SCN_CHARADDED so applications + can treat temporary IME composition input differently. + Bug #2038. +
  • +
  • Lexer added for DataFlex. Feature #1295.
  • -- cgit v1.2.3