summaryrefslogtreecommitdiff
path: root/src/gui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-20 21:47:49 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-20 21:47:49 +0000
commit371d5403d0dc6411f6f17c5b472c1cfcac6789e4 (patch)
tree08066b3d097303df50e1b67fffc33d1d68bcb0d4 /src/gui.c
parentceaf7b8b66764b4a99526c715886d80397ce81dd (diff)
downloadvim-git-371d5403d0dc6411f6f17c5b472c1cfcac6789e4.tar.gz
updated for version 7.0230
Diffstat (limited to 'src/gui.c')
-rw-r--r--src/gui.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/gui.c b/src/gui.c
index 07d7788a3..c2942ee48 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -2802,6 +2802,7 @@ button_set:
case OP_PENDING:
case NORMAL: checkfor = MOUSE_NORMAL; break;
case VISUAL: checkfor = MOUSE_VISUAL; break;
+ case SELECTMODE: checkfor = MOUSE_VISUAL; break;
case REPLACE:
case REPLACE+LANGMAP:
#ifdef FEAT_VREPLACE
@@ -3077,7 +3078,9 @@ gui_menu_cb(menu)
}
#endif
-static int prev_which_scrollbars[3] = {-1, -1, -1};
+#ifndef FEAT_WINDOWS
+static int prev_which_scrollbars[3];
+#endif
/*
* Set which components are present.
@@ -3211,7 +3214,13 @@ gui_init_which_components(oldval)
for (i = 0; i < 3; i++)
{
- if (gui.which_scrollbars[i] != prev_which_scrollbars[i])
+ if (gui.which_scrollbars[i] !=
+#ifdef FEAT_WINDOWS
+ curtab->tp_prev_which_scrollbars[i]
+#else
+ prev_which_scrollbars[i]
+#endif
+ )
{
if (i == SBAR_BOTTOM)
gui_mch_enable_scrollbar(&gui.bottom_sbar,
@@ -3227,7 +3236,12 @@ gui_init_which_components(oldval)
if (gui.which_scrollbars[i])
fix_size = TRUE;
}
- prev_which_scrollbars[i] = gui.which_scrollbars[i];
+#ifdef FEAT_WINDOWS
+ curtab->tp_prev_which_scrollbars[i]
+#else
+ prev_which_scrollbars[i]
+#endif
+ = gui.which_scrollbars[i];
}
#ifdef FEAT_MENU
@@ -3479,7 +3493,7 @@ gui_remove_scrollbars()
gui_do_scrollbar(wp, i, FALSE);
}
}
- prev_which_scrollbars[i] = -1;
+ curtab->tp_prev_which_scrollbars[i] = -1;
}
}
#endif
@@ -3673,6 +3687,16 @@ gui_drag_scrollbar(sb, value, still_dragging)
/* Value may have been changed for closed fold. */
sb->value = sb->wp->w_topline - 1;
# endif
+
+ /* When dragging one scrollbar and there is another one at the other
+ * side move the thumb of that one too. */
+ if (gui.which_scrollbars[SBAR_RIGHT] && gui.which_scrollbars[SBAR_LEFT])
+ gui_mch_set_scrollbar_thumb(
+ &sb->wp->w_scrollbars[
+ sb == &sb->wp->w_scrollbars[SBAR_RIGHT]
+ ? SBAR_LEFT : SBAR_RIGHT],
+ sb->value, sb->size, sb->max);
+
#else
bytes[0] = CSI;
bytes[1] = KS_VER_SCROLLBAR;