henrikpersson / rsub

Use rmate with Sublime Text.
458 stars 70 forks source link

Preserve the exact file size given by the client. #14

Closed tornewuff closed 11 years ago

tornewuff commented 11 years ago

Rather than using strip() which deletes all trailing newlines in the file, just truncate the received buffer to exactly the number of bytes specified by the client, ensuring that files which originally did not end with a newline continue not to have a newline, but files which ended with one or more still have the same number. This fixes issue #11.