Fixed bug caused by '\0' in username that broke formatting.

This commit is contained in:
Jakob Friedl
2025-09-25 20:22:56 +02:00
parent 14771a4b50
commit 166cadcb56
3 changed files with 3 additions and 7 deletions

View File

@@ -26,7 +26,6 @@ proc interact(component: SessionsTableComponent) =
while ImGuiSelectionBasicStorage_GetNextSelectedItem(component.selection, addr it, addr row):
let agent = component.agents[cast[int](row)]
# Create a new console window
if not component.consoles[].hasKey(agent.agentId):
component.consoles[][agent.agentId] = Console(agent)
@@ -35,9 +34,6 @@ proc interact(component: SessionsTableComponent) =
else:
igSetWindowFocus_Str(fmt"[{agent.agentId}] {agent.username}@{agent.hostname}")
# TODO: Clear selection properly
ImGuiSelectionBasicStorage_Clear(component.selection)
proc draw*(component: SessionsTableComponent, showComponent: ptr bool) =
igBegin(component.title, showComponent, 0)
defer: igEnd()