Fix window width calculation when $lua returns newlines