avoid stripping whitespaces on caret lines on document save (IDEA-80056)