diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3238cd39a1..02f3e97bbd 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,20 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-03-30 05:17 UTC+0200 Xavi (jarabal/at/gmail.com) + * harbour/src/rtl/teditor.prg + ! Fixed typo in K_CTRL_PGDN. + + * harbour/src/rtl/memoedit.prg + % Adjust nLineLength, SCOREBOAR to present as Clipper. + + PROCEDURE MAIN + CLEAR SCREEN + @ 1,0 TO 5,11 + SET SCOREBOARD ON + MemoEdit( "12345678901", 2, 1, 4, 10, .T. ) + RETURN + 2010-03-29 22:53 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/os2/gcc.mk + Readded OS/2 windres call in coff mode. Commented the whole diff --git a/harbour/src/rtl/memoedit.prg b/harbour/src/rtl/memoedit.prg index 108f7211ce..51da9a3d9e 100644 --- a/harbour/src/rtl/memoedit.prg +++ b/harbour/src/rtl/memoedit.prg @@ -160,16 +160,16 @@ METHOD KeyboardHook( nKey ) CLASS HBMemoEditor ELSE IF nKey == K_ESC IF ::lDirty .AND. Set( _SET_SCOREBOARD ) - cBackScr := SaveScreen( ::nTop, ::nRight - 18, ::nTop, ::nRight ) + cBackScr := SaveScreen( 0, MaxCol() - 18, 0, MaxCol() ) nRow := Row() nCol := Col() - hb_dispOutAt( ::nTop, ::nRight - 18, "Abort Edit? (Y/N)" ) - SetPos( ::nTop, ::nRight - 1 ) + hb_dispOutAt( 0, MaxCol() - 18, "Abort Edit? (Y/N)" ) + SetPos( 0, MaxCol() - 1 ) nYesNoKey := Inkey( 0 ) - RestScreen( ::nTop, ::nRight - 18, ::nTop, ::nRight, cBackScr ) + RestScreen( 0, MaxCol() - 18, 0, MaxCol(), cBackScr ) SetPos( nRow, nCol ) IF nYesNoKey == Asc( "Y" ) .OR. nYesNoKey == Asc( "y" ) @@ -297,7 +297,7 @@ FUNCTION MemoEdit( cString,; DEFAULT nBottom TO MaxRow() DEFAULT nRight TO MaxCol() DEFAULT lEditMode TO .T. - DEFAULT nLineLength TO nRight - nLeft + DEFAULT nLineLength TO nRight - nLeft + 1 DEFAULT nTabSize TO 4 DEFAULT nTextBuffRow TO 1 DEFAULT nTextBuffColumn TO 0 diff --git a/harbour/src/rtl/teditor.prg b/harbour/src/rtl/teditor.prg index 32f6c219d2..5f5bb9393f 100644 --- a/harbour/src/rtl/teditor.prg +++ b/harbour/src/rtl/teditor.prg @@ -461,7 +461,6 @@ METHOD LineColor( nRow ) CLASS HBEditor METHOD MoveCursor( nKey ) CLASS HBEditor LOCAL lMoveKey := .T. - LOCAL nCursor := SetCursor( SC_NONE ) DO CASE CASE nKey == K_DOWN @@ -502,10 +501,10 @@ METHOD MoveCursor( nKey ) CLASS HBEditor CASE nKey == K_CTRL_PGDN ::nRow := ::naTextLen - ::nCol := Max( ::LineLen( ::nRow ), 1 ) + ::nCol := Max( ::LineLen( ::nRow ) + 1, 1 ) ::nFirstRow := Max( ::naTextLen - ::nNumRows + 1, 1 ) ::nFirstCol := Max( ::nCol - ::nNumCols + 1, 1 ) - ::SetPos( Min( ::nTop + ::naTextLen - 1, ::nBottom ), Min( ::nLeft + ::nCol, ::nRight ) ) + ::SetPos( Min( ::nTop + ::naTextLen - 1, ::nBottom ), Min( ::nLeft + ::nCol - 1, ::nRight ) ) ::display() CASE nKey == K_UP @@ -629,8 +628,6 @@ METHOD MoveCursor( nKey ) CLASS HBEditor ENDCASE - SetCursor( nCursor ) - RETURN lMoveKey // Changes insert state and insertion / overstrike mode of editor @@ -1052,7 +1049,6 @@ METHOD New( cString, nTop, nLeft, nBottom, nRight, lEditMode, nLineLength, nTabS hb_scroll( nTop, nLeft, nBottom, nRight ) // Set cursor upper left corner - //::SetPos( ::nTop, ::nLeft ) ::SetPos( ::nTop + nWndRow, ::nLeft + nWndCol ) RETURN Self