home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: patch 5.4o.6
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- ------------
-
- Patch 5.4o.6
- Problem: GTK version generated scrollbar events when setting a scrollbar to
- a specific position. This can make scrolling happen at the wrong
- moment. Example: When there is a horizontal scrollbar, 'nowrap'
- is set and using <BS> in Insert mode to join a line to the
- previous one. (Dalecki)
- Solution: Don't pass on scrollbar events when setting the scrollbar
- ourselves.
- Files: src/gui_gtk.c
-
-
- *** ../vim-5.4o/src/gui_gtk.c Sun Jul 11 20:10:49 1999
- --- src/gui_gtk.c Tue Jul 13 17:37:24 1999
- ***************
- *** 663,668 ****
- --- 655,666 ----
- * Scrollbar stuff.
- */
-
- + #ifdef GTK_HAVE_FEATURES_1_1_0
- + /* This variable is set when we asked for a scrollbar change ourselves. Don't
- + * pass scrollbar changes on to the GUI code then. */
- + static int did_ask_for_change = FALSE;
- + #endif
- +
- void
- gui_mch_set_scrollbar_thumb(GuiScrollbar * sb, int val, int size, int max)
- {
- ***************
- *** 675,681 ****
- --- 673,681 ----
- adjustment->page_increment = (size > 2 ? size - 2 : 1);
- adjustment->step_increment = 1;
- #ifdef GTK_HAVE_FEATURES_1_1_0
- + did_ask_for_change = TRUE;
- gtk_adjustment_changed(adjustment);
- + did_ask_for_change = FALSE;
- #endif
- }
- }
- ***************
- *** 697,702 ****
- --- 697,707 ----
- GuiScrollbar *sb;
- long value;
-
- + #ifdef GTK_HAVE_FEATURES_1_1_0
- + if (did_ask_for_change)
- + return;
- + #endif
- +
- sb = gui_find_scrollbar((long) data);
- value = adjustment->value;
-
-
- --
- hundred-and-one symptoms of being an internet addict:
- 82. AT&T names you Customer of the Month for the third consecutive time.
-
- --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /
-