(edit_dialog_command_execute): when switch to another window, do not select it twice.