Open dmartin35 opened 3 years ago
I have added a runtime stack trace , when the https://github.com/AlecAivazis/survey/blob/c79c4a988cde2621cf87a59265233ed7e9e0b63e/terminal/cursor.go#L49 function is called
runtime/debug.Stack(0x24, 0x0, 0x0)
/usr/local/Cellar/go/1.15.3/libexec/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
/usr/local/Cellar/go/1.15.3/libexec/src/runtime/debug/stack.go:16 +0x25
github.com/AlecAivazis/survey/v2/terminal.(*Cursor).PreviousLine(0xc0001e57e0, 0x1)
/Users/dmartin/go/src/github.com/AlecAivazis/survey/terminal/cursor.go:58 +0x157
github.com/AlecAivazis/survey/v2.(*Renderer).resetPrompt(0xc0001d4000, 0x1)
/Users/dmartin/go/src/github.com/AlecAivazis/survey/renderer.go:115 +0x205
github.com/AlecAivazis/survey/v2.(*Renderer).Render(0xc0001d4000, 0x118978c, 0x493, 0x1171f00, 0xc0001b1040, 0x0, 0x0)
/Users/dmartin/go/src/github.com/AlecAivazis/survey/renderer.go:75 +0xa8
github.com/AlecAivazis/survey/v2.(*Input).OnChange(0xc0001d4000, 0xc000000073, 0xc0001d6048, 0x0, 0x0, 0x0)
/Users/dmartin/go/src/github.com/AlecAivazis/survey/input.go:119 +0x235
github.com/AlecAivazis/survey/v2.(*Input).Prompt(0xc0001d4000, 0xc0001d6048, 0x0, 0x0, 0x0, 0x0)
/Users/dmartin/go/src/github.com/AlecAivazis/survey/input.go:169 +0x2fa
github.com/AlecAivazis/survey/v2.Ask(0xc0001e5eb0, 0x1, 0x1, 0x114faa0, 0xc000188430, 0x0, 0x0, 0x0, 0x0, 0x118a290)
/Users/dmartin/go/src/github.com/AlecAivazis/survey/survey.go:295 +0x55e
github.com/AlecAivazis/survey/v2.AskOne(0x11b3120, 0xc0001d4000, 0x114faa0, 0xc000188430, 0x0, 0x0, 0x0, 0x1005dc5, 0xc00006c058)
/Users/dmartin/go/src/github.com/AlecAivazis/survey/survey.go:238 +0x12d
main.main()
don't know if that could help for investigation
When prompting for a answer, if the response contains 80+ characters, the previous line in the terminal disappear / is removed
What operating system and terminal are you using? seen on mac os x with default terminal and vscode terminal
An example that showcases the bug.
What did you expect to see?
What did you see instead?