diff options
author | nyamatongwe <unknown> | 2013-04-09 15:25:26 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-04-09 15:25:26 +1000 |
commit | 5a3c37478d29afff6d1e53f4c9c901be5bbadcbb (patch) | |
tree | d2acb3cb3a70a7df7a7b161c9ce1567f4f264b29 /cocoa/ScintillaCocoa.mm | |
parent | 3c46538bb90f861844d1f4c7b09959da7465ee23 (diff) | |
parent | 553a78b81d0deeb96940a7486074364e75d50068 (diff) | |
download | scintilla-mirror-5a3c37478d29afff6d1e53f4c9c901be5bbadcbb.tar.gz |
Merged Cocoa composition fix.
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) |