From f0a8564e4d581e3847089b06329c3f15fb4baead Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Dec 2012 12:09:46 +0000 Subject: [PATCH] 2012-12-28 13:03 UTC+0100 Viktor Szakats (harbour syenar.net) * src/rtl/teditor.prg ! fixed a regression from 2012-11-14 04:49 UTC+0100, caused by an odd coding case that doesn't occure anywhere else in codebase (verified). Thanks to Vlado for noticing. --- harbour/ChangeLog.txt | 6 ++++++ harbour/src/rtl/teditor.prg | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog.txt b/harbour/ChangeLog.txt index 3d2af41a59..417f000593 100644 --- a/harbour/ChangeLog.txt +++ b/harbour/ChangeLog.txt @@ -10,6 +10,12 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2012-12-28 13:03 UTC+0100 Viktor Szakats (harbour syenar.net) + * src/rtl/teditor.prg + ! fixed a regression from 2012-11-14 04:49 UTC+0100, caused + by an odd coding case that doesn't occure anywhere else + in codebase (verified). Thanks to Vlado for noticing. + 2012-12-27 16:17 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * harbour/src/vm/classes.c ! fixed unexpected item clearing in object item assignment when diff --git a/harbour/src/rtl/teditor.prg b/harbour/src/rtl/teditor.prg index 9141874e6c..f59a2ba486 100644 --- a/harbour/src/rtl/teditor.prg +++ b/harbour/src/rtl/teditor.prg @@ -1008,13 +1008,18 @@ METHOD New( cString, nTop, nLeft, nBottom, nRight, lEditMode, nLineLength, nTabS hb_default( @nBottom , MaxRow() ) hb_default( @nRight , MaxCol() ) hb_default( @lEditMode , .T. ) - hb_default( @nLineLength , NIL ) - hb_default( @nTabSize , NIL ) hb_default( @nTextRow , 1 ) hb_default( @nTextCol , 0 ) hb_default( @nWndRow , 0 ) hb_default( @nWndCol , 0 ) + IF ! ISNUMBER( nLineLength ) + nLineLength := NIL + ENDIF + IF ! ISNUMBER( nTabSize ) + nTabSize := NIL + ENDIF + ::aText := Text2Array( cString, nLineLength ) ::naTextLen := Len( ::aText )