Fixed bug where activeEditor wasn't set to the correct editor when opening windows.