diff options
Diffstat (limited to 'main/src')
7 files changed, 29 insertions, 11 deletions
diff --git a/main/src/core/Mono.Texteditor/ChangeLog b/main/src/core/Mono.Texteditor/ChangeLog index d1adc59cb6..e82b5a959d 100644 --- a/main/src/core/Mono.Texteditor/ChangeLog +++ b/main/src/core/Mono.Texteditor/ChangeLog @@ -1,3 +1,10 @@ +2010-05-21 Michael Hutchinson <mhutchinson@novell.com> + + * Mono.TextEditor/Platform.cs: + * Mono.TextEditor/SimpleEditMode.cs: + * Mono.TextEditor.Vi/ViActionMaps.cs: + * Mono.TextEditor/TextLinkEditMode.cs: More shift-tab fixage. + 2010-05-21 Mike Krüger <mkrueger@novell.com> * Mono.TextEditor/TextViewMargin.cs: Corrected rounding of diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs index ca08f12ad1..ce961228de 100644 --- a/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs +++ b/main/src/core/Mono.Texteditor/Mono.TextEditor.Vi/ViActionMaps.cs @@ -202,7 +202,7 @@ namespace Mono.TextEditor.Vi && (modifier & Gdk.ModifierType.ShiftMask) != 0) { switch (key) { - case Gdk.Key.ISO_Left_Tab: + case Gdk.Key.Tab: return MiscActions.RemoveTab; case Gdk.Key.BackSpace: diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Platform.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Platform.cs index 312f828537..2c6654e8ab 100644 --- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Platform.cs +++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Platform.cs @@ -129,7 +129,7 @@ namespace Mono.TextEditor } } - //fix shift-tab brokenness + //fix shift-tab weirdness. There isn't a nice name for untab, so make it shift-tab if (key == Gdk.Key.ISO_Left_Tab) { key = Gdk.Key.Tab; mod |= Gdk.ModifierType.ShiftMask; diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/SimpleEditMode.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/SimpleEditMode.cs index 57dcfaf16c..b60577b385 100644 --- a/main/src/core/Mono.Texteditor/Mono.TextEditor/SimpleEditMode.cs +++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/SimpleEditMode.cs @@ -114,7 +114,7 @@ namespace Mono.TextEditor keyBindings.Add (GetKeyCode (Gdk.Key.Insert), action); keyBindings.Add (GetKeyCode (Gdk.Key.Tab), MiscActions.InsertTab); - keyBindings.Add (GetKeyCode (Gdk.Key.ISO_Left_Tab, Gdk.ModifierType.ShiftMask), MiscActions.RemoveTab); + keyBindings.Add (GetKeyCode (Gdk.Key.Tab, Gdk.ModifierType.ShiftMask), MiscActions.RemoveTab); action = MiscActions.InsertNewLine; keyBindings.Add (GetKeyCode (Gdk.Key.Return), action); diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs index cc4f6ac4e3..344d736425 100644 --- a/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs +++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/TextLinkEditMode.cs @@ -327,6 +327,15 @@ namespace Mono.TextEditor Setlink (nextLink); } + void GotoPreviousLink (TextLink link) + { + int caretOffset = Editor.Caret.Offset - baseOffset; + var prevLink = links.FindLast (l => l.IsEditable && l.PrimaryLink.Offset < (link != null ? link.PrimaryLink.Offset : caretOffset)); + if (prevLink == null) + prevLink = links.FindLast (l => l.IsEditable); + Setlink (prevLink); + } + void CompleteWindow () { if (window == null) @@ -375,13 +384,10 @@ namespace Mono.TextEditor if ((modifier & Gdk.ModifierType.ControlMask) != 0) if (link != null && !link.IsIdentifier) goto default; - GotoNextLink (link); - return; - case Gdk.Key.ISO_Left_Tab: - TextLink prevLink = links.FindLast (l => l.IsEditable && l.PrimaryLink.Offset < (link != null ? link.PrimaryLink.Offset : caretOffset)); - if (prevLink == null) - prevLink = links.FindLast (l => l.IsEditable); - Setlink (prevLink); + if ((modifier & Gdk.ModifierType.ShiftMask) == 0) + GotoNextLink (link); + else + GotoPreviousLink (link); return; case Gdk.Key.Escape: case Gdk.Key.Return: diff --git a/main/src/core/MonoDevelop.Ide/ChangeLog b/main/src/core/MonoDevelop.Ide/ChangeLog index f07415c9e7..9a4f83b19b 100644 --- a/main/src/core/MonoDevelop.Ide/ChangeLog +++ b/main/src/core/MonoDevelop.Ide/ChangeLog @@ -1,3 +1,8 @@ +2010-05-21 Michael Hutchinson <mhutchinson@novell.com> + + * MonoDevelop.Components.Commands/KeyBindingManager.cs: More + shift-tab fixage. + 2010-05-21 Lluis Sanchez Gual <lluis@novell.com> * MonoDevelop.Ide.Commands/EditCommands.cs: Set bypass flag if diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/KeyBindingManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/KeyBindingManager.cs index 7c34aebaec..d8382a04e8 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/KeyBindingManager.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/KeyBindingManager.cs @@ -349,7 +349,7 @@ namespace MonoDevelop.Components.Commands } } - //fix shift-tab brokenness + //fix shift-tab weirdness. There isn't a nice name for untab, so make it shift-tab if (key == Gdk.Key.ISO_Left_Tab) { key = Gdk.Key.Tab; mod |= Gdk.ModifierType.ShiftMask; |