]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/stc.cpp.in
no changes, just fixed a typo in an error message
[wxWidgets.git] / src / stc / stc.cpp.in
index 072d1c1cc225bab59c833885ee5728739ada83c4..b20db627fa1e1c5a8b9f26c915311a0eef8a3ae5 100644 (file)
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#if wxUSE_STC
+
+#include "wx/stc/stc.h"
+#include "wx/stc/private.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/wx.h"
+#endif // WX_PRECOMP
+
 #include <ctype.h>
 
-#include "wx/wx.h"
 #include "wx/tokenzr.h"
 #include "wx/mstream.h"
 #include "wx/image.h"
 #include "wx/file.h"
 
-#include "wx/stc/stc.h"
 #include "ScintillaWX.h"
 
 //----------------------------------------------------------------------
@@ -158,9 +172,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
                               long style,
                               const wxString& name)
 {
-#ifdef __WXMAC__
     style |= wxVSCROLL | wxHSCROLL;
-#endif
     if (!wxControl::Create(parent, id, pos, size,
                            style | wxWANTS_CHARS | wxCLIP_CHILDREN,
                            wxDefaultValidator, name))
@@ -756,6 +768,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
 #endif
     bool skip = ((ctrl || alt) && ! (ctrl && alt));
 
+#if wxUSE_UNICODE
+    // apparently if we don't do this, Unicode keys pressed after non-char
+    // ASCII ones (e.g. Enter, Tab) are not taken into account (patch 1615989)
+    if (m_lastKeyDownConsumed && evt.GetUnicodeKey() > 255)
+        m_lastKeyDownConsumed = false;
+#endif
+
     if (!m_lastKeyDownConsumed && !skip) {
 #if wxUSE_UNICODE
         int key = evt.GetUnicodeKey();
@@ -1055,11 +1074,4 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event):
 //----------------------------------------------------------------------
 //----------------------------------------------------------------------
 
-
-
-
-
-
-
-
-
+#endif // wxUSE_STC