From 33454ef8d2fc3035fae577b1467e97839fb5c93f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 29 Nov 2021 14:55:48 +0100 Subject: [PATCH] Ensure the end of line char is '\n' in wxStyledTextCtrl when using SCINTILLA_TRICKS. --- common/scintilla_tricks.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/scintilla_tricks.cpp b/common/scintilla_tricks.cpp index 2df2804e6f..189795c566 100644 --- a/common/scintilla_tricks.cpp +++ b/common/scintilla_tricks.cpp @@ -41,6 +41,9 @@ SCINTILLA_TRICKS::SCINTILLA_TRICKS( wxStyledTextCtrl* aScintilla, const wxString m_singleLine( aSingleLine ), m_returnCallback( aReturnCallback ) { + // Always use LF as eol char, regardless the platform + m_te->SetEOLMode( wxSTC_EOL_LF ); + // A hack which causes Scintilla to auto-size the text editor canvas // See: https://github.com/jacobslusser/ScintillaNET/issues/216 m_te->SetScrollWidth( 1 );