Prevent select-all hack from confusing readInput when there is a selection

Issue #2496
Another fix around the select-all hack

Issue #2495
Merge branch 'master' of https://github.com/marijnh/CodeMirror