Saving of large files (>20000 lines) is not possible.
Analysis:
The issue is related to the size_t wxFile::Write(const void*, size_t) member function, which doesn't force to write the complete passed buffer. However, the current implementation casts the returned size_t to bool and doesn't check, if the complete buffer was written.
A more straightforward solution would be to use the std::ofstream with the ios_base::binary open mode flag and write the the editor contents converted to a std::string as a stream (this will also ensure that the encoding is ANSI).
Implementation:
The fix was implemented as proposed by the analysis. Implementation tests were passed successfully.
Documentation:
The fix was documented in the changes log. Further documentation not needed.
Tests:
The fix was tested with a file of 31501 lines. No deviation detected. Bug fix implemented successfully.
Anonymous
Diff:
Diff:
Diff:
Diff: