Open GunnlaugurCalvi opened 4 years ago
It is due to the function Write() in Screenbuf.go assumes input to be only one line. So if your input in the terminal has more than one line, it only rewrites the previous one line. I have my own hack of screenbuf that calculates the height on my own. The reason being hack is some special characters in prompt make us hard to get actual prompt length. (the actual length might be smaller, showing in your terminal)
You could try my fork. I fixed it in some way. Since it is a bit hacky, I won't create pr for now. https://github.com/tigergraph/promptui
See https://github.com/manifoldco/promptui/issues/92 for another alternate solution
If Label is a pretty long string then on every keyboard stroke the text get repeated