Просмотр исходного кода

2006-01-03 Peter Dennis Bartok <[email protected]>

	* RichTextBox.cs: FormatText is 1-based, make it so when SelectionFont
	  is called. This fixes the crash in Nexxia when setting the font
	  attributes in the chat. [However, RTF needs a look-over to make sure
	  that all SelectionXXX methods handle the special case that selection
	  is empty and therefore the change must be applied to all text starting
	  at the cursor/selection start]


svn path=/trunk/mcs/; revision=55039
Peter Dennis Bartok 20 лет назад
Родитель
Сommit
e744b438e4

+ 9 - 0
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

@@ -1,3 +1,12 @@
+2006-01-03  Peter Dennis Bartok  <[email protected]>
+
+	* RichTextBox.cs: FormatText is 1-based, make it so when SelectionFont
+	  is called. This fixes the crash in Nexxia when setting the font
+	  attributes in the chat. [However, RTF needs a look-over to make sure
+	  that all SelectionXXX methods handle the special case that selection
+	  is empty and therefore the change must be applied to all text starting
+	  at the cursor/selection start]
+
 2006-01-03  Peter Dennis Bartok  <[email protected]> 
 
 	* XplatUI.cs, XplatUIDriver.cs, XplatUIX11.cs, XplatUIWin32.cs,

+ 1 - 1
mcs/class/Managed.Windows.Forms/System.Windows.Forms/RichTextBox.cs

@@ -481,7 +481,7 @@ Console.WriteLine("FIXME - SelectionColor should not alter font");
 				sel_start = document.LineTagToCharIndex(document.selection_start.line, document.selection_start.pos);
 				sel_end = document.LineTagToCharIndex(document.selection_end.line, document.selection_end.pos);
 
-				document.FormatText(document.selection_start.line, document.selection_start.pos + 1, document.selection_end.line, document.selection_end.pos, value, document.selection_start.tag.color);
+				document.FormatText(document.selection_start.line, document.selection_start.pos + 1, document.selection_end.line, document.selection_end.pos + 1, value, document.selection_start.tag.color);
 
 				document.CharIndexToLineTag(sel_start, out document.selection_start.line, out document.selection_start.tag, out document.selection_start.pos);
 				document.CharIndexToLineTag(sel_end, out document.selection_end.line, out document.selection_end.tag, out document.selection_end.pos);