comparison mercurial/templatekw.py @ 33850:84a3e04e35b5

templatekw: rename termwidth() per convention
author Yuya Nishihara <yuya@tcha.org>
date Wed, 16 Aug 2017 13:57:19 +0900
parents 40739aef97f7
children 7827fbbd0b06
comparison
equal deleted inserted replaced
33849:3ae2eaecb49e 33850:84a3e04e35b5
758 """ 758 """
759 for name, func in registrarobj._table.iteritems(): 759 for name, func in registrarobj._table.iteritems():
760 keywords[name] = func 760 keywords[name] = func
761 761
762 @templatekeyword('termwidth') 762 @templatekeyword('termwidth')
763 def termwidth(repo, ctx, templ, **args): 763 def showtermwidth(repo, ctx, templ, **args):
764 """Integer. The width of the current terminal.""" 764 """Integer. The width of the current terminal."""
765 return repo.ui.termwidth() 765 return repo.ui.termwidth()
766 766
767 @templatekeyword('troubles') 767 @templatekeyword('troubles')
768 def showtroubles(repo, **args): 768 def showtroubles(repo, **args):