Pārlūkot izejas kodu

Fixed TextView.CharRect bug returning wrong width.

Mark Sibly 8 gadi atpakaļ
vecāks
revīzija
01d3cd655d
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      modules/mojox/textview.monkey2

+ 3 - 2
modules/mojox/textview.monkey2

@@ -530,7 +530,7 @@ Class TextView Extends ScrollableView
 		
 			Local w:=WordWidth( text,i0,eol,x0 )
 			
-			If x0+w>_wrapw	'-_charw
+			If x0+w>_wrapw
 				y0+=_charh
 				x0=0
 			Endif
@@ -539,6 +539,7 @@ Class TextView Extends ScrollableView
 
 			If index<i0+l
 				x0+=WordWidth( text,i0,index,x0 )
+				i0=index
 				Exit
 			Endif
 			
@@ -569,7 +570,7 @@ Class TextView Extends ScrollableView
 		
 			Local w:=WordWidth( text,i0,eol,x0 )
 			
-			If x0+w>_wrapw	'-_charw
+			If x0+w>_wrapw
 				If p.y<y0 Exit
 				y0+=_charh
 				x0=0