promptui icon indicating copy to clipboard operation
promptui copied to clipboard

Promptui clears the entire screen/buffer in windows.

Open emmggi opened this issue 6 years ago • 0 comments

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

	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
	}

emmggi avatar Jul 28 '19 10:07 emmggi