mirror of https://gitlab.com/basile.b/dexed.git
update tab caption
This commit is contained in:
parent
e3b15f84f9
commit
7329af23f0
|
@ -372,8 +372,8 @@ end;
|
||||||
procedure TCEEditorWidget.updateImperative;
|
procedure TCEEditorWidget.updateImperative;
|
||||||
const
|
const
|
||||||
modstr: array[boolean] of string = ('...', 'MODIFIED');
|
modstr: array[boolean] of string = ('...', 'MODIFIED');
|
||||||
//var
|
var
|
||||||
//md: string;
|
md: string;
|
||||||
begin
|
begin
|
||||||
if fDoc = nil then begin
|
if fDoc = nil then begin
|
||||||
editorStatus.Panels[0].Text := '';
|
editorStatus.Panels[0].Text := '';
|
||||||
|
@ -383,19 +383,19 @@ begin
|
||||||
editorStatus.Panels[0].Text := format('%d : %d | %d', [fDoc.CaretY, fDoc.CaretX, fDoc.SelEnd - fDoc.SelStart]);
|
editorStatus.Panels[0].Text := format('%d : %d | %d', [fDoc.CaretY, fDoc.CaretX, fDoc.SelEnd - fDoc.SelStart]);
|
||||||
editorStatus.Panels[1].Text := modstr[fDoc.modified];
|
editorStatus.Panels[1].Text := modstr[fDoc.modified];
|
||||||
editorStatus.Panels[2].Text := fDoc.fileName;
|
editorStatus.Panels[2].Text := fDoc.fileName;
|
||||||
// TODO-cEditor: set tab caption directly (e.g one start, if reload last docs)
|
if Visible and (pageControl.ActivePage <> nil) and ((pageControl.ActivePage.Caption = '') or
|
||||||
//if Visible then if pageControl.ActivePage <> nil then
|
(pageControl.ActivePage.Caption = '<new document>')) then
|
||||||
//if pageControl.ActivePage.Caption = '' then
|
begin
|
||||||
//begin
|
if fDoc.isDSource then
|
||||||
// if fDoc.isDSource then
|
begin
|
||||||
// begin
|
fErrList.Clear;
|
||||||
// lex(fDoc.Lines.Text, fTokList, @lexFindToken);
|
fTokList.Clear;
|
||||||
// md := getModuleName(fTokList);
|
lex(fDoc.Lines.Text, fTokList, @lexFindToken);
|
||||||
// fTokList.Clear;
|
md := getModuleName(fTokList);
|
||||||
// end;
|
end;
|
||||||
// if md = '' then md := extractFileName(fDoc.fileName);
|
if md = '' then md := extractFileName(fDoc.fileName);
|
||||||
// pageControl.ActivePage.Caption := md;
|
pageControl.ActivePage.Caption := md;
|
||||||
//end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -426,20 +426,20 @@ begin
|
||||||
if fDoc.isDSource then
|
if fDoc.isDSource then
|
||||||
begin
|
begin
|
||||||
fTokList.Clear;
|
fTokList.Clear;
|
||||||
|
fErrList.Clear;
|
||||||
lex(fDoc.Lines.Text, fTokList, @lexFindToken);
|
lex(fDoc.Lines.Text, fTokList, @lexFindToken);
|
||||||
md := getModuleName(fTokList);
|
md := getModuleName(fTokList);
|
||||||
end;
|
end;
|
||||||
if md = '' then md := extractFileName(fDoc.fileName);
|
if md = '' then md := extractFileName(fDoc.fileName);
|
||||||
pageControl.ActivePage.Caption := md;
|
pageControl.ActivePage.Caption := md;
|
||||||
//
|
|
||||||
fTokList.Clear;
|
// note: not true anymore vecause cesyms use send the doc in stdin
|
||||||
fErrList.Clear;
|
|
||||||
// when a widget saves a temp file & syncro mode is on:
|
// when a widget saves a temp file & syncro mode is on:
|
||||||
// - editor is saved
|
// - editor is saved
|
||||||
// - gutter is updated (green bar indicating a saved block)
|
// - gutter is updated (green bar indicating a saved block)
|
||||||
// - syncroedit icon is hidden
|
// - syncroedit icon is hidden
|
||||||
if fDoc.syncroEdit.Active then
|
//if fDoc.syncroEdit.Active then
|
||||||
fDoc.Refresh;
|
//fDoc.Refresh;
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue