[Gambas-user] CONTRIB: Modified Find for editor with List

ron ronstk at ...239...
Sat Mar 27 21:48:31 CET 2004


On Friday 26 March 2004 21:29, Fabien Bodard wrote:
> i've corrected the ocur bugs....
>
> now you can have to identical key...
>
> my correction is between <fabien> tags
>
> Fabien

Ok Fabien,

I have good news.
I found the real reason (i think).
As told I belive the key is correct and it was.
The way to get the bug is if you change, after the list is build, the cursor 
postion to the start of the word/line and then press the Find Next again.

The orginal search start and ends at the cursor position of the editor for 
line and column and the start line is done twice as
right part + otherlines + left part.
I search the whole line at once starting at column 1 but get the line twice.

Change the code to

    IF NOT cvwFindList.Exist(sleaf) THEN
      cvwFindList.Add(sLeaf,  Right$("     " & CStr(iLine+1),5),,sNode)           
      cvwFindList[sLeaf][1] = Right$("     " & CStr(iLine+1),5) & " "
      cvwFindList[sLeaf][2] = Right$("     " & CStr(iPos) ,5) & " "
      cvwFindList[sLeaf][3] = Trim(sLine) ' sLine'leading tabs in UltraEdit
    ENDIF       

I changed this way and works now correct, I can't force this bug.   

Ron





More information about the User mailing list