sabotage-linux / netbsd-curses

libcurses and dependencies taken from netbsd and brought into a portable shape (at least to musl or glibc)
Other
147 stars 14 forks source link

`tput cols` always prints "80" #26

Closed ddevault closed 7 years ago

ddevault commented 7 years ago

Using urxvt, also with TERM=xterm or with xterm proper.

rofl0r commented 7 years ago

thanks for the heads up. investigating.

rofl0r commented 7 years ago

i merged some changes, afaict this commit 541187d5b60e8747477088223acc960e69cebe71 should "fix" it. i put "fix" into quotes, because according to roy smarples this is non-portable behaviour, according to POSIX it's required to return the initial cols value, and stty size should be used instead. he added it anyway though.

ddevault commented 7 years ago

Thanks. I've been using stty size but figured I would mention the discrepancy with ncurses.

rofl0r commented 7 years ago

Thanks. I'm sure there's more than one script out there that relied on ncurses' behaviour, so it's good we've changed it.