bpo-41373: IDLE: Fix saving files loaded with no newlines or mixed newlines (GH-21597)


Fixes regression in 3.8.4 and 3.9.0b4.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 0dd463c8a4269137ebed7cc29605c555030df94f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 files changed