forked from mia/Aegisub
Use wxSTC::GetTextRaw rather than converting utf-8 -> wxString -> utf-8
This commit is contained in:
parent
9088ae994c
commit
bd78692148
2 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue