[Monodevelop-patches-list] r688 - trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Tue Jan 27 19:01:11 EST 2004


Author: benm
Date: 2004-01-27 19:01:11 -0500 (Tue, 27 Jan 2004)
New Revision: 688

Modified:
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
Log:
impl IPositionable

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2004-01-27 22:38:51 UTC (rev 687)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorDisplayBinding.cs	2004-01-28 00:01:11 UTC (rev 688)
@@ -64,7 +64,7 @@
 	}
 	
 	public class SourceEditorDisplayBindingWrapper : AbstractViewContent,
-		IEditable
+		IEditable, IPositionable
 	{
 		internal SourceEditor se;
 		
@@ -91,6 +91,17 @@
 			CaretModeChanged (null, null);
 		}
 		
+		public void JumpTo (int line, int column)
+		{
+			// NOTE: 0 based!
+			
+			TextIter itr = se.Buffer.GetIterAtLine (line);
+			itr.LineOffset = column;
+			
+			se.Buffer.MoveMark (se.Buffer.InsertMark, itr);
+			se.View.ScrollMarkOnscreen (se.Buffer.InsertMark);
+		}
+		
 		public override void RedrawContent()
 		{
 		}




More information about the Monodevelop-patches-list mailing list