vimSafe event handling improvements