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.6 < prev    next >
Encoding:
Internet Message Format  |  1999-07-12  |  1.9 KB

  1. To: vim-dev@vim.org
  2. Subject: patch 5.4o.6
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. ------------
  6.  
  7. Patch 5.4o.6
  8. Problem:    GTK version generated scrollbar events when setting a scrollbar to
  9.             a specific position.  This can make scrolling happen at the wrong
  10.             moment.  Example: When there is a horizontal scrollbar, 'nowrap' 
  11.             is set and using <BS> in Insert mode to join a line to the 
  12.             previous one.  (Dalecki)
  13. Solution:   Don't pass on scrollbar events when setting the scrollbar
  14.             ourselves.
  15. Files:      src/gui_gtk.c
  16.  
  17.  
  18. *** ../vim-5.4o/src/gui_gtk.c    Sun Jul 11 20:10:49 1999
  19. --- src/gui_gtk.c    Tue Jul 13 17:37:24 1999
  20. ***************
  21. *** 663,668 ****
  22. --- 655,666 ----
  23.    * Scrollbar stuff.
  24.    */
  25.   
  26. + #ifdef GTK_HAVE_FEATURES_1_1_0
  27. + /* This variable is set when we asked for a scrollbar change ourselves.  Don't
  28. +  * pass scrollbar changes on to the GUI code then. */
  29. + static int did_ask_for_change = FALSE;
  30. + #endif
  31.   void
  32.   gui_mch_set_scrollbar_thumb(GuiScrollbar * sb, int val, int size, int max)
  33.   {
  34. ***************
  35. *** 675,681 ****
  36. --- 673,681 ----
  37.       adjustment->page_increment = (size > 2 ? size - 2 : 1);
  38.       adjustment->step_increment = 1;
  39.   #ifdef GTK_HAVE_FEATURES_1_1_0
  40. +     did_ask_for_change = TRUE;
  41.       gtk_adjustment_changed(adjustment);
  42. +     did_ask_for_change = FALSE;
  43.   #endif
  44.       }
  45.   }
  46. ***************
  47. *** 697,702 ****
  48. --- 697,707 ----
  49.       GuiScrollbar *sb;
  50.       long value;
  51.   
  52. + #ifdef GTK_HAVE_FEATURES_1_1_0
  53. +     if (did_ask_for_change)
  54. +     return;
  55. + #endif
  56.       sb = gui_find_scrollbar((long) data);
  57.       value = adjustment->value;
  58.   
  59.  
  60. --
  61. hundred-and-one symptoms of being an internet addict:
  62. 82. AT&T names you Customer of the Month for the third consecutive time.
  63.  
  64. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
  65.   \ \    www.vim.org/iccf      www.moolenaar.net       www.vim.org    / /
  66.