Skip to content

Commit

Permalink
fix: delete_line misbehaved.
Browse files Browse the repository at this point in the history
  • Loading branch information
TerryGeng committed Feb 5, 2024
1 parent 240fda2 commit 150d2af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion termqt/terminal_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ def delete_line(self, lines=1):

self._buffer_display_offset = min(self._buffer_display_offset - lines, 0)

for y in range(min(cur_pos.y - lines + 1, 0), cur_pos.y + 1):
for y in reversed(range(min(cur_pos.y - lines + 1, 0), cur_pos.y + 1)):
del buf[y]

if self._buffer_display_offset > len(self._buffer):
Expand Down

0 comments on commit 150d2af

Please sign in to comment.