Code cleanup

This commit is contained in:
Bjorn Winckler
2008-06-21 21:18:17 +02:00
parent 40056b05c3
commit d98996d31c
3 changed files with 8 additions and 13 deletions
-1
View File
@@ -30,7 +30,6 @@
- (MMVimView *)initWithFrame:(NSRect)frame vimController:(MMVimController *)c;
- (MMTextView *)textView;
- (NSMutableArray *)scrollbars;
- (void)cleanup;
- (NSSize)desiredSize;
+4 -9
View File
@@ -208,11 +208,6 @@ enum {
return textView;
}
- (NSMutableArray *)scrollbars
{
return scrollbars;
}
- (PSMTabBarControl *)tabBarControl
{
return tabBarControl;
@@ -374,7 +369,7 @@ enum {
[scroller setAction:@selector(scroll:)];
[self addSubview:scroller];
[[self scrollbars] addObject:scroller];
[scrollbars addObject:scroller];
[scroller release];
}
@@ -387,7 +382,7 @@ enum {
if (!scroller) return NO;
[scroller removeFromSuperview];
[[self scrollbars] removeObjectAtIndex:idx];
[scrollbars removeObjectAtIndex:idx];
// If a visible scroller was removed then the vim view must resize. This
// is handled by the window controller (the vim view never resizes itself).
@@ -719,9 +714,9 @@ enum {
- (MMScroller *)scrollbarForIdentifier:(long)ident index:(unsigned *)idx
{
unsigned i, count = [[self scrollbars] count];
unsigned i, count = [scrollbars count];
for (i = 0; i < count; ++i) {
MMScroller *scroller = [[self scrollbars] objectAtIndex:i];
MMScroller *scroller = [scrollbars objectAtIndex:i];
if ([scroller identifier] == ident) {
if (idx) *idx = i;
return scroller;
+4 -3
View File
@@ -289,9 +289,10 @@
//NSLog(@"setTextDimensionsWithRows:%d columns:%d live:%s", rows, cols,
// live ? "YES" : "NO");
// NOTE: This is the only place where the (rows,columns) of the vim view
// are modified. Setting these values have no immediate effect, the actual
// resizing of the view is done in processCommandQueueDidFinish.
// NOTE: The only place where the (rows,columns) of the vim view are
// modified is here and when entering/leaving full-screen. Setting these
// values have no immediate effect, the actual resizing of the view is done
// in processCommandQueueDidFinish.
//
// The 'live' flag indicates that this resize originated from a live
// resize; it may very well happen that the view is no longer in live