Use wxSTC::GetTextRaw rather than converting utf-8 -> wxString -> utf-8

This commit is contained in:
Thomas Goyne 2012-10-30 05:50:41 -07:00
parent 9088ae994c
commit bd78692148
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ int ScintillaTextCtrl::GetUnicodePosition(int pos) {
/// @brief Reverse unicode-compatible position
int ScintillaTextCtrl::GetReverseUnicodePosition(int pos) {
wxCharBuffer buffer = GetText().utf8_str();
wxCharBuffer buffer = GetTextRaw();
// Limit position to it
if (pos > (signed)buffer.length()) pos = buffer.length();

View File

@ -281,7 +281,7 @@ void SubsTextEditCtrl::SetStyles() {
void SubsTextEditCtrl::UpdateStyle() {
StartStyling(0,255);
std::string text = STD_STR(GetText());
std::string text = GetTextRaw();
if (!OPT_GET("Subtitle/Highlight/Syntax")->GetBool()) {
SetStyling(text.size(), 0);