joyent/node — pull request #2922 by TooTallNate (2012-03-13 07:02:36+00:00)
Title: tty → readline ansi/vt100 migration

This is the result of a discussion @piscisaureus, @isaacs and I were having. The overall goal here is to make `readline` more interoperable with other node Streams like say a `net.Socket` instance.

There's a lot going on here, I'll try to break it down:

* move `tty.setRawMode()` to `tty.ReadStream`'s prototype
* remove `tty.getWindowSize()` and `tty.setWindowSize()`, redundant/incomplete
* add a `tty.ReadStream#isRaw` flag (so `process.stdin.isRaw`). gets set when `setRawMode()` is called.
* remove use of `tty` module in `readline` module.
* move the "keypress" logic from tty → readline
* move `WriteStream#cursorTo` from tty → readline
* move `WriteStream#moveTo` from tty → readline
* move `WriteStream#clearLine` from tty → readline