Skip to content

[Bug] Occasionally unable to clear characters after popen on Windows #545

Closed

Description

@UlyssesZh

First call IO::popen and then call Reline::readline. On Windows, it occasionally (not always) trigger a bug. When the bug is triggerred, it spam a lot of characters while being unable to clear them. It is kind of hard to describe how the bug looks. Just see the video:
https://github.com/ruby/reline/assets/26196187/e904714f-c2c4-48e7-baa6-f3ff5a7a463e

The code used in the video:

# test.rb
require 'reline'
IO.popen 'ruby -e "puts %q{Hello, world!}"'
loop { p Reline.readline '> ' }
  • Ruby: 3.2.0
  • Reline: 0.3.4
  • OS: Windows 11 version 22H2 (in VirtualBox)
  • Terminal and shell: Windows Terminal, PowerShell

Activity

  1. rubyFeedback commented on May 30, 2023

    @rubyFeedback

    I think I ran into something similar some time ago. I did not report it because I had additional, perhaps other, problems. I test primarily on Linux and need to transfer data onto the windows machine on my left, which can be cumbersome hence why i don't use my windows machine that much.

  2. nobu commented on Jun 8, 2023

    @nobu
    Member

    Does it happen only on Windows Terminal, or also on Command Prompt?

  3. UlyssesZh commented on Jun 8, 2023

    @UlyssesZh
    Author

    Does it happen only on Windows Terminal, or also on Command Prompt?

    Yes, both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    WindowsbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions