home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unreleased / patches / old / 5.4o.3 < prev    next >
Encoding:
Internet Message Format  |  1999-07-12  |  2.4 KB

  1. To: brent@linux1.org
  2. In-Reply-To: <378A9080.B705578F@earthlink.net>
  3. CC: VIM-DEV <vim-dev@vim.org>
  4. Subject: patch 5.4o.3 (was: Second annoyance.)
  5. Fcc: outbox
  6. From: Bram Moolenaar <Bram@moolenaar.net>
  7. ------------
  8.  
  9. brent wrote:
  10.  
  11. > agreed, but that's a lotta math to do everytime you think about
  12. > resizing the scrollbar :-\, so i just left my half-thought hack
  13. > in my source tree, but i'm pretty sure we should 
  14. > size -=  STRLEN(p_sbr) + 1; 
  15. > if we have ':set number' (at least when SCRLL_PAST_END is not
  16. > defined).
  17.  
  18. Hmm, when 'number' is set the horizontal scrollbar doesn't show the right
  19. thumb size.  I'll make a patch for that.  It uses curwin->w_p_nu though, not
  20. p_sbr.  I suppose that was a mistake?
  21.  
  22. Hmm, found another problem: Just after dragging, positioning the cursor with
  23. the mouse doesn't update the scrollbar.  Only for Athena.  The fix is simple.
  24.  
  25. > hot, fresh, Vim -- compiled daily.
  26.  
  27. Compiled hourly over here.  Well, more often actually...
  28.  
  29.  
  30. Patch 5.4o.3
  31. Problem:    The horizontal scrollbar was not sized correctly when 'number' is
  32.             set and 'wrap' not set.
  33.             Athena: Horizontal scrollbar wasn't updated when the cursor was
  34.             positioned with a mouse click just after dragging.
  35. Solution:   Subtract 8 from the size when 'number' set and 'wrap' not set.
  36.             Reset gui.dragged_sb when a mouse click is received.
  37. Files:      src/gui.c
  38.  
  39.  
  40. *** ../vim-5.4o/src/gui.c    Sun Jul 11 20:10:34 1999
  41. --- src/gui.c    Tue Jul 13 12:23:42 1999
  42. ***************
  43. *** 2001,2006 ****
  44. --- 2000,2013 ----
  45.   
  46.       prev_row = row;
  47.       prev_col = col;
  48. +     /*
  49. +      * We need to make sure this is cleared since Athena doesn't tell us when
  50. +      * he is done dragging.
  51. +      */
  52. + #ifdef USE_GUI_ATHENA
  53. +     gui.dragged_sb = SBAR_NONE;
  54. + #endif
  55.   }
  56.   
  57.   /*
  58. ***************
  59. *** 2686,2691 ****
  60. --- 2693,2707 ----
  61.   #ifndef SCROLL_PAST_END
  62.       max += Columns - 1;
  63.   #endif
  64. +     /* The line number isn't scrolled, thus there is less space when
  65. +      * 'number' is set. */
  66. +     if (curwin->w_p_nu)
  67. +     {
  68. +         size -= 8;
  69. + #ifndef SCROLL_PAST_END
  70. +         max -= 8;
  71. + #endif
  72. +     }
  73.       }
  74.   
  75.   #ifndef SCROLL_PAST_END
  76.  
  77. --
  78. hundred-and-one symptoms of being an internet addict:
  79. 75. You start wondering whether you could actually upgrade your brain
  80.     with a Pentium Pro microprocessor 80.  The upgrade works just fine.
  81.  
  82. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  83.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  84.