mirror of https://gitlab.com/basile.b/dexed.git
fix #14
This commit is contained in:
parent
c08f752fc1
commit
e019c81175
|
@ -539,14 +539,15 @@ begin
|
||||||
fKeyChanged := false;
|
fKeyChanged := false;
|
||||||
if fDoc.Lines.Count = 0 then exit;
|
if fDoc.Lines.Count = 0 then exit;
|
||||||
//
|
//
|
||||||
md := '';
|
md := pageControl.currentPage.Caption;
|
||||||
if fDoc.isDSource and (fDoc.CaretY < 50) then
|
if (fDoc.isDSource and (fDoc.CaretY < 50)) or (md = fDoc.fileName.extractFileName) 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;
|
||||||
if md.isEmpty then md := fDoc.fileName.extractFileName;
|
if md.isEmpty or (md = '<new document>') then
|
||||||
|
md := fDoc.fileName.extractFileName;
|
||||||
pageControl.currentPage.Caption := md;
|
pageControl.currentPage.Caption := md;
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
Loading…
Reference in New Issue