ruby_jard icon indicating copy to clipboard operation
ruby_jard copied to clipboard

[BUG] Breaks when triggering a variable with long text

Open nachoal opened this issue 3 years ago • 3 comments

Describe the bug Input is locked and jard can't be used after exploring a long value stored in a variable (when getting the interactive vi like scroll for long text)

To Reproduce Steps to reproduce the behavior:

  1. Add jard on any place where you have a longer than terminal screen text (a long hash for example)
  2. Run jard and explore the variable contents
  3. When the output is returned the screen freezes and the input is broken (can't write anything except quit)

Expected behavior Able to scroll the variable contents on the screen by pressing enter or quit the interactive scrolling using q

Screenshots image

Environment (please complete the following information):

  • OS: Mac OS Catalina
  • Terminal Emulator iTerm 2
  • Output when you run tput colors in your terminal: 256
  • Output when you run echo $TERM in your terminal: xterm-256color
  • Output when you run stty:
speed 38400 baud;
lflags: echoe echok echoke echonl echoctl pendin
iflags: istrip -imaxbel iutf8 ignbrk
oflags: -oxtabs
cflags: cs8 -parenb

  • Do you use tmux/screen or similar tty multiplexer? no

nachoal avatar Sep 18 '20 19:09 nachoal

By the way, this gem is great and the way you display the variable contents and arrange the information is really useful, thanks for putting in the time to build it and share!

nachoal avatar Sep 18 '20 19:09 nachoal

Hi @nachoal, let me confirm some information to help debugging.

When the output is returned the screen freezes and the input is broken (can't write anything except quit)

So, it means that you type quit, and press enter. Then the process exists right? Could you help me a little bit by running this check on your terminal emulator:

ruby -e '100.times { |index| puts "Line #{index}"}' | less -R -X

Does it works as expected, or the behavior is the same? If it's still broken, could you give me the output of less --version in your terminal emulator?

0x2c7 avatar Sep 19 '20 03:09 0x2c7

  1. Hyper terminal, zsh, oh-my-zsh, OSX Same bug. Though, the only way I can exit process is with ctrl+c. Typing quit and pressing enter does nothing.

Works as expected:

ruby -e '100.times { |index| puts "Line #{index}"}' | less -R -X
  1. OSX default terminal, zsh, oh-my-zsh, OSX No issues.

OskarsEzerins avatar Nov 12 '20 18:11 OskarsEzerins