mirror of https://gitlab.com/basile.b/dexed.git
fix #23, page caption for dd files
This commit is contained in:
parent
1d3c14c000
commit
7451c0e052
|
@ -540,15 +540,18 @@ begin
|
||||||
if fDoc.Lines.Count = 0 then exit;
|
if fDoc.Lines.Count = 0 then exit;
|
||||||
//
|
//
|
||||||
md := pageControl.currentPage.Caption;
|
md := pageControl.currentPage.Caption;
|
||||||
if (fDoc.isDSource and (fDoc.CaretY < 50)) or (md = fDoc.fileName.extractFileName) then
|
if ((fDoc.CaretY < 50) or (md.isEmpty) or (md = '<new document>'))
|
||||||
|
or ((md = fDoc.fileName.extractFileName) and (fDoc.isDSource)) then
|
||||||
|
begin
|
||||||
|
if fDoc.isDSource then
|
||||||
begin
|
begin
|
||||||
lex(fDoc.Lines.Text, fTokList, @lexFindToken);
|
lex(fDoc.Lines.Text, fTokList, @lexFindToken);
|
||||||
md := getModuleName(fTokList);
|
md := getModuleName(fTokList);
|
||||||
fTokList.Clear;
|
fTokList.Clear;
|
||||||
end;
|
end else
|
||||||
if md.isEmpty or (md = '<new document>') then
|
|
||||||
md := fDoc.fileName.extractFileName;
|
md := fDoc.fileName.extractFileName;
|
||||||
pageControl.currentPage.Caption := md;
|
pageControl.currentPage.Caption := md;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue