소스 검색

Fixed TextView.CharRect bug returning wrong width.

Mark Sibly 8 년 전
부모
커밋
01d3cd655d
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  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