don't use document.getText to detect encoding
IDEA-117327 Add a setting to switch off autopopup completion item selection by Enter