From f325ff7b2eb37a6ad3787da4291887687ece4b4d Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Tue, 22 Jan 2019 08:33:21 +0100 Subject: [PATCH] fix #415 - Clicking a Todo item does not position the cursor --- src/u_todolist.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/u_todolist.pas b/src/u_todolist.pas index 3620d809..b9de760a 100644 --- a/src/u_todolist.pas +++ b/src/u_todolist.pas @@ -329,14 +329,15 @@ end; procedure TTodoListWidget.docFocused(document: TDexedMemo); begin - if fdoc.isNil then + if document.isNil then exit; + // issue 412 : // 1. the file name is in a first time "" // 2. document assigned the fDoc var // 3. once the filename loaded it exited on next focused // because diff for filename was not tested. - if (document = fDoc) and (fDoc.fileName = document.fileName) then + if fDoc.isNotNil and (document = fDoc) and (fDoc.fileName = document.fileName) then exit; fDoc := document; if Visible and fAutoRefresh then