mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 03:32:04 +02:00
* patch by Sergej Gorelkin to improve speed of UpdateStatus on large projects
git-svn-id: trunk@11151 -
This commit is contained in:
parent
fe92758e53
commit
86a352ad1f
@ -375,25 +375,27 @@ implementation
|
||||
{ fix status }
|
||||
status.currentline:=current_filepos.line;
|
||||
status.currentcolumn:=current_filepos.column;
|
||||
module:=get_module(current_filepos.moduleindex);
|
||||
if assigned(module) and
|
||||
assigned(module.sourcefiles) and
|
||||
((module.unit_index<>lastmoduleidx) or
|
||||
(current_filepos.fileindex<>lastfileidx)) then
|
||||
begin
|
||||
{ update status record }
|
||||
status.currentmodule:=module.modulename^;
|
||||
status.currentmodulestate:=ModuleStateStr[module.state];
|
||||
status.currentsource:=module.sourcefiles.get_file_name(current_filepos.fileindex);
|
||||
status.currentsourcepath:=module.sourcefiles.get_file_path(current_filepos.fileindex);
|
||||
if (current_filepos.moduleindex <> lastmoduleidx) or
|
||||
(current_filepos.fileindex <> lastfileidx) then
|
||||
begin
|
||||
module:=get_module(current_filepos.moduleindex);
|
||||
if assigned(module) and assigned(module.sourcefiles) then
|
||||
begin
|
||||
{ update status record }
|
||||
status.currentmodule:=module.modulename^;
|
||||
status.currentmodulestate:=ModuleStateStr[module.state];
|
||||
status.currentsource:=module.sourcefiles.get_file_name(current_filepos.fileindex);
|
||||
status.currentsourcepath:=module.sourcefiles.get_file_path(current_filepos.fileindex);
|
||||
|
||||
{ update lastfileidx only if name known PM }
|
||||
if status.currentsource<>'' then
|
||||
lastfileidx:=current_filepos.fileindex
|
||||
else
|
||||
lastfileidx:=0;
|
||||
lastmoduleidx:=module.unit_index;
|
||||
end;
|
||||
{ update lastfileidx only if name known PM }
|
||||
if status.currentsource<>'' then
|
||||
lastfileidx:=current_filepos.fileindex
|
||||
else
|
||||
lastfileidx:=0;
|
||||
|
||||
lastmoduleidx:=module.unit_index;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user