From: <ob...@us...> - 2008-09-03 17:51:48
|
Revision: 11881 http://jvcl.svn.sourceforge.net/jvcl/?rev=11881&view=rev Author: obones Date: 2008-09-03 17:51:39 +0000 (Wed, 03 Sep 2008) Log Message: ----------- Mantis 4434: Now works well with a 1 character search string. Modified Paths: -------------- trunk/jvcl/run/JvFindReplace.pas Modified: trunk/jvcl/run/JvFindReplace.pas =================================================================== --- trunk/jvcl/run/JvFindReplace.pas 2008-09-03 17:32:48 UTC (rev 11880) +++ trunk/jvcl/run/JvFindReplace.pas 2008-09-03 17:51:39 UTC (rev 11881) @@ -500,17 +500,15 @@ if not (frDown in FOptions) then begin - Offset := GetEditSelStart; - if Offset = 0 then + Offset := GetEditSelStart - 1; + if Offset <= 0 then Offset := 1; FoundPos := FindInTextRev(GetEditText, FFindText, Length(GetEditText) - Offset, Length(GetEditText), FFast, WholeWord, MatchCase) end else begin - Offset := GetEditSelStart + GetEditSelLength; - if Offset = 0 then - Offset := 1; + Offset := GetEditSelStart + GetEditSelLength + 1; FoundPos := FindInText(GetEditText, FFindText, Offset, Length(GetEditText), FFast, WholeWord, MatchCase); end; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |