NotePlan
NotePlan
Dec 1

Race conditions when typing and autocompleting links

When typing links to existing pages the results are inconsistent depending on my timing, how long the link picker takes to appear, and how relevant its results are at the moment I hit enter. For example, "[[Cass ENTER ENTER" intended to create a link to a specific existing page, can have these various effects: 1. creates the link and one new line (as intended); 2. creates just [[Cass and two newlines, THEN opens the link picker and sometimes bring up a relevant result; 3. opens the link picker as if I had only typed "[[" leading to an incorrect selection; 4. a combination of these resulting in correct link embedded within an erroneous one or multiple correct links one within the other. This means that if I'm moving fast I'm often making errors, and if I'm careful, well, I'm moving slowly which is not the point. I have a video of some of these cases but Canny won't let me upload it here.
CompletedCompleted

Dec 18, 2021

Marking it complete for now. I have found and fixed the timing in the code. We can reopen it if it still persists in the next update v3.3

Dec 6, 2021

Thanks for sharing this. I had to put a small delay into the auto-complete, so it doesn’t cause performance issues. Hence quickly typing and hitting enter is not doing anything or selecting the wrong result. The delay is very small though.

Dec 6, 2021

Eduard Metzger: I wonder if the delay is in the right place?

Dec 18, 2021

Jon Plummer: I have tweaked the delay for the next update. I could indeed find a problem.