diff options
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs | 9 | ||||
-rw-r--r-- | main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Actions/SelectionActions.cs | 2 |
2 files changed, 2 insertions, 9 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs index 1e4ff3a048..971ca476e5 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs @@ -730,11 +730,6 @@ namespace MonoDevelop.SourceEditor info.Bypass = HasFocus == false; } - void EnsurePreeditCommitted() - { - TextArea.CommitPreedit (); - } - [CommandHandler (MonoDevelop.Ide.Commands.TextEditorCommands.LineEnd)] internal void OnLineEnd () { @@ -864,16 +859,12 @@ namespace MonoDevelop.SourceEditor [CommandHandler (MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveLeft)] internal void OnSelectionMoveLeft () { - EnsurePreeditCommitted (); - RunAction (SelectionActions.MoveLeft); } [CommandHandler (MonoDevelop.Ide.Commands.TextEditorCommands.SelectionMoveRight)] internal void OnSelectionMoveRight () { - EnsurePreeditCommitted (); - RunAction (SelectionActions.MoveRight); } diff --git a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Actions/SelectionActions.cs b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Actions/SelectionActions.cs index 6f15a7d5ba..08a3250cca 100644 --- a/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Actions/SelectionActions.cs +++ b/main/src/core/Mono.TextEditor.Shared/Mono.TextEditor/Actions/SelectionActions.cs @@ -77,6 +77,8 @@ namespace Mono.TextEditor public static void Select (TextEditorData data, Action<TextEditorData> caretMoveAction) { + data?.Parent?.CommitPreedit (); + using (var undoGroup = data.OpenUndoGroup ()) { PositionChangedHandler handler = new PositionChangedHandler (data); data.Caret.PositionChanged += handler.DataCaretPositionChanged; |