Resizing the console destroys the last line of output! 😲

Problem description:
Resizing (using the draggable bar) or moving the console tab/window to a different location in the workspace removes the last line of output if there is no “\n” printed at the end. Is replit intentionally designed this way or is it glitch? Please comment if you’ve also seen this bug.

print("foo") no bug
print("foo", end = "") bug
Seems to also be present in other coding languages
cout << "foo"; bug
cout << "foo" << endl; no bug

Expected behavior:
Resizing/moving the console does not destroy the last line of output when there is no “\n” printed at the end.

Actual behavior:
Resizing/moving the console does destroy the last line of output when there is no “\n” printed at the end.

Workaround (maybe):
Add a trailing newline to all output.

Steps to reproduce:

  1. Run this code in a repl:

Python:

print("foo", end="")

C++:

#include <iostream>
using namespace std;
int main() {
  cout << "foo";
}
  1. Resize (using the draggable bar) or move the console tab/window to a different location in the workspace.

Browser:
Chrome

1 Like

I am unable to repo this on FF dev edition 109.0b3 or Chrome 108.0.5359.125 both on Windows 11

Probably a problem that pertains to you only. If it bugs you that much, I suppose you could try to restart your OS and try again. If that doesn’t work, try to move the console before running? No clue on how to help, but these are some suggestions.