When it runs into the promptui function and sometimes if there's even not a selection it'll just clear the entire screen. This happens only on windows. I'm running 7 Home Premium and the default cmd.
1st case is normal
2nd case is with it showing the prompt and clearing the entire buffer beforehand
3rd case is normal again
4th case is when it doesn't show a prompt but still clears the screen/buffer
var result string
if len(searchresults) > 1 {
prompt := promptui.Select{
Label: "Pick one of the following",
Items: searchresults, // []string containing entries
}
_, finalresult, err := prompt.Run()
result = finalresult
if err != nil {
fmt.Printf("Error %v\n", err)
return
}
} else {
return
}
When it runs into the promptui function and sometimes if there's even not a selection it'll just clear the entire screen. This happens only on windows. I'm running 7 Home Premium and the default cmd.
Example
1st case is normal 2nd case is with it showing the prompt and clearing the entire buffer beforehand 3rd case is normal again 4th case is when it doesn't show a prompt but still clears the screen/buffer