Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion archinstall/tui/curses_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,15 @@ def edit(self, default_text: str | None = None) -> None:
self._edit_win.erase()

if default_text is not None and len(default_text) > 0:
self._edit_win.addstr(0, 0, default_text)
# Get the window width to avoid overflow
_, max_x = self._edit_win.getmaxyx()
# Truncate text to fit within window width
display_text = default_text[:max_x]
try:
self._edit_win.addstr(0, 0, display_text)
except curses.error:
# If addstr still fails (edge case), just skip displaying default text
pass

# if this gets initialized multiple times it will be an overlay
# and ENTER has to be pressed multiple times to accept
Expand Down