_tty_width() will return zero when redo is run inside an emacs shell

This commit is contained in:
Oscar Bonilla 2010-12-16 11:46:55 -08:00 committed by Avery Pennarun
commit 0105b33483

View file

@ -60,7 +60,7 @@ def _tty_width():
except (IOError, ImportError): except (IOError, ImportError):
return _atoi(os.environ.get('WIDTH')) or 70 return _atoi(os.environ.get('WIDTH')) or 70
(ysize,xsize,ypix,xpix) = struct.unpack('HHHH', s) (ysize,xsize,ypix,xpix) = struct.unpack('HHHH', s)
return xsize return xsize or 70
class Options: class Options: