diff --git a/src/u_symlist.pas b/src/u_symlist.pas index 5134b124..3010662f 100644 --- a/src/u_symlist.pas +++ b/src/u_symlist.pas @@ -573,7 +573,8 @@ procedure TSymbolListWidget.docClosing(document: TDexedMemo); begin if fDoc <> document then exit; - + if fToolProc.Running then + fToolProc.Terminate(0); fDoc := nil; clearTree; updateVisibleCat; diff --git a/src/u_todolist.pas b/src/u_todolist.pas index 035648b1..21a3b1ef 100644 --- a/src/u_todolist.pas +++ b/src/u_todolist.pas @@ -347,7 +347,8 @@ begin exit; fDoc := nil; if Visible and fAutoRefresh then - callToolProcess; + clearTodoList; + killToolProcess(); end; {$ENDREGION} @@ -399,7 +400,7 @@ begin exit(tcFile); if (fProj <> nil) and fDoc.isNil then exit(tcProject); - // + if fProj.isSource(fDoc.fileName) then exit(tcProject) else @@ -410,7 +411,7 @@ procedure TTodoListWidget.killToolProcess; begin if fToolProc.isNil then exit; - // + fToolProc.Terminate(0); fToolProc.Free; fToolProc := nil;