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