[Monodevelop-patches-list] r2500 - in trunk/MonoDevelop/Extras/BooBinding: . Gui

Peter Johanson <latexer@gentoo.org> pjohanson at mono-cvs.ximian.com
Mon May 2 19:48:49 EDT 2005


Author: pjohanson
Date: 2005-05-02 19:48:49 -0400 (Mon, 02 May 2005)
New Revision: 2500

Modified:
   trunk/MonoDevelop/Extras/BooBinding/ChangeLog
   trunk/MonoDevelop/Extras/BooBinding/Gui/ShellTextView.boo
Log:
Small fix to make MD not crash when using the shell with no project open, and actually commit the multi-line paste fix.


Modified: trunk/MonoDevelop/Extras/BooBinding/ChangeLog
===================================================================
--- trunk/MonoDevelop/Extras/BooBinding/ChangeLog	2005-05-02 15:11:07 UTC (rev 2499)
+++ trunk/MonoDevelop/Extras/BooBinding/ChangeLog	2005-05-02 23:48:49 UTC (rev 2500)
@@ -1,4 +1,10 @@
 2005-05-02  Peter Johanson <latexer at gentoo.org>
+
+	* Gui/BooShellModel.boo: Fix from lluis to make
+	MD not crash when right clicking the shell with
+	no projects open.
+
+2005-05-02  Peter Johanson <latexer at gentoo.org>
 	
 	* BooShell/BooShell.boo: Convert to using Monitor instead
 	of just lock(), prevents the 100% utilization by mono

Modified: trunk/MonoDevelop/Extras/BooBinding/Gui/ShellTextView.boo
===================================================================
--- trunk/MonoDevelop/Extras/BooBinding/Gui/ShellTextView.boo	2005-05-02 15:11:07 UTC (rev 2499)
+++ trunk/MonoDevelop/Extras/BooBinding/Gui/ShellTextView.boo	2005-05-02 23:48:49 UTC (rev 2500)
@@ -96,7 +96,7 @@
 		tag = TextTag ("Freezer")
 		tag.Editable = false
 		Buffer.TagTable.Add (tag)
-		prompt(false)
+		prompt (false)
 
 		_projService = ServiceManager.GetService(typeof(ProjectService))
 		_projService.EndBuild += ProjectCompiled
@@ -132,11 +132,11 @@
 		else:
 			_combine = _projService.CurrentOpenCombine
 			if _combine is null:
-				return
+				return _assemblies
 
 			projects = _combine.GetAllProjects()
 			if projects is null:
-				return
+				return _assemblies
 			for entry as Project in projects:
 				if entry is null:
 					continue
@@ -306,14 +306,14 @@
 	
 	#endregion
 
+	// Mark to find the beginning of our next input line
+	private _endOfLastProcessing as TextMark
+
 	#region Public getters for useful values
 	public InputLineBegin as TextIter:
 		get:
-			iter = Buffer.GetIterAtLine(Buffer.LineCount)
-			// Really should be either _promptRegular or Multiline, but
-			// those are the same length
-			iter.ForwardChars(_promptRegular.Length)
-			return iter
+			endIter = Buffer.GetIterAtMark (_endOfLastProcessing)
+			return endIter
 	
 	public InputLineEnd as TextIter:
 		get:
@@ -357,6 +357,12 @@
 
 		Buffer.PlaceCursor (Buffer.EndIter)
 		ScrollMarkOnscreen(Buffer.InsertMark)
+		
+
+		// Record the end of where we processed, used to calculate start
+		// of next input line
+		_endOfLastProcessing = Buffer.CreateMark (null, Buffer.EndIter, true)
+
 		// Freeze all the text except our input line
 		Buffer.ApplyTag(Buffer.TagTable.Lookup("Freezer"), Buffer.StartIter, InputLineBegin)
 		




More information about the Monodevelop-patches-list mailing list