[Monodevelop-patches-list] r1620 - in trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor: . Gui

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sat May 22 01:00:03 EDT 2004


Author: tberman
Date: 2004-05-22 01:00:03 -0400 (Sat, 22 May 2004)
New Revision: 1620

Modified:
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
   trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
Log:
2004-05-22  Todd Berman  <tberman at sevenl.net>
                                                                                
        * Gui/SourceEditorView.cs: applied patch by Gustav Munkby <grrdev AT
        gmx.net> to fix bug #58789.


Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2004-05-22 04:51:56 UTC (rev 1619)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/ChangeLog	2004-05-22 05:00:03 UTC (rev 1620)
@@ -1,3 +1,8 @@
+2004-05-22  Todd Berman  <tberman at sevenl.net>
+
+	* Gui/SourceEditorView.cs: applied patch by Gustav Munkby <grrdev AT
+	gmx.net> to fix bug #58789.
+
 2004-05-20  Todd Berman  <tberman at sevenl.net>
 
 	* Gui/SourceEditorBuffer.cs: update to gtk-sharp from cvs.

Modified: trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2004-05-22 04:51:56 UTC (rev 1619)
+++ trunk/MonoDevelop/src/AddIns/DisplayBindings/SourceEditor/Gui/SourceEditorView.cs	2004-05-22 05:00:03 UTC (rev 1620)
@@ -419,6 +419,11 @@
 				return false;
 			
 			int y0 = begin.Line, y1 = end.Line;
+
+			// If last line isn't selected, it's illogical to indent it.
+			if (end.StartsLine())
+				y1--;
+
 			if (y0 == y1)
 				return false;
 			
@@ -437,6 +442,11 @@
 				return false;
 			
 			int y0 = begin.Line, y1 = end.Line;
+
+			// If last line isn't selected, it's illogical to indent it.
+			if (end.StartsLine())
+				y1--;
+
 			if (y0 == y1)
 				return false;
 			
@@ -455,8 +465,11 @@
 
 		void IndentLines (int y0, int y1, string indent)
 		{
-			for (int l = y0; l <= y1; l ++)
-				Buffer.Insert (Buffer.GetIterAtLine (l), indent);
+			for (int l = y0; l <= y1; l ++) {
+				TextIter it = Buffer.GetIterAtLine (l);
+				if (!it.EndsLine())
+					Buffer.Insert (it, indent);
+			}
 		}
 		
 		// WORKAROUND until we get this method returning char in gtk#




More information about the Monodevelop-patches-list mailing list