changeset 24066:afdf5f6ab37a

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 06 Feb 2015 12:07:56 -0800
parents d8837ad682dd
children 0baf41e02a4d
files hgext/pager.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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')