summaryrefslogtreecommitdiffstats
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-02-18 22:14:51 +0000
committerBram Moolenaar <Bram@vim.org>2006-02-18 22:14:51 +0000
commit7e8fd63682801d6cdd7f31972540c21f148b289e (patch)
treecbc44d7f10ef0a87454582fbff40fe930bacc6b6 /src/gui.c
parent997fb4ba696625e27e17c00d5033b20411aa45a3 (diff)
updated for version 7.0201v7.0201
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gui.c b/src/gui.c
index 4f18988caa..0047a26a32 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3598,14 +3598,9 @@ gui_update_scrollbars(force)
* have both a left and right scrollbar, and we drag one of them, we still
* need to update the other one.
*/
- if ( (gui.dragged_sb == SBAR_LEFT
- || gui.dragged_sb == SBAR_RIGHT)
- && (!gui.which_scrollbars[SBAR_LEFT]
- || !gui.which_scrollbars[SBAR_RIGHT])
- && !force)
- return;
-
- if (!force && (gui.dragged_sb == SBAR_LEFT || gui.dragged_sb == SBAR_RIGHT))
+ if (!force && (gui.dragged_sb == SBAR_LEFT || gui.dragged_sb == SBAR_RIGHT)
+ && gui.which_scrollbars[SBAR_LEFT]
+ && gui.which_scrollbars[SBAR_RIGHT])
{
/*
* If we have two scrollbars and one of them is being dragged, just
@@ -3618,7 +3613,6 @@ gui_update_scrollbars(force)
gui.dragged_wp->w_scrollbars[0].value,
gui.dragged_wp->w_scrollbars[0].size,
gui.dragged_wp->w_scrollbars[0].max);
- return;
}
/* avoid that moving components around generates events */
@@ -3628,6 +3622,12 @@ gui_update_scrollbars(force)
{
if (wp->w_buffer == NULL) /* just in case */
continue;
+ /* Skip a scrollbar that is being dragged. */
+ if (!force && (gui.dragged_sb == SBAR_LEFT
+ || gui.dragged_sb == SBAR_RIGHT)
+ && gui.dragged_wp == wp)
+ continue;
+
#ifdef SCROLL_PAST_END
max = wp->w_buffer->b_ml.ml_line_count - 1;
#else
@@ -3759,11 +3759,12 @@ gui_update_scrollbars(force)
#endif
sb->size = size;
sb->max = max;
- if (gui.which_scrollbars[SBAR_LEFT] && gui.dragged_sb != SBAR_LEFT)
+ if (gui.which_scrollbars[SBAR_LEFT]
+ && (gui.dragged_sb != SBAR_LEFT || gui.dragged_wp != wp))
gui_mch_set_scrollbar_thumb(&wp->w_scrollbars[SBAR_LEFT],
val, size, max);
if (gui.which_scrollbars[SBAR_RIGHT]
- && gui.dragged_sb != SBAR_RIGHT)
+ && (gui.dragged_sb != SBAR_RIGHT || gui.dragged_wp != wp))
gui_mch_set_scrollbar_thumb(&wp->w_scrollbars[SBAR_RIGHT],
val, size, max);
}