aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaView.mm
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r--cocoa/ScintillaView.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 5025fe209..174c5c256 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -301,10 +301,10 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI";
// Note: Scintilla internally works almost always with bytes instead chars, so we need to take
// this into account when determining selection ranges and such.
std::string raw_text = [newText UTF8String];
- mOwner.backend->InsertText(newText);
+ int lengthInserted = mOwner.backend->InsertText(newText);
mMarkedTextRange.location = currentPosition;
- mMarkedTextRange.length = raw_text.size();
+ mMarkedTextRange.length = lengthInserted;
// Mark the just inserted text. Keep the marked range for later reset.
[mOwner setGeneralProperty: SCI_SETINDICATORCURRENT value: INPUT_INDICATOR];