Hi DAW,

There seems to be a string manipluation bug within the ShowSuggestion procedure, when you have the following properties set:
Set peSuggestionMode to smCustom
Set pbFullText to True
Because you're doing a custom search and have pbFullText=True to highlight the matching text - there is a chance where the "iPos" variable could be 0 (zero), when this is the case the text shown in the list is just weird and wrong.

A classic example would be phone numbers, the user enters "021654321" but the data could be stored as either "021654321" or "+6421654321" - therefore in this case you would normalise the search text within the OnFindSuggestions to just "21654321" thus finding both records.

The problem with the ShowSuggestion procedure is that it uses the value "021654321" to test - therefore resulting in a iPos=0 for the record "+6421654321", but still displays it as "4321" - which is just wrong.

Suggested fix for ShowSuggestion:

Code:
...
    Move SuggestionData.aValues[0] to sValue
    If (not(bFullText)) Begin
        Set pbBold of ghoSuggestionList to True
        Send AppendText of ghoSuggestionList (Left(sValue,Length(sSearch))) 
        Set pbBold of ghoSuggestionList to False
        Send AppendText of ghoSuggestionList (Mid(sValue,255,Length(sSearch)+1)) 
    End
    Else Begin
        Set pbBold of ghoSuggestionList to False
        Move (Pos(Uppercase(sSearch),Uppercase(sValue))) to iPos
        If (iPos) Begin
            Send AppendText of ghoSuggestionList (Left(sValue,iPos-1)) 
            Set pbBold of ghoSuggestionList to True
            Send AppendText of ghoSuggestionList (Mid(sValue,Length(sSearch),iPos)) 
            Set pbBold of ghoSuggestionList to False
            Send AppendText of ghoSuggestionList (Mid(sValue,255,iPos+Length(sSearch))) 
        End 
        Else Begin      
            //@ FIXED: Possibility where iPos=0 for smCustom
            Send AppendText of ghoSuggestionList (Left(sValue,255))
        End
    End
...

I hope this will be fixed in DF19.1

Thanks