go-prompt
go-prompt copied to clipboard
Accidental scroll while CLI prompt runs prints unwanted characters
Bug reports
Open any go-prompt enabled CLI app, such as cloudmonkey (https://github.com/apache/cloudstack-cloudmonkey) or kube-prompt. Sometimes in the CLI, while typing accidentally touch or scroll up and down. I'm able to consistently reproduce this issue while using the CLI tools in prompt mode inside tmux.
Screenshot:

Expected Behavior
Such events should be ignored and not cause any kind of unwanted character outputs
Current Behavior and Steps to Reproduce
Steps to reproduce:
- Open tmux or any terminal multiplexer
- cd and run the cli binary
- use mouse to scroll up/down while in tmux, you'll see these characters
See screenshot above.
I tried to add keybindings for mouse events and page up/down, but still saw those errors.
Context
- Operating System: Ubuntu Linux 18.10 and 18.04
- Terminal Emulator: Guake, gnome terminal, tmux
- tag of go-prompt or commit revision: v0.2.3 (also tried latest master, still same issue)
/cc @c-bata please advise - thanks
Hmm... Just to be sure, could you tell me the version of tmux? I'll try to reproduce this.
@c-bata tmux version 2.6 and 2.7.
I've found the problem. But it requires many changes to fix this issue. Please give me a few days.
Thanks @c-bata
Any updates here?