update editor selection only if it has focus

fix Issue #65
assumption - if there is no focus on editor, there is no selection change