# HG changeset patch # User lbessard # Date 1232381351 -3600 # Node ID bf1facfd1d36e4b3a2b6d1cdeced6ef84953dddb # Parent fd1f6ae26d4fc59baa2d68eb21a3fd9304641c65 Bug on TextViewer when no block types defined fixed diff -r fd1f6ae26d4f -r bf1facfd1d36 TextViewer.py --- a/TextViewer.py Mon Jan 19 17:08:17 2009 +0100 +++ b/TextViewer.py Mon Jan 19 17:09:11 2009 +0100 @@ -417,7 +417,8 @@ last_styled_pos = current_pos state = SPACE if char == ']': - struct_elements = self.StructElementsStack.pop(-1) + if len(self.StructElementsStack) > 0: + struct_elements = self.StructElementsStack.pop() word = char state = WORD current_pos += 1