REPRODUCING: 1. Copy and paste the following patch into Kate: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=effadce6c756247ea8bae32dc13bb3e6f464f0eb 2. Observe that at the end of it there's a space 3. Save 4. Observe that the space was removed RESULT The patch is no longer valid, and the user won't notice why. SOLUTION: At katerc "Keep Extra Spaces" shall be "true" by default.
Sorry, but that default will lead to stray spaces in files per default for everybody, that is no good idea. If it doesn't fit your workflow you can turn it off.