anchor.diff:    end;
   end;
   
  -procedure UpdateColoredRangesInLexer(Frame: TEditorFrame; APrimaryEditor: boolean);
  -var
  +procedure DoApplyThemeToEditor(Frame: TEditorFrame; APrimaryEditor: boolean);
  +var
  +  Ed: TATSynEdit;
     Ada: TATAdapterEControl;
  -  Ed: TATSynEdit;
  -begin
  -  //current code is bad:
  -  //Ada.UpdateRangesFoldAndColored causes issue #4233
  -  exit;
  -
  +begin
     if APrimaryEditor then
       Ed:= Frame.Ed1
     else
       Ed:= Frame.Ed2;
  -  Ada:= TATAdapterEControl(Frame.Adapter[Ed]);
  +
  +  Ada:= Frame.Adapter[Ed];
     if Assigned(Ada) and Assigned(Ada.AnClient) then
     begin
  +    Ada.ParseFromLine(0, true);
  +    {
  +    //note: before, we called
       Ada.AnClient.CriSecForData.Enter;
       try
         Ada.UpdateRangesFoldAndColored;
       finally
         Ada.AnClient.CriSecForData.Leave;
       end;
  +    //and it caused issue #4233
  +    }
     end;
   end;
   
  
positive.code: 
        //update Markdown code-blocks
        if AndApplyTheme then
          UpdateColoredRangesInLexer(F, true);
      end;
  
      if not F.EditorsLinked then
  
negative.code: 
          //update Markdown code-blocks
          if AndApplyTheme then
            DoApplyThemeToEditor(F, false);
        end;
      end;
  
  