Change summary
internal/tui/components/dialogs/commands/commands.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Detailed changes
@@ -119,7 +119,10 @@ func (c *commandDialogCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case tea.WindowSizeMsg:
c.wWidth = msg.Width
c.wHeight = msg.Height
- return c, c.commandList.SetSize(c.listWidth(), c.listHeight())
+ return c, tea.Batch(
+ c.SetCommandType(c.commandType),
+ c.commandList.SetSize(c.listWidth(), c.listHeight()),
+ )
case tea.KeyPressMsg:
switch {
case key.Matches(msg, c.keyMap.Select):
@@ -318,7 +321,6 @@ func (c *commandDialogCmp) defaultCommands() []Command {
})
}
}
-
// Only show toggle compact mode command if window width is larger than compact breakpoint (90)
if c.wWidth > 120 && c.sessionID != "" {
commands = append(commands, Command{