From d41b4be99c8d77cce1fd86c11f53e68a753399ea Mon Sep 17 00:00:00 2001 From: Dan Malec Date: Sat, 25 Mar 2023 14:19:54 -0400 Subject: [PATCH] ISSUE-72: On OSX, disable smart quotes in the editor. --- TextEditor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TextEditor.cpp b/TextEditor.cpp index 2c520c75..cae2b804 100644 --- a/TextEditor.cpp +++ b/TextEditor.cpp @@ -42,6 +42,14 @@ wxTextCtrl(f, a, s, p, sz, b) prevFind=0; this->font = font; SetFont(font); + + // As of wxWidgets 3.1.1, there is support for selectively disabling OSX smart substitutions on text widgets. + // Smart substitution, particularly of quotes, causes bugs when editing code. +#ifdef __WXOSX__ +#if wxCHECK_VERSION(3, 1, 1) + OSXDisableAllSmartSubstitutions(); +#endif // wxCHECK_VERSION +#endif // __WXOSX__ } void TextEditor::SetFont(wxFont font){