mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Use 64-bit: numeric type fixes
Unfortunately a printf precision specifier (‘%.*s’) can not come with a width specifier so we have to cast to int. The width specifier ‘t’ is used for ptrdiff_t. The int → NSInteger change fixed a bug with popup menu positioning, but there was no associated warning or error. It's possible there are more such bugs that we haven't found yet!
This commit is contained in:
committed by
Allan Odgaard
parent
a79c9d0377
commit
d4ce498f60
@@ -29,7 +29,7 @@
|
||||
[[textView textStorage] setAttributedString:[[[NSAttributedString alloc] initWithString:[NSString stringWithCxxString:text::to_hex(first, last)] attributes:@{ NSFontAttributeName : [NSFont userFixedPitchFontOfSize:12] }] autorelease]];
|
||||
[textView setEditable:NO];
|
||||
|
||||
int lines = oak::cap(5, (last - first) / 16, 20);
|
||||
int lines = oak::cap(5, (int)((last - first) / 16), 20);
|
||||
NSSize size = self.view.frame.size;
|
||||
[self.view setFrameSize:NSMakeSize(size.width, size.height - 300 + 16*lines + 1)];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user