@@ -240,8 +240,8 @@ func commandsRadioView(sty *styles.Styles, selected CommandType, hasUserCmds boo
240240// Draw implements [Dialog].
241241func (c *Commands) Draw(scr uv.Screen, area uv.Rectangle) *tea.Cursor {
242242 t := c.com.Styles
243− width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()))
244− height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()))
243+ width := max(0, min(defaultCommandsDialogMaxWidth, area.Dx()-t.Dialog.View.GetHorizontalBorderSize()))
244+ height := max(0, min(defaultCommandsDialogMaxHeight, area.Dy()-t.Dialog.View.GetVerticalBorderSize()))
245245 if area.Dx() != c.windowWidth && c.selected == SystemCommands {
246246 c.windowWidth = area.Dx()
247247 // since some items in the list depend on width (e.g. toggle sidebar command),