Bug fix. Ensure that current->cols is initialized even when both stdin/stdout are redirected (which prevents the raw mode from getting set).
Bug fix. Redid the fallback code for getting the terminal width via vt100 control sequences to not change the visible cursor location.
Instead of
- go far right
- query location
we now do
(1) query location
(2) go far right
(3) query location again
(4) move left to the original location as reported by (1).

Only if (1) succeeds and (3) fails will the visible cursor location change (moving to far left).
Placed the code to request cursor location and parse the response into its own helper function.

The old way of doing it left the cursor at far right, and could mess up an outer shell prompt.