View Issue Details

IDProjectCategoryView StatusLast Update
0006411JEDI VCL00 JVCL Componentspublic2020-05-19 10:00
ReporterhusteAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionsuspended 
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0006411: JvRichEdit.FindText() does not work properly with stBackward turned on
DescriptionLet StartPos be the current SelStart:
According to the documentation of JvRichEdit, this should work to find a given Text backwards:
  FindText(SprungMarke,0,StartPos-1,[stBackward,stSetSelection]);

In fact, the EM_FINDTEXTEX message used in FindText works differently: cpMin and cpMax are reversed. See remarks on https://msdn.microsoft.com/en-us/library/windows/desktop/bb788011%28v=vs.85%29.aspx

Thus, I changed the code in FindText in my local installation to:
[...]
  with Find.chrg do
  begin
    if stBackward in Options then
      begin
      cpMax := StartPos;
      cpMin := cpMax + Abs(Length);
      end
    else
      begin
      cpMin := StartPos;
      cpMax := cpMin + Abs(Length);
      end;
  end;
  if RichEditVersion >= 2 then
[...]

TagsNo tags attached.

Activities

obones

2015-09-14 11:24

administrator   ~0021191

Please provide the zipped sources of a sample application showing this

obones

2020-05-19 10:00

administrator   ~0021893

No reply in a timely manner, suspending the issue

Issue History

Date Modified Username Field Change
2015-06-01 13:25 huste New Issue
2015-09-14 11:24 obones Note Added: 0021191
2015-09-14 11:24 obones Status new => feedback
2020-05-19 10:00 obones Assigned To => obones
2020-05-19 10:00 obones Status feedback => resolved
2020-05-19 10:00 obones Resolution open => suspended
2020-05-19 10:00 obones Note Added: 0021893