[Monodevelop-patches-list] r2618 - in trunk/MonoDevelop/Core/src: AddIns/DisplayBindings/SourceEditor AddIns/DisplayBindings/SourceEditor/Gui AddIns/DisplayBindings/SourceEditor/Gui/Dialogs MonoDevelop.Base MonoDevelop.Base/Gui/Pads MonoDevelop.Base/Gui/Pads/ClassPad MonoDevelop.Base/Gui/Search/SearchResult MonoDevelop.Base/Services/Tasks
Jacob Ilsø Christensen <jacobilsoe@gmail.com>
jacobilsoe at mono-cvs.ximian.com
Fri Jul 1 09:54:30 EDT 2005
Author: jacobilsoe
Date: 2005-07-01 09:54:30 -0400 (Fri, 01 Jul 2005)
New Revision: 2618
Modified:
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/GotoLineNumberDialog.cs
trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ClassPad/ClassNodeBuilder.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ClassPad/MemberNodeCommandHandler.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/OpenTaskView.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Search/SearchResult/DefaultSearchResult.cs
trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Tasks/Task.cs
Log:
Make lines and columns 1-based
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/ChangeLog 2005-07-01 13:54:30 UTC (rev 2618)
@@ -1,5 +1,11 @@
2005-07-01 Jacob Ilsø Christensen <jacobilsoe at gmail.com>
+ * Gui/Dialogs/GotoLineNumberDialog.cs:
+ * Gui/SourceEditorDisplayBinding.cs:
+ Make lines and columns 1-based.
+
+2005-07-01 Jacob Ilsø Christensen <jacobilsoe at gmail.com>
+
* CodeCompletion/ListWindow.cs: Make sure the list
window is no larger than necessary.
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/GotoLineNumberDialog.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/GotoLineNumberDialog.cs 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/Dialogs/GotoLineNumberDialog.cs 2005-07-01 13:54:30 UTC (rev 2618)
@@ -56,9 +56,9 @@
if (window != null && window.ViewContent is IPositionable) {
- int l = Math.Max (0, Int32.Parse(line_number_entry.Text) - 1);
+ int l = Math.Max (1, Int32.Parse(line_number_entry.Text));
- ((IPositionable) window.ViewContent).JumpTo (l, 0);
+ ((IPositionable) window.ViewContent).JumpTo (l, 1);
}
} catch (Exception) {
Modified: trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs 2005-07-01 13:54:30 UTC (rev 2618)
@@ -204,12 +204,12 @@
public void JumpTo (int line, int column)
{
- // NOTE: 0 based!
- TextIter itr = se.Buffer.GetIterAtLine (line);
- itr.LineOffset = column;
+ // NOTE: 1 based!
+ TextIter itr = se.Buffer.GetIterAtLine (line - 1);
+ itr.LineOffset = column - 1;
se.Buffer.PlaceCursor (itr);
- se.Buffer.HighlightLine (line);
+ se.Buffer.HighlightLine (line - 1);
se.View.ScrollToMark (se.Buffer.InsertMark, 0.3, false, 0, 0);
GLib.Timeout.Add (20, new GLib.TimeoutHandler (changeFocus));
}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/ChangeLog 2005-07-01 13:54:30 UTC (rev 2618)
@@ -1,3 +1,12 @@
+2005-07-01 Jacob Ilsø Christensen <jacobilsoe at gmail.com>
+
+ * Services/Tasks/Task.cs:
+ * Gui/Pads/OpenTaskView.cs:
+ * Gui/Pads/ClassPad/ClassNodeBuilder.cs:
+ * Gui/Pads/ClassPad/MemberNodeCommandHandler.cs:
+ * Gui/Search/SearchResult/DefaultSearchResult.cs:
+ Make lines and columns 1-based.
+
2005-06-30 John Luke <john.luke at gmail.com>
* Services/ParserService/AssembyInformation.cs: fix possible nullref
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ClassPad/ClassNodeBuilder.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ClassPad/ClassNodeBuilder.cs 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ClassPad/ClassNodeBuilder.cs 2005-07-01 13:54:30 UTC (rev 2618)
@@ -118,7 +118,7 @@
IViewContent content = window.ViewContent;
if (content is IPositionable) {
- ((IPositionable)content).JumpTo (Math.Max (0, line), 0);
+ ((IPositionable)content).JumpTo (Math.Max (1, line), 1);
}
}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ClassPad/MemberNodeCommandHandler.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ClassPad/MemberNodeCommandHandler.cs 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/ClassPad/MemberNodeCommandHandler.cs 2005-07-01 13:54:30 UTC (rev 2618)
@@ -58,7 +58,7 @@
IViewContent content = window.ViewContent;
if (content is IPositionable) {
- ((IPositionable)content).JumpTo (Math.Max (0, line), 0);
+ ((IPositionable)content).JumpTo (Math.Max (1, line), 1);
}
}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/OpenTaskView.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/OpenTaskView.cs 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Pads/OpenTaskView.cs 2005-07-01 13:54:30 UTC (rev 2618)
@@ -258,7 +258,7 @@
store.AppendValues (
stock,
- t.Line + 1,
+ t.Line,
t.Description,
fileName,
path,
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Search/SearchResult/DefaultSearchResult.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Search/SearchResult/DefaultSearchResult.cs 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Gui/Search/SearchResult/DefaultSearchResult.cs 2005-07-01 13:54:30 UTC (rev 2618)
@@ -20,8 +20,8 @@
public DefaultSearchResult (ITextIterator iter, int length)
{
offset = iter.Position;
- line = iter.Line;
- column = iter.Column;
+ line = iter.Line + 1;
+ column = iter.Column + 1;
this.length = length;
documentInformation = iter.DocumentInformation;
}
Modified: trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Tasks/Task.cs
===================================================================
--- trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Tasks/Task.cs 2005-07-01 13:48:29 UTC (rev 2617)
+++ trunk/MonoDevelop/Core/src/MonoDevelop.Base/Services/Tasks/Task.cs 2005-07-01 13:54:30 UTC (rev 2618)
@@ -95,8 +95,8 @@
{
this.project = project;
type = error.IsWarning ? error.ErrorNumber == "COMMENT" ? TaskType.Comment : TaskType.Warning : TaskType.Error;
- column = error.Column - 1;
- line = error.Line - 1;
+ column = error.Column;
+ line = error.Line;
description = error.ErrorText;
if (error.ErrorNumber != String.Empty)
description += "(" + error.ErrorNumber + ")";
@@ -137,7 +137,7 @@
}
IViewContent content = window.ViewContent;
if (content is IPositionable) {
- ((IPositionable)content).JumpTo(Math.Max(0, line), Math.Max(0, column));
+ ((IPositionable)content).JumpTo(Math.Max(1, line), Math.Max(1, column));
}
}
}
More information about the Monodevelop-patches-list
mailing list