fixed suggestion list printing out multiple times when list had more than 3 elements

This commit is contained in:
2025-09-23 22:54:13 +02:00
parent 9548a81255
commit 5b55672a08
2 changed files with 4 additions and 1 deletions

BIN
shell

Binary file not shown.

View File

@@ -473,6 +473,7 @@ void clear_menu() {
fflush(stdout);
menu_start_line = 0;
max_menu_lines = 0; // Reset after clearing is complete
}
}
// this is a test
@@ -488,7 +489,9 @@ void display_menu(const char *prompt_buffer, const char *buffer, int position) {
}
// First, clear any existing menu
if (max_menu_lines > 0) {
clear_menu();
}
// Save current cursor position (should be at end of input)
printf("\033[s");