More closer mimic Emacs behavior in transposeChars command

Issue #2507