X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fd656d50366b26450b1535c384c84d53e1449f5..8f2ee25db4652f96f28bc8f8370bebc974e533ff:/src/stc/stc.cpp diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index b3b3cd2765..248ceb73e5 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -178,6 +178,8 @@ void wxStyledTextCtrl::Create(wxWindow *parent, SetCodePage(wxSTC_CP_UTF8); #endif + // Reduces flicker on GTK+/X11 + SetBackgroundStyle(wxBG_STYLE_CUSTOM); SetBestFittingSize(size); } @@ -2408,6 +2410,12 @@ void wxStyledTextCtrl::Allocate(int bytes) { SendMsg(2446, bytes, 0); } +// Find the position of a column on a line taking into account tabs and +// multi-byte characters. If beyond end of line, return line end position. +int wxStyledTextCtrl::FindColumn(int line, int column) { + return SendMsg(2456, line, column); +} + // Start notifying the container of all key presses and commands. void wxStyledTextCtrl::StartRecord() { SendMsg(3001, 0, 0); @@ -2776,9 +2784,9 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) { // be a function key or etc., the platforms appear to always give us a // small value in this case) then fallback to the ascii key code but // don't do anything for function keys or etc. - if (key <= 255) { + if (key <= 127) { key = evt.GetKeyCode(); - keyOk = (key <= 255); + keyOk = (key <= 127); } if (keyOk) { m_swx->DoAddChar(key);