anchor.diff:    //
     if pageControl.ActivePageIndex <> -1 then
       mainForm.docFocusedNotify(Self, pageControl.ActivePageIndex);
  -
  -  // re-tokenize.
  -  fKeyChanged := true;
  -  beginUpdateByDelay;
  +  //
  +  if (curr.modified or (pageCOntrol.ActivePage.Caption = '')) then
  +  begin
  +    fKeyChanged := true;
  +    beginUpdateByDelay;
  +  end;
   end;
   
   procedure TCEEditorWidget.PageControlChange(Sender: TObject);
  
positive.code:   //
    memo.OnKeyDown := @memoKeyDown;
    memo.OnKeyUp := @memoKeyDown;
    memo.OnMouseDown := @memoMouseDown;
    memo.OnChange := @memoChange;
    memo.OnMouseMove := @memoMouseMove;
  
negative.code: begin
    ed := TCESynMemo(sender);
    ed.modified := true;
    fKeyChanged := true;
    beginUpdateByDelay;
    UpdateByEvent;
  end;
  
  procedure TCEEditorWidget.UpdateByEvent;
  const
    modstr: array[boolean] of string = ('...', 'MODIFIED');
  var
    ed: TCESynMemo;
  begin
    ed := getCurrentEditor;
    if ed = nil then exit;
    //
    editorStatus.Panels[0].Text := format('%d : %d',[ed.CaretY, ed.CaretX]);
    editorStatus.Panels[1].Text := modstr[ed.modified];
    editorStatus.Panels[2].Text := ed.fileName;
  end;
  
  procedure TCEEditorWidget.UpdateByDelay;
  var
    ed: TCESynMemo;
    err: TLexError;
    md: string;
  begin
    ed := getCurrentEditor;
    if ed = nil then exit;
    if not fKeyChanged then exit;
    //
    fKeyChanged := false;
    mainForm.docChangeNotify(Self, editorIndex);
    if ed.Lines.Count = 0 then exit;
    //
    mainForm.MessageWidget.Clear;
    lex( ed.Lines.Text, tokLst );
  
    checkSyntacticErrors( tokLst, errLst);
    for err in errLst do
      mainForm.MessageWidget.addMessage(format(
      '%s  (@line:%4.d @char:%.4d)',[err.msg, err.position.y, err.position.x]));
  
    md := '';
    if ed.isDSource then
      md := getModuleName(tokLst);
    if md = '' then md := extractFileName(ed.fileName);
    pageControl.ActivePage.Caption := md;
  
    mainForm.MessageWidget.scrollToBack;
    tokLst.Clear;
    errLst.Clear;
  end;
  
  end.
  