pager: set an attribute on ui indicating that a pager is active
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 06 Feb 2015 12:07:56 -0800
changeset 24066 afdf5f6ab37a
parent 24065 d8837ad682dd
child 24067 0baf41e02a4d
pager: set an attribute on ui indicating that a pager is active A subsequent patch will teach the color extension to do different things depending on whether a pager is active. This patch leaves a breadcrumb on the ui instance to allow it do that that.
hgext/pager.py
--- a/hgext/pager.py	Fri Feb 06 12:07:32 2015 -0800
+++ b/hgext/pager.py	Fri Feb 06 12:07:56 2015 -0800
@@ -149,6 +149,8 @@
                     usepager = True
                     break
 
+        setattr(ui, 'pageractive', usepager)
+
         if usepager:
             ui.setconfig('ui', 'formatted', ui.formatted(), 'pager')
             ui.setconfig('ui', 'interactive', False, 'pager')