Explorar o código

Fixed TextView.CharRect bug returning wrong width.

Mark Sibly %!s(int64=8) %!d(string=hai) anos
pai
achega
01d3cd655d
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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 )
 			Local w:=WordWidth( text,i0,eol,x0 )
 			
 			
-			If x0+w>_wrapw	'-_charw
+			If x0+w>_wrapw
 				y0+=_charh
 				y0+=_charh
 				x0=0
 				x0=0
 			Endif
 			Endif
@@ -539,6 +539,7 @@ Class TextView Extends ScrollableView
 
 
 			If index<i0+l
 			If index<i0+l
 				x0+=WordWidth( text,i0,index,x0 )
 				x0+=WordWidth( text,i0,index,x0 )
+				i0=index
 				Exit
 				Exit
 			Endif
 			Endif
 			
 			
@@ -569,7 +570,7 @@ Class TextView Extends ScrollableView
 		
 		
 			Local w:=WordWidth( text,i0,eol,x0 )
 			Local w:=WordWidth( text,i0,eol,x0 )
 			
 			
-			If x0+w>_wrapw	'-_charw
+			If x0+w>_wrapw
 				If p.y<y0 Exit
 				If p.y<y0 Exit
 				y0+=_charh
 				y0+=_charh
 				x0=0
 				x0=0