diff --git a/src/ui/windows/TogglDesktop/TogglDesktop/AutoCompletion/AutoCompleteController.cs b/src/ui/windows/TogglDesktop/TogglDesktop/AutoCompletion/AutoCompleteController.cs index adadf95ecf..f8fb57eb54 100644 --- a/src/ui/windows/TogglDesktop/TogglDesktop/AutoCompletion/AutoCompleteController.cs +++ b/src/ui/windows/TogglDesktop/TogglDesktop/AutoCompletion/AutoCompleteController.cs @@ -151,6 +151,7 @@ public void FillList(ListBox listBox, Action selectWithClick, }); noProjectAdded = true; } + lastType = (int)it.Item.Type; } // Add client item if needed @@ -193,7 +194,6 @@ public void FillList(ListBox listBox, Action selectWithClick, WorkspaceName = it.Item.WorkspaceName, Index = count }); - lastType = (int)it.Item.Type; } } visibleItems = items; @@ -246,6 +246,7 @@ public void Complete(string input) Category = categories[(int)item.Type], Type = -1 }); + lastType = (int)item.Type; } // Add client item if needed @@ -282,7 +283,6 @@ public void Complete(string input) } filteredItems.Add(item); - lastType = (int)item.Type; lastProjectLabel = item.ProjectLabel; } }