Loading ...
Sorry, an error occurred while loading the content.

[PATCH] add some comments

Expand Messages
  • Nicolas Weber
    ... src/MacVim/MMWindowController.m | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/MacVim/MMWindowController.m
    Message 1 of 4 , Oct 30, 2007
    • 0 Attachment
      ---
      src/MacVim/MMWindowController.m | 17 +++++++++++++++++
      1 files changed, 17 insertions(+), 0 deletions(-)

      diff --git a/src/MacVim/MMWindowController.m b/src/MacVim/MMWindowController.m
      index 4a1ac72..6cb4e55 100644
      --- a/src/MacVim/MMWindowController.m
      +++ b/src/MacVim/MMWindowController.m
      @@ -381,6 +381,11 @@ NSLog(@"res done");
      // TODO: Don't duplicate code from placeViews.

      if (!setupDone) return;
      +
      + // At the end of an resize, check if vim view size and number of
      + // columns / rows agree (the first is set while resizing, the second by
      + // messages sent from vim). If not, send a synchronous (!) message to vim
      + // to set columns / rows to the value belonging to the view size.

      // NOTE! It is assumed that the window has been resized so that it will
      // exactly fit the text storage (possibly after resizing it). If this is
      @@ -539,6 +544,17 @@ NSLog(@"resize\n");
      [vimController sendMessage:SetTextDimensionsMsgID data:data];
      }

      + // assume that the window size is right for the vim view. the real desired
      + // size of the vim view is calculated in liveResizeDidEnd .
      +// NSRect frame;
      +// frame.origin = NSMakePoint(0, 0);
      +// frame.size = contentSize;
      +// [vimView setFrame:frame];
      +
      + // alternatively, set max size of text storage
      + // XXX: flickers for some reason?
      + [[vimView textStorage] setMaxRows:desiredSize[0] columns:desiredSize[1]];
      +
      [self placeViews];
      }

      @@ -639,6 +655,7 @@ NSLog(@"resize\n");

      if (!setupDone) return;

      + // Get size of text view, adapt window size to it
      NSWindow *win = [self window];
      NSRect frame = [win frame];
      NSRect contentRect = [win contentRectForFrameRect:frame];
      --
      1.5.3.4


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.