Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

tty.getWindowSize() always returning 80 - not [width, height] #2160

Closed
dylang opened this issue Nov 21, 2011 · 2 comments
Closed

tty.getWindowSize() always returning 80 - not [width, height] #2160

dylang opened this issue Nov 21, 2011 · 2 comments

Comments

@dylang
Copy link

dylang commented Nov 21, 2011

Issue
tty.getWindowSize() is always returning 80.

Expected
tty.getWindowSize() returns array [width, height].

Seen in Node 0.6.2 on Mac/OSX using iTerm 2. This function works as expected in Node 0.4.12.

|master ✗| ~/projects/changelog $ node --version
v0.6.2
|master ✗| ~/projects/changelog $ node
> var tty = require('tty')
undefined
> tty.getWindowSize()
80
> 
@ry
Copy link

ry commented Nov 22, 2011

use process.stdout.getWindowSize() now

@ry ry closed this as completed Nov 22, 2011
@dylang
Copy link
Author

dylang commented Nov 22, 2011

Should we update the docs? I can create a pull request.

felixge pushed a commit to felixge/node that referenced this issue Nov 22, 2011
alexkwolfe pushed a commit to alexkwolfe/node that referenced this issue Dec 23, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants