As of Delphi 11.2 they fixed the wholeword option handing (https://quality.embarcadero.com/browse/RSP-20731) however they changed the way that SelStart works when searching backwards (its' now -1 based instead of zero based..) To fix it to match the earlier behavior you have to do something like:
if soDown in StringOptions then
Result := SearchBuf(Buf, BufLen, SelStart, SelLength, SearchString, StringOptions)
else
Result := SearchBuf(Buf, BufLen, SelStart - 1, SelLength, SearchString, StringOptions);
Basically, when searching backwards a SelStart of zero means to start the search at char position 1. Maybe there's some reason to make it work that way, but it's a change from earlier versions where searching forwards and backwards used the easier to understand base of zero as the start of the search. I haven't created a bug report for this as I had some problems with attempting to do it recently. Also is there a way to do an ifdef specific to 11.2?