comparison mercurial/crecord.py @ 51379:7d85c6e59dd1

crecord: add skipfolded param to previtem This just simplifies the API a bit so it matches `nextitem` and I can handle both nextitem and previtem symmetrically.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 14 Feb 2024 22:40:47 -0500
parents 18c8c18993f0
children e68908edebba
comparison
equal deleted inserted replaced
51378:82131be5258e 51379:7d85c6e59dd1
159 return self.parentitem().parentitem().nextsibling() 159 return self.parentitem().parentitem().nextsibling()
160 160
161 except AttributeError: # parent and/or grandparent was None 161 except AttributeError: # parent and/or grandparent was None
162 return None 162 return None
163 163
164 def previtem(self): 164 def previtem(self, skipfolded=None):
165 """ 165 """
166 Try to return the previous item closest to this item, regardless of 166 Try to return the previous item closest to this item, regardless of
167 item's type (header, hunk, or hunkline). 167 item's type (header, hunk, or hunkline).
168 168
169 If it is not possible to get the previous item, return None. 169 If it is not possible to get the previous item, return None.