~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
                                        line = entryLineNumber.Text.Trim ().StartsWith ("-") ? int.MinValue : int.MaxValue;
142
142
                                }
143
143
                                bool isRelativeJump = entryLineNumber.Text.Trim ().StartsWith ("-") || entryLineNumber.Text.Trim ().StartsWith ("+");
144
 
                                return isRelativeJump ? this.caretSave.Line + line : line - 1;
 
144
                                return isRelativeJump ? this.caretSave.Line + line : line;
145
145
                        }
146
146
                }
147
147
                
167
167
                        try {
168
168
                                int targetLine = TargetLine;
169
169
                                if (targetLine >= widget.TextEditor.Document.LineCount || targetLine < 0) {
170
 
                                        targetLine = Math.Max (0, Math.Min (widget.TextEditor.Document.LineCount - 1, targetLine));
 
170
                                        targetLine = Math.Max (1, Math.Min (widget.TextEditor.Document.LineCount, targetLine));
171
171
                                        
172
172
                                } else {
173
173
                                        this.entryLineNumber.ModifyBase (Gtk.StateType.Normal, Style.Base (Gtk.StateType.Normal));