update change linewise behavior to more closely match vim
When operating linewise with "change" commands, cc, S, cip etc, whitespace at the beginning of the line is preserved in vim. This implements that.
The main version of this file is still the one in cm5 so we should try to make all changes there.
But there is one bigger problem here: this changes the behavior of c to ignore auto indentation, but does not remove the complex code invoking it. Do you know if this new behavior is the preferred behavior that we should apply in cm5 too, or is this merely a temporary workaround for the cm6 bug?
This commit definitely more closely resembles actual vim behavior, and is not meant to be a substitute for cm5 auto indentation.
The CodeMirror.commands.newlineAndIndent(cm); call seems necessary to keep anyway in order to reprint the line after the call to cm.replaceRange ... , is that what you meant by the complex indentation code? If there is another function that does what newlineAndIndent does, with the Indent part, that sounds reasonable.
closing in favor of https://github.com/replit/codemirror-vim/pull/116