diff options
| author | nyamatongwe <nyamatongwe@gmail.com> | 2013-04-09 13:15:47 +1000 |
|---|---|---|
| committer | nyamatongwe <nyamatongwe@gmail.com> | 2013-04-09 13:15:47 +1000 |
| commit | 553a78b81d0deeb96940a7486074364e75d50068 (patch) | |
| tree | 10a81ce19dccb22eca3fd76b0852a954cccc96be /cocoa/ScintillaCocoa.mm | |
| parent | df2d4c896cc116ebce3f40718cfabc75eb804e38 (diff) | |
| download | scintilla-mirror-553a78b81d0deeb96940a7486074364e75d50068.tar.gz | |
Fix problems with input composition that could stop undo working.
Diffstat (limited to 'cocoa/ScintillaCocoa.mm')
| -rw-r--r-- | cocoa/ScintillaCocoa.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index e348488ff..dfe2e47d1 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1917,6 +1917,21 @@ int ScintillaCocoa::InsertText(NSString* input) //-------------------------------------------------------------------------------------------------- /** + * Used to ensure that only one selection is active for input composition as composition + * does not support multi-typing. + * Also drop virtual space as that is not supported by composition. + */ +void ScintillaCocoa::SelectOnlyMainSelection() +{ + SelectionRange mainSel = sel.RangeMain(); + mainSel.ClearVirtualSpace(); + sel.SetSelection(mainSel); + Redraw(); +} + +//-------------------------------------------------------------------------------------------------- + +/** * Called by the owning view when the mouse pointer enters the control. */ void ScintillaCocoa::MouseEntered(NSEvent* event) |
