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:
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);