go-prompt icon indicating copy to clipboard operation
go-prompt copied to clipboard

Accidental scroll while CLI prompt runs prints unwanted characters

Open rohityadavcloud opened this issue 6 years ago • 6 comments

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:

  • 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)

rohityadavcloud avatar Dec 15 '18 21:12 rohityadavcloud

/cc @c-bata please advise - thanks

rohityadavcloud avatar Dec 15 '18 21:12 rohityadavcloud

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

c-bata avatar Dec 16 '18 05:12 c-bata

@c-bata tmux version 2.6 and 2.7.

rohityadavcloud avatar Dec 16 '18 05:12 rohityadavcloud

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

c-bata avatar Dec 16 '18 17:12 c-bata

Thanks @c-bata

rohityadavcloud avatar Dec 16 '18 18:12 rohityadavcloud

Any updates here?

JesterOrNot avatar Feb 27 '20 19:02 JesterOrNot