I tend to frequently open a text file from the terminal with a command like so:
gedit filename.txt
However, the behaviour is inconsistent; sometimes, the focus will leave the terminal and will not return until I have closed the file. Other times, the terminal will maintain a prompt, as if I had run:
gedit filename.txt &
Why this discrepancy?