c-bata / go-prompt

Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
https://godoc.org/github.com/c-bata/go-prompt
MIT License
5.27k stars 346 forks source link

Accidental scroll while CLI prompt runs prints unwanted characters #119

Open rohityadavcloud opened 5 years ago

rohityadavcloud commented 5 years ago

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:

screenshot from 2018-12-16 02-49-02

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:

See screenshot above.

I tried to add keybindings for mouse events and page up/down, but still saw those errors.

Context

rohityadavcloud commented 5 years ago

/cc @c-bata please advise - thanks

c-bata commented 5 years ago

Hmm... Just to be sure, could you tell me the version of tmux? I'll try to reproduce this.

rohityadavcloud commented 5 years ago

@c-bata tmux version 2.6 and 2.7.

c-bata commented 5 years ago

I've found the problem. But it requires many changes to fix this issue. Please give me a few days.

rohityadavcloud commented 5 years ago

Thanks @c-bata

JesterOrNot commented 4 years ago

Any updates here?