From d98996d31cf4826967b303d9ba7bee3cc96e030f Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Sat, 21 Jun 2008 21:18:17 +0200 Subject: [PATCH] Code cleanup --- src/MacVim/MMVimView.h | 1 - src/MacVim/MMVimView.m | 13 ++++--------- src/MacVim/MMWindowController.m | 7 ++++--- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/MacVim/MMVimView.h b/src/MacVim/MMVimView.h index 676e5ab815..a87ec98de1 100644 --- a/src/MacVim/MMVimView.h +++ b/src/MacVim/MMVimView.h @@ -30,7 +30,6 @@ - (MMVimView *)initWithFrame:(NSRect)frame vimController:(MMVimController *)c; - (MMTextView *)textView; -- (NSMutableArray *)scrollbars; - (void)cleanup; - (NSSize)desiredSize; diff --git a/src/MacVim/MMVimView.m b/src/MacVim/MMVimView.m index f43c6c4bc5..743af3aec1 100644 --- a/src/MacVim/MMVimView.m +++ b/src/MacVim/MMVimView.m @@ -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; diff --git a/src/MacVim/MMWindowController.m b/src/MacVim/MMWindowController.m index 476ecd48fe..4aab9aa004 100644 --- a/src/MacVim/MMWindowController.m +++ b/src/MacVim/MMWindowController.m @@ -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