diff options
Diffstat (limited to 'cocoa/ScintillaView.mm')
| -rw-r--r-- | cocoa/ScintillaView.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 96d212138..945fadcbf 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -668,7 +668,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor) NSRange posRangeCurrent = mOwner.backend->PositionsFromCharacters(NSMakeRange(replacementRange.location, 0)); // Note: Scintilla internally works almost always with bytes instead chars, so we need to take // this into account when determining selection ranges and such. - int lengthInserted = mOwner.backend->InsertText(newText); + ptrdiff_t lengthInserted = mOwner.backend->InsertText(newText); posRangeCurrent.length = lengthInserted; mMarkedTextRange = mOwner.backend->CharactersFromPositions(posRangeCurrent); // Mark the just inserted text. Keep the marked range for later reset. @@ -1054,7 +1054,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context */ - (id) accessibilityValue { const sptr_t length = [mOwner message: SCI_GETLENGTH]; - return mOwner.backend->RangeTextAsString(NSMakeRange(0,static_cast<int>(length))); + return mOwner.backend->RangeTextAsString(NSMakeRange(0, length)); } //-------------------------------------------------------------------------------------------------- @@ -1063,7 +1063,7 @@ sourceOperationMaskForDraggingContext: (NSDraggingContext) context * NSAccessibility : Line of the caret. */ - (NSInteger) accessibilityInsertionPointLineNumber { - const int caret = static_cast<int>([mOwner message: SCI_GETCURRENTPOS]); + const Sci::Position caret = [mOwner message: SCI_GETCURRENTPOS]; const NSRange rangeCharactersCaret = mOwner.backend->CharactersFromPositions(NSMakeRange(caret, 0)); return mOwner.backend->VisibleLineForIndex(rangeCharactersCaret.location); } |
