home *** CD-ROM | disk | FTP | other *** search
- To: brent@linux1.org
- In-Reply-To: <378A9080.B705578F@earthlink.net>
- CC: VIM-DEV <vim-dev@vim.org>
- Subject: patch 5.4o.3 (was: Second annoyance.)
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- ------------
-
- brent wrote:
-
- > agreed, but that's a lotta math to do everytime you think about
- > resizing the scrollbar :-\, so i just left my half-thought hack
- > in my source tree, but i'm pretty sure we should
- >
- > size -= STRLEN(p_sbr) + 1;
- >
- > if we have ':set number' (at least when SCRLL_PAST_END is not
- > defined).
-
- Hmm, when 'number' is set the horizontal scrollbar doesn't show the right
- thumb size. I'll make a patch for that. It uses curwin->w_p_nu though, not
- p_sbr. I suppose that was a mistake?
-
- Hmm, found another problem: Just after dragging, positioning the cursor with
- the mouse doesn't update the scrollbar. Only for Athena. The fix is simple.
-
- > hot, fresh, Vim -- compiled daily.
-
- Compiled hourly over here. Well, more often actually...
-
-
- Patch 5.4o.3
- Problem: The horizontal scrollbar was not sized correctly when 'number' is
- set and 'wrap' not set.
- Athena: Horizontal scrollbar wasn't updated when the cursor was
- positioned with a mouse click just after dragging.
- Solution: Subtract 8 from the size when 'number' set and 'wrap' not set.
- Reset gui.dragged_sb when a mouse click is received.
- Files: src/gui.c
-
-
- *** ../vim-5.4o/src/gui.c Sun Jul 11 20:10:34 1999
- --- src/gui.c Tue Jul 13 12:23:42 1999
- ***************
- *** 2001,2006 ****
- --- 2000,2013 ----
-
- prev_row = row;
- prev_col = col;
- +
- + /*
- + * We need to make sure this is cleared since Athena doesn't tell us when
- + * he is done dragging.
- + */
- + #ifdef USE_GUI_ATHENA
- + gui.dragged_sb = SBAR_NONE;
- + #endif
- }
-
- /*
- ***************
- *** 2686,2691 ****
- --- 2693,2707 ----
- #ifndef SCROLL_PAST_END
- max += Columns - 1;
- #endif
- + /* The line number isn't scrolled, thus there is less space when
- + * 'number' is set. */
- + if (curwin->w_p_nu)
- + {
- + size -= 8;
- + #ifndef SCROLL_PAST_END
- + max -= 8;
- + #endif
- + }
- }
-
- #ifndef SCROLL_PAST_END
-
- --
- hundred-and-one symptoms of being an internet addict:
- 75. You start wondering whether you could actually upgrade your brain
- with a Pentium Pro microprocessor 80. The upgrade works just fine.
-
- --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /
-