gedit
is probably smart enough to run all its windows in a single process. So when you type gedit
again, it "connects" to the running process, which then opens a new window.
If you want to close some windows, try wmctrl
.
wmctrl -l
lists windows. wmctrl -c <win_id>
allows you to close a window (as if you clicked the close button).