Skip to content

Commit 361f7b1

Browse files
author
wonjaeL
committed
Fix bug
1 parent d080220 commit 361f7b1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

log_viewer/utils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ def readlines_reverse(qfile, exclude=None):
9191
line = ""
9292
else:
9393
line += next_char
94-
char_len = len(next_char.encode())
95-
position -= char_len or 1
94+
95+
char_length = len(next_char.encode())
96+
if char_length > 1 and len(line) > 3 and len(set(line[-4:-1])) == 1:
97+
line = line[:-3] + next_char
98+
position -= char_length or 1
99+
96100
yield line[::-1]
97101

98102

0 commit comments

Comments
 (0)