From 97c8e95c223c75ee029e42ee7304f1dd9b969cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Mon, 27 Jul 2015 18:41:14 +0200 Subject: [PATCH] 2015-07-27 18:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/teditor.prg ! fixed hb_ULen() wrongly used instead of Len() for arrays % use byte oriented functions (hb_B*()) instead of character ones (hb_U*()) to update color strings --- ChangeLog.txt | 6 ++++++ src/rtl/teditor.prg | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index edf1ca95af..98f47bacc5 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,12 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2015-07-27 18:41 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/rtl/teditor.prg + ! fixed hb_ULen() wrongly used instead of Len() for arrays + % use byte oriented functions (hb_B*()) instead of character + ones (hb_U*()) to update color strings + 2015-07-27 16:36 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/chruni.c * added new functions hb_BStuff() and hb_UStuff() diff --git a/src/rtl/teditor.prg b/src/rtl/teditor.prg index 5ecadb4b08..bfe8fc006e 100644 --- a/src/rtl/teditor.prg +++ b/src/rtl/teditor.prg @@ -271,7 +271,7 @@ METHOD GotoLine( nRow ) CLASS HBEditor RETURN ::Goto( nRow, ::nCol ) METHOD LineCount() CLASS HBEditor - RETURN hb_ULen( ::aText ) + RETURN Len( ::aText ) METHOD Display() CLASS HBEditor @@ -649,7 +649,7 @@ METHOD ReformParagraph() CLASS HBEditor LOCAL nLines LOCAL aPos - DO WHILE lNext .AND. ::nRow <= hb_ULen( ::aText ) + DO WHILE lNext .AND. ::nRow <= Len( ::aText ) cLine += ::aText[ ::nRow ]:cText lNext := ::aText[ ::nRow ]:lSoftCR ::RemoveLine( ::nRow ) @@ -696,7 +696,7 @@ METHOD Hilite() CLASS HBEditor hb_tokenGet( ::cColorSpec, 2, "," ) + "," + ; hb_tokenGet( ::cColorSpec, 1, "," ) - ::SetColor( cEnhanced + hb_URight( ::cColorSpec, hb_ULen( ::cColorSpec ) - hb_ULen( cEnhanced ) ) ) + ::SetColor( cEnhanced + hb_BRight( ::cColorSpec, hb_BLen( ::cColorSpec ) - hb_BLen( cEnhanced ) ) ) RETURN Self @@ -707,7 +707,7 @@ METHOD DeHilite() CLASS HBEditor hb_tokenGet( ::cColorSpec, 2, "," ) + "," + ; hb_tokenGet( ::cColorSpec, 1, "," ) - ::SetColor( cStandard + hb_URight( ::cColorSpec, hb_ULen( ::cColorSpec ) - hb_ULen( cStandard ) ) ) + ::SetColor( cStandard + hb_BRight( ::cColorSpec, hb_BLen( ::cColorSpec ) - hb_BLen( cStandard ) ) ) RETURN Self