2011-10-05 14:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* src/rtl/tget.prg
! If the cursor is located in the middle of a word, ::wordLeft() no
places it at the beginning of this word, the cursor jumps to the
previous one.
! If the cursor is located at the end of a word ::wordRight() no places
it at the beginning of the next word skipping only the spaces between
them, the next word is skipped entirely.
; Patch and description by Juan Gálvez
This commit is contained in:
@@ -16,6 +16,16 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-10-05 14:12 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/rtl/tget.prg
|
||||
! If the cursor is located in the middle of a word, ::wordLeft() no
|
||||
places it at the beginning of this word, the cursor jumps to the
|
||||
previous one.
|
||||
! If the cursor is located at the end of a word ::wordRight() no places
|
||||
it at the beginning of the next word skipping only the spaces between
|
||||
them, the next word is skipped entirely.
|
||||
; Patch and description by Juan Gálvez
|
||||
|
||||
2011-10-04 23:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbthread.h
|
||||
* include/hbsetup.h
|
||||
|
||||
@@ -713,31 +713,16 @@ METHOD wordLeft() CLASS GET
|
||||
ELSE
|
||||
::typeOut := .F.
|
||||
|
||||
nPos := ::nPos - 1
|
||||
nPos := iif( SubStr( ::cBuffer, ::nPos, 1 ) == " ", ::nPos, ::nPos - 1 )
|
||||
|
||||
DO WHILE nPos > 0
|
||||
IF SubStr( ::cBuffer, nPos, 1 ) == " "
|
||||
DO WHILE nPos > 0 .AND. SubStr( ::cBuffer, nPos, 1 ) == " "
|
||||
nPos--
|
||||
ENDDO
|
||||
DO WHILE nPos > 0 .AND. !( SubStr( ::cBuffer, nPos, 1 ) == " " )
|
||||
nPos--
|
||||
ENDDO
|
||||
IF nPos > 0
|
||||
nPos++
|
||||
ENDIF
|
||||
EXIT
|
||||
ENDIF
|
||||
DO WHILE nPos > 1 .AND. SubStr( ::cBuffer, nPos, 1 ) == " "
|
||||
nPos--
|
||||
ENDDO
|
||||
DO WHILE nPos > 1 .AND. ! ( SubStr( ::cBuffer, nPos, 1 ) == " " )
|
||||
nPos--
|
||||
ENDDO
|
||||
|
||||
IF nPos < 1
|
||||
nPos := 1
|
||||
ENDIF
|
||||
|
||||
IF nPos > 0
|
||||
::pos := nPos
|
||||
ENDIF
|
||||
::pos := iif( nPos > 1, nPos + 1, 1 )
|
||||
|
||||
::lSuppDisplay := .T.
|
||||
::display()
|
||||
@@ -759,25 +744,16 @@ METHOD wordRight() CLASS GET
|
||||
ELSE
|
||||
::typeOut := .F.
|
||||
|
||||
nPos := ::nPos + 1
|
||||
nPos := ::nPos
|
||||
|
||||
DO WHILE nPos <= ::nMaxEdit
|
||||
IF SubStr( ::cBuffer, nPos, 1 ) == " "
|
||||
DO WHILE nPos <= ::nMaxEdit .AND. SubStr( ::cBuffer, nPos, 1 ) == " "
|
||||
nPos++
|
||||
ENDDO
|
||||
EXIT
|
||||
ENDIF
|
||||
DO WHILE nPos < ::nMaxEdit .AND. ! ( SubStr( ::cBuffer, nPos, 1 ) == " " )
|
||||
nPos++
|
||||
ENDDO
|
||||
DO WHILE nPos < ::nMaxEdit .AND. SubStr( ::cBuffer, nPos, 1 ) == " "
|
||||
nPos++
|
||||
ENDDO
|
||||
|
||||
IF nPos > ::nMaxEdit
|
||||
nPos := ::nMaxEdit
|
||||
ENDIF
|
||||
|
||||
IF nPos <= ::nMaxEdit
|
||||
::pos := nPos
|
||||
ENDIF
|
||||
::pos := nPos
|
||||
|
||||
::lSuppDisplay := .T.
|
||||
::display()
|
||||
|
||||
Reference in New Issue
Block a user