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

816scroll.diff

Expand Messages
  • Rain Dog
    Dec 8, 2002
    • 0 Attachment
      Attached is a patch to gui_mac.c (current CVS version) that addresses
      two issues with scroll bars. First, it fixes a bug (a null pointer
      dereference) that can crash Vim when a horizontal scroll bar is used.
      Second, for Carbon builds of Vim, it enables "live scrolling", so that
      your document scrolls as you drag the thumb in the scroll bar.

      I've tested this patch with Vim for OSX 10.2.2 only, but I wouldn't
      expect it to cause problems for any other version. (Live scrolling
      doesn't actually require Carbon, only the Appearance Manager, which
      dates back to OS8.)

      ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------

      *** gui_mac.c Sat Nov 30 12:21:04 2002
      --- gui_mac.c Sun Dec 8 17:54:50 2002
      ***************
      *** 1560,1566 ****
      else /* Bottom scrollbar */
      {
      sb_info = sb;
      ! page = W_WIDTH(sb->wp) - 5;
      }

      switch (partCode)
      --- 1560,1566 ----
      else /* Bottom scrollbar */
      {
      sb_info = sb;
      ! page = W_WIDTH(curwin) - 5;
      }

      switch (partCode)
      ***************
      *** 4302,4308 ****
      --- 4302,4312 ----
      0, /* current*/
      0, /* top */
      0, /* bottom */
      + #ifdef USE_CARBONIZED
      + kControlScrollBarLiveProc,
      + #else
      scrollBarProc,
      + #endif
      (long) sb->ident);
      #ifdef DEBUG_MAC_SB
      printf ("create_sb (%x) %x\n",sb->id, orient);
    • Show all 3 messages in this topic