diff options
Diffstat (limited to 'cocoa/ScintillaView.mm')
-rw-r--r-- | cocoa/ScintillaView.mm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 174c5c256..64b5008c6 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -260,8 +260,8 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; - (NSRange) selectedRange { - int begin = [mOwner getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0]; - int end = [mOwner getGeneralProperty: SCI_GETSELECTIONEND parameter: 0]; + long begin = [mOwner getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0]; + long end = [mOwner getGeneralProperty: SCI_GETSELECTIONEND parameter: 0]; return NSMakeRange(begin, end - begin); } @@ -285,7 +285,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; else if ([aString isKindOfClass:[NSAttributedString class]]) newText = (NSString*) [aString string]; - int currentPosition = [mOwner getGeneralProperty: SCI_GETCURRENTPOS parameter: 0]; + long currentPosition = [mOwner getGeneralProperty: SCI_GETCURRENTPOS parameter: 0]; // Replace marked text if there is one. if (mMarkedTextRange.length > 0) @@ -655,7 +655,7 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; case IBNZoomChanged: { // Compute point increase/decrease based on default font size. - int fontSize = [self getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT]; + long fontSize = [self getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT]; int zoom = (int) (fontSize * (value - 1)); [self setGeneralProperty: SCI_SETZOOM value: zoom]; break; @@ -712,7 +712,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa if (scn->margin == 2) { // Click on the folder margin. Toggle the current line if possible. - int line = [editor getGeneralProperty: SCI_LINEFROMPOSITION parameter: scn->position]; + long line = [editor getGeneralProperty: SCI_LINEFROMPOSITION parameter: scn->position]; [editor setGeneralProperty: SCI_TOGGLEFOLD value: line]; } break; @@ -729,7 +729,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa { // A zoom change happend. Notify info bar if there is one. float zoom = [editor getGeneralProperty: SCI_GETZOOM parameter: 0]; - int fontSize = [editor getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT]; + long fontSize = [editor getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT]; float factor = (zoom / fontSize) + 1; [editor->mInfoBar notify: IBNZoomChanged message: nil location: NSZeroPoint value: factor]; break; @@ -1088,7 +1088,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa NSString *result = @""; char *buffer(0); - const int length = mBackend->WndProc(SCI_GETSELTEXT, 0, 0); + const long length = mBackend->WndProc(SCI_GETSELTEXT, 0, 0); if (length > 0) { buffer = new char[length + 1]; @@ -1121,7 +1121,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa NSString *result = @""; char *buffer(0); - const int length = mBackend->WndProc(SCI_GETLENGTH, 0, 0); + const long length = mBackend->WndProc(SCI_GETLENGTH, 0, 0); if (length > 0) { buffer = new char[length + 1]; @@ -1338,7 +1338,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa */ - (NSColor*) getColorProperty: (int) property parameter: (long) parameter { - int color = mBackend->WndProc(property, parameter, 0); + long color = mBackend->WndProc(property, parameter, 0); float red = (color & 0xFF) / 255.0; float green = ((color >> 8) & 0xFF) / 255.0; float blue = ((color >> 16) & 0xFF) / 255.0; @@ -1493,8 +1493,8 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa { // The current position is where we start searching. That is either the end of the current // (main) selection or the caret position. That ensures we do proper "search next" too. - int currentPosition = [self getGeneralProperty: SCI_GETCURRENTPOS parameter: 0]; - int length = [self getGeneralProperty: SCI_GETTEXTLENGTH parameter: 0]; + long currentPosition = [self getGeneralProperty: SCI_GETCURRENTPOS parameter: 0]; + long length = [self getGeneralProperty: SCI_GETTEXTLENGTH parameter: 0]; int searchFlags= 0; if (matchCase) @@ -1506,7 +1506,7 @@ static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wPa ttf.chrg.cpMin = currentPosition; ttf.chrg.cpMax = length; ttf.lpstrText = (char*) [searchText UTF8String]; - int position = mBackend->WndProc(SCI_FINDTEXT, searchFlags, (sptr_t) &ttf); + long position = mBackend->WndProc(SCI_FINDTEXT, searchFlags, (sptr_t) &ttf); if (position < 0 && wrap) { |