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

Re: Scrollbars and vertically split windows [patch]

Expand Messages
  • Bram Moolenaar
    ... I see this too. It s because jumping to another window doesn t cause a redraw. I minimized the calls to update the scrollbars, it was happening too often
    Message 1 of 2 , Apr 6, 2001
    • 0 Attachment
      Julian Kinraid wrote:

      > ./vim -g -u NONE -U NONE -c ":vnew" gui.c
      >
      > If you switch between the vertically split windows (with the mouse or
      > Ctrl-W), the scrollbar doesn't change to reflect the current window. It
      > looks as though the change at the bottom of gui_write() since vim60z
      > causes this. Is it just me?

      I see this too. It's because jumping to another window doesn't cause a
      redraw. I minimized the calls to update the scrollbars, it was happening too
      often (e.g., when converting to HTML nothing would be redrawn but you could
      see the scrollbars being updated).

      This patch should fix it:

      *** gui.c.orig Thu Apr 5 20:48:53 2001
      --- gui.c Fri Apr 6 10:30:39 2001
      ***************
      *** 1313,1318 ****
      --- 1313,1319 ----
      int force_cursor = FALSE; /* force cursor update */
      #endif
      int force_scrollbar = FALSE;
      + static win_t *old_curwin = NULL;

      /* #define DEBUG_GUI_WRITE */
      #ifdef DEBUG_GUI_WRITE
      ***************
      *** 1487,1494 ****
      /* Don't update cursor when ScreenLines[] is invalid (busy scrolling). */
      if (can_update_cursor && force_cursor)
      gui_update_cursor(force_cursor, TRUE);
      ! if (force_scrollbar)
      gui_update_scrollbars(force_scrollbar);

      /*
      * We need to make sure this is cleared since Athena doesn't tell us when
      --- 1488,1499 ----
      /* Don't update cursor when ScreenLines[] is invalid (busy scrolling). */
      if (can_update_cursor && force_cursor)
      gui_update_cursor(force_cursor, TRUE);
      !
      ! /* Update the scrollbars after clearing the screen or when switched
      ! * to another window. */
      ! if (force_scrollbar || old_curwin != curwin)
      gui_update_scrollbars(force_scrollbar);
      + old_curwin = curwin;

      /*
      * We need to make sure this is cleared since Athena doesn't tell us when

      --
      hundred-and-one symptoms of being an internet addict:
      45. You buy a Captain Kirk chair with a built-in keyboard and mouse.

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      ((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
      \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
    Your message has been successfully submitted and would be delivered to recipients shortly.