fix prompt width calculation