Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2013-08-23 09:28:15 +0400
committerMike Krüger <mkrueger@xamarin.com>2013-08-23 09:28:15 +0400
commitf56e30c7db64f0f9a0e9f8e94281e2872e4caeb2 (patch)
tree63dcc1b270ef8c596074a1bd1b09e754f257c336 /main/src
parent16e2727b75cfbf52c6320837b1d66ba8942d264b (diff)
[TextEditor] Fixed selection->return key press bug.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/CaretMoveActions.cs2
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/MiscActions.cs8
2 files changed, 8 insertions, 2 deletions
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/CaretMoveActions.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/CaretMoveActions.cs
index bb665426bb..f3e2c8bdec 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/CaretMoveActions.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/CaretMoveActions.cs
@@ -218,7 +218,7 @@ namespace Mono.TextEditor
return result + 1;
}
- static void InternalCaretMoveHome (TextEditorData data, bool firstNonWhitespace, bool hop)
+ internal static void InternalCaretMoveHome (TextEditorData data, bool firstNonWhitespace, bool hop)
{
if (!data.Caret.PreserveSelection)
data.ClearSelection ();
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/MiscActions.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/MiscActions.cs
index a63d9a1073..6a34f3f478 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/MiscActions.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Actions/MiscActions.cs
@@ -243,8 +243,14 @@ namespace Mono.TextEditor
return;
using (var undo = data.OpenUndoGroup ()) {
- if (data.IsSomethingSelected)
+ if (data.IsSomethingSelected) {
+ var end = data.MainSelection.End;
data.DeleteSelectedText ();
+ if (end.Column == 1) {
+ CaretMoveActions.InternalCaretMoveHome (data, true, false);
+ return;
+ }
+ }
switch (data.Options.IndentStyle) {
case IndentStyle.None:
data.InsertAtCaret (data.EolMarker);