~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/EditActions.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
                
73
73
                static void RemoveCharBeforCaret (TextEditorData data)
74
74
                {
75
 
                        if (((ISourceEditorOptions)data.Options).AutoInsertMatchingBracket) {
 
75
                        if (!data.IsSomethingSelected && ((ISourceEditorOptions)data.Options).AutoInsertMatchingBracket) {
76
76
                                if (data.Caret.Offset > 0) {
77
77
                                        var line = data.GetLine (data.Caret.Line);
78
78
                                        var stack = line.StartSpan.Clone();
92
92
                                        if (idx >= 0) {
93
93
                                                int nextCharOffset = GetNextNonWsCharOffset (data, data.Caret.Offset);
94
94
                                                if (nextCharOffset >= 0 && closing[idx] == data.Document.GetCharAt (nextCharOffset)) {
95
 
                                                        bool updateToEnd = data.Document.OffsetToLineNumber (nextCharOffset) != data.Caret.Line;
96
95
                                                        data.Remove (data.Caret.Offset, nextCharOffset - data.Caret.Offset + 1);
97
96
                                                }
98
97
                                        }