eeschema: extra blank line in files when saving with ERC markers
Description
eeschema writes out an extra blank line after the lib_symbols section if you have ERCs on a page.
Steps to reproduce
- Create a new schematic with some random IC on a page and don't hook it up.
- Save, and make a backup copy of the kicad_sch file.
- Perform ERC. You should get a bunch of markers. Save.
- Diff the kicad_sch with the one you backed up. The only difference should be an extra blank line in the middle.
- Open the ERC dialog again and delete markers. Save.
- Diff again; the blank line is gone.
KiCad Version
Application: KiCad Schematic Editor
Version: 6.0.4-6f826c9f35~116~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.13.0-39-generic x86_64, 64 bit, Little endian, wxGTK, xubuntu, x11
Build Info:
Date: Mar 21 2022 17:21:29
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OCC: 7.5.2
Curl: 7.81.0
ngspice: 31
Compiler: GCC 9.4.0 with C++ ABI 1013
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON