Multiselect deletes lines when changing selection
dnlmlr opened this issue · comments
Description
When moving the selection in a multiselect, the whole selection block moves upwards in the terminal, eating everything above. This is not always happening and I can't quite figure out what exactly triggers it, although I think it has something to do with the screen buffer size of the terminal.
The code I'm using in the example is pretty straight forward (the projects implement Display
and produce the text seen in the GIF):
dialoguer::MultiSelect::new()
.items(&projects)
.with_prompt("Select projects to clean")
.report(false)
.defaults(&preselected_projects)
.interact_opt() else {
println!("Nothing selected");
return;
};
Environment
- rust version: 1.65
- dialoguer version: 0.10.2
- OS: windows 10
- terminal emulator: Windows Terminal & Conhost (default powershell)
- shell: git-bash, powershell