popup should be activated only if editor.insert is called, otherwise it will break vim mode