Have you had a look at float_window_toggle. After you call Edit you could call _MDIChildIsFloating to check if it's a floating window.
if (_mdi.p_child._no_child_windows()==0) {
_mdi.p_child._set_focus();
}
_command void float_window_toggle() name_info(','VSARG2_ICON|VSARG2_READ_ONLY|VSARG2_REQUIRES_MDI_EDITORCTL|VSARG2_LINEHEX|VSARG2_REQUIRES_MINMAXRESTOREICONIZE_WINDOW|VSARG2_NOEXIT_SCROLL)
{
if ( !(_default_option(VSOPTION_APIFLAGS) & VSAPIFLAG_MDI_TABGROUPS) ) {
// tab groups not supported;
return;
}
int wid=p_window_id;
if (_MDIChildIsFloating(wid)) {
_MDIChildFloatWindow(wid,false);
wid._set_focus();
} else {
_MDIChildFloatWindow(wid,true);
}
}