| 55 | } |
| 56 | |
| 57 | static void DrawImeIndicator(QsciScintillaQt *sqt, int indicator, int len) |
| 58 | { |
| 59 | // Emulate the visual style of IME characters with indicators. |
| 60 | // Draw an indicator on the character before caret by the character bytes of len |
| 61 | // so it should be called after AddCharUTF(). |
| 62 | // It does not affect caret positions. |
| 63 | if (indicator < 8 || indicator > INDIC_MAX) { |
| 64 | return; |
| 65 | } |
| 66 | sqt->pdoc->DecorationSetCurrentIndicator(indicator); |
| 67 | for (size_t r=0; r< sqt-> sel.Count(); r++) { |
| 68 | int positionInsert = sqt->sel.Range(r).Start().Position(); |
| 69 | sqt->pdoc->DecorationFillRange(positionInsert - len, 1, len); |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | static int GetImeCaretPos(QInputMethodEvent *event) |
| 74 | { |
no test coverage detected