Only set LINES and COLUMNS environment variables for external commands
commit1eaf34b03d2ed8b38cbb3a76086e4b79511554f1
authorJonas Fonseca <fonseca@diku.dk>
Sun, 4 Aug 2013 19:21:53 +0000 (4 15:21 -0400)
committerJonas Fonseca <fonseca@diku.dk>
Sun, 4 Aug 2013 19:21:53 +0000 (4 15:21 -0400)
tree86e5729e30b0381e0d7fbbd0387a9e91067fe76d
parentb5f566dd5f60287721e052f866966884915e05b4
Only set LINES and COLUMNS environment variables for external commands

Setting the LINES/COLUMNS environment variables to a constant number
breaks ncurses' getmaxyx() logic, so dynamic resizing doesn't work as
pointed out by Marcel Partap in a comment to the fix for issue #151
(https://github.com/jonas/tig/commit/f0ad1f74#commitcomment-3528715).

As a work-around, only set LINES/COLUMNS when forking Git processes. This
way diff stats will still use the whole terminal width and resizing works
as intended.

Fixes #109
io.c
io.h
tig.c