fixing issue with ido, added after macro from @jvalentini
added a check for when the editor is loaded in GUI mode