click-spinner icon indicating copy to clipboard operation
click-spinner copied to clipboard

Fix output in corner cases

Open nyancient opened this issue 10 months ago • 0 comments

This PR contains two separate bugfixes:

  1. beep shouldn't be written to stdout when redirected, and
  2. always erase the spinner on exit.

(1) is self-explanatory, but (2) might require some background. Currently, the spinner character is left on screen after the spinner exits if the next character written to stdout is a control character (newline, tab, etc.), but is erased if the next character written is printable. This inconsistent behavior looks like a bug to me.

nyancient avatar Aug 25 '23 20:08 nyancient