Skip to content
Extraits de code Groupes Projets
Valider d9b56bad rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

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

parent 99b5c265
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -52,7 +52,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();
......
......@@ -283,7 +283,7 @@ void SubsTextEditCtrl::SetStyles() {
void SubsTextEditCtrl::UpdateStyle() {
StartStyling(0,255);
std::string text = STD_STR(GetText());
std::string text = GetTextRaw().data();
if (!OPT_GET("Subtitle/Highlight/Syntax")->GetBool()) {
SetStyling(text.size(), 0);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter