We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39e65a0 commit 99220d7Copy full SHA for 99220d7
1 file changed
src/format.py
@@ -174,8 +174,9 @@ def updateDecoratedMatch(self, maxLen=None):
174
# decorated match and glue them together with our
175
# truncation decorator
176
spaceAllowed = maxLen - len(self.TRUNCATE_DECORATOR)
177
- beginMatch = plainText[0:(spaceAllowed / 2)]
178
- endMatch = plainText[-(spaceAllowed / 2):]
+ midPoint = int(spaceAllowed / 2)
+ beginMatch = plainText[0:midPoint]
179
+ endMatch = plainText[-midPoint:len(plainText)]
180
plainText = beginMatch + self.TRUNCATE_DECORATOR + endMatch
181
182
self.decoratedMatch = FormattedText(
0 commit comments