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;
|
||||
if fDoc.Lines.Count = 0 then exit;
|
||||
//
|
||||
md := '';
|
||||
if fDoc.isDSource and (fDoc.CaretY < 50) then
|
||||
md := pageControl.currentPage.Caption;
|
||||
if (fDoc.isDSource and (fDoc.CaretY < 50)) or (md = fDoc.fileName.extractFileName) then
|
||||
begin
|
||||
lex(fDoc.Lines.Text, fTokList, @lexFindToken);
|
||||
md := getModuleName(fTokList);
|
||||
fTokList.Clear;
|
||||
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;
|
||||
end;
|
||||
{$ENDREGION}
|
||||
|
|
Loading…
Reference in New Issue