Skip to content

Commit 060e6ea

Browse files
IAmTomahawkxZomatree
authored andcommitted
fix: prevent new space from appearing if buffer is depleted
1 parent 2dabb0d commit 060e6ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

revolt/ext/commands/view.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ def next_char(self) -> str:
1616

1717
def get_rest(self) -> str:
1818
if self.should_undo:
19-
return f"{self.temp} {''.join(self.value)}"
19+
return f"{self.temp} {''.join(self.value)}".rstrip()
20+
# prevent a new space appearing at end if the buffer is depleted
2021

2122
return "".join(self.value)
2223

0 commit comments

Comments
 (0)