sup-heliotrope/ncursesw-ruby

getch acts weirdly (cursor keeps moving, like it's running inside a loop)

sam113101 opened this issue · 2 comments

getch acts weirdly (cursor keeps moving, like it's running inside a loop)

Same problem here. After a call to getch the cursor starts to constantly move down line by line.

Here is a program to reproduce the behaviour:

require "ncursesw"

Ncurses.initscr
Ncurses.addstr("Cursor starts to move down!")
Ncurses.getch # Wait for a keypress to quit
Ncurses.endwin

System:

  • Linux Mint 17 (64-bit)
  • Ruby 2.0.0-p481
  • gnome-terminal 3.6.2

adding Ncurses.cbreak
after Ncurses.initscr

will stop this from happening