anchor.diff:            true{ADoUnfold}
             );
   
  -      if bSavedCarets then
  +      if bSaveCarets then
           AFinder.Editor.Carets.Assign(SavedCarets);
       finally
  -      FreeAndNil(SavedCarets);
  +      if bSaveCarets then
  +        FreeAndNil(SavedCarets);
       end;
     end;
   end;
  
positive.code:   StyleBorder: TATLineStyle;
    SavedCarets: TATCarets;
    bChanged: boolean;
    bSavedCarets: boolean;
    NLineCount: integer;
  begin
    ColorBorder:= GetAppStyle(AppHiAll_ThemeStyleId).BgColor;
  
negative.code:   begin
      //to fix CudaText issue #3950.
      //we save selections before running HighlightAll, later we restore them.
      bSaveCarets:= AFinder.Editor.Carets.IsSelection;
      if bSaveCarets then
        SavedCarets:= TATCarets.Create;
  
      try
        if bSaveCarets then
          SavedCarets.Assign(AFinder.Editor.Carets);
  
        //we found and highlighted all matches,
  