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

scroll.diff

Expand Messages
  • Rain Dog
    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
    Message 1 of 3 , 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);
    • Benji Fisher
      ... [patch snipped] This works for me on OSX 10.2.3. I will post the patch and an updated binary soon. TODO: I have not yet tried to reproduce the crash.
      Message 2 of 3 , Feb 2, 2003
      • 0 Attachment
        Rain Dog wrote:
        > 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.)
        >
        [patch snipped]

        This works for me on OSX 10.2.3. I will post the patch and an
        updated binary soon. TODO: I have not yet tried to reproduce the crash.

        --Benji Fisher
      Your message has been successfully submitted and would be delivered to recipients shortly.