TODO: I would be nicer if we could set win at file opening to the current open window, but I'll implement this later.