For #5068, when autoindenting, only insert a tab if the cursor doesn't move due to CodeMirror's indentation