mercurial/ui.py
changeset 12689 c52c629ce19e
parent 12665 cf24b6b5517c
child 12764 ad2506f097d3
equal deleted inserted replaced
12688:8c034a825cfe 12689:c52c629ce19e
   400                 # usually those are non-interactive
   400                 # usually those are non-interactive
   401                 return False
   401                 return False
   402 
   402 
   403         return i
   403         return i
   404 
   404 
       
   405     def termwidth(self):
       
   406         '''how wide is the terminal in columns?
       
   407         '''
       
   408         if 'COLUMNS' in os.environ:
       
   409             try:
       
   410                 return int(os.environ['COLUMNS'])
       
   411             except ValueError:
       
   412                 pass
       
   413         return util.termwidth()
       
   414 
   405     def formatted(self):
   415     def formatted(self):
   406         '''should formatted output be used?
   416         '''should formatted output be used?
   407 
   417 
   408         It is often desirable to format the output to suite the output medium.
   418         It is often desirable to format the output to suite the output medium.
   409         Examples of this are truncating long lines or colorizing messages.
   419         Examples of this are truncating long lines or colorizing messages.