Mercurial > vim
comparison src/gui.c @ 788:b5aed52a4881
updated for version 7.0230
author | vimboss |
---|---|
date | Mon, 20 Mar 2006 21:47:49 +0000 |
parents | c0f1b710ce07 |
children | a1a08851eac8 |
comparison
equal
deleted
inserted
replaced
787:1a44839049ae | 788:b5aed52a4881 |
---|---|
2800 { | 2800 { |
2801 case NORMAL_BUSY: | 2801 case NORMAL_BUSY: |
2802 case OP_PENDING: | 2802 case OP_PENDING: |
2803 case NORMAL: checkfor = MOUSE_NORMAL; break; | 2803 case NORMAL: checkfor = MOUSE_NORMAL; break; |
2804 case VISUAL: checkfor = MOUSE_VISUAL; break; | 2804 case VISUAL: checkfor = MOUSE_VISUAL; break; |
2805 case SELECTMODE: checkfor = MOUSE_VISUAL; break; | |
2805 case REPLACE: | 2806 case REPLACE: |
2806 case REPLACE+LANGMAP: | 2807 case REPLACE+LANGMAP: |
2807 #ifdef FEAT_VREPLACE | 2808 #ifdef FEAT_VREPLACE |
2808 case VREPLACE: | 2809 case VREPLACE: |
2809 case VREPLACE+LANGMAP: | 2810 case VREPLACE+LANGMAP: |
3075 add_long_to_buf((long_u)menu, bytes); | 3076 add_long_to_buf((long_u)menu, bytes); |
3076 add_to_input_buf_csi(bytes, sizeof(long_u)); | 3077 add_to_input_buf_csi(bytes, sizeof(long_u)); |
3077 } | 3078 } |
3078 #endif | 3079 #endif |
3079 | 3080 |
3080 static int prev_which_scrollbars[3] = {-1, -1, -1}; | 3081 #ifndef FEAT_WINDOWS |
3082 static int prev_which_scrollbars[3]; | |
3083 #endif | |
3081 | 3084 |
3082 /* | 3085 /* |
3083 * Set which components are present. | 3086 * Set which components are present. |
3084 * If "oldval" is not NULL, "oldval" is the previous value, the new value is | 3087 * If "oldval" is not NULL, "oldval" is the previous value, the new value is |
3085 * in p_go. | 3088 * in p_go. |
3209 } | 3212 } |
3210 #endif | 3213 #endif |
3211 | 3214 |
3212 for (i = 0; i < 3; i++) | 3215 for (i = 0; i < 3; i++) |
3213 { | 3216 { |
3214 if (gui.which_scrollbars[i] != prev_which_scrollbars[i]) | 3217 if (gui.which_scrollbars[i] != |
3218 #ifdef FEAT_WINDOWS | |
3219 curtab->tp_prev_which_scrollbars[i] | |
3220 #else | |
3221 prev_which_scrollbars[i] | |
3222 #endif | |
3223 ) | |
3215 { | 3224 { |
3216 if (i == SBAR_BOTTOM) | 3225 if (i == SBAR_BOTTOM) |
3217 gui_mch_enable_scrollbar(&gui.bottom_sbar, | 3226 gui_mch_enable_scrollbar(&gui.bottom_sbar, |
3218 gui.which_scrollbars[i]); | 3227 gui.which_scrollbars[i]); |
3219 else | 3228 else |
3225 } | 3234 } |
3226 need_set_size = TRUE; | 3235 need_set_size = TRUE; |
3227 if (gui.which_scrollbars[i]) | 3236 if (gui.which_scrollbars[i]) |
3228 fix_size = TRUE; | 3237 fix_size = TRUE; |
3229 } | 3238 } |
3230 prev_which_scrollbars[i] = gui.which_scrollbars[i]; | 3239 #ifdef FEAT_WINDOWS |
3240 curtab->tp_prev_which_scrollbars[i] | |
3241 #else | |
3242 prev_which_scrollbars[i] | |
3243 #endif | |
3244 = gui.which_scrollbars[i]; | |
3231 } | 3245 } |
3232 | 3246 |
3233 #ifdef FEAT_MENU | 3247 #ifdef FEAT_MENU |
3234 if (gui.menu_is_active != prev_menu_is_active) | 3248 if (gui.menu_is_active != prev_menu_is_active) |
3235 { | 3249 { |
3477 FOR_ALL_WINDOWS(wp) | 3491 FOR_ALL_WINDOWS(wp) |
3478 { | 3492 { |
3479 gui_do_scrollbar(wp, i, FALSE); | 3493 gui_do_scrollbar(wp, i, FALSE); |
3480 } | 3494 } |
3481 } | 3495 } |
3482 prev_which_scrollbars[i] = -1; | 3496 curtab->tp_prev_which_scrollbars[i] = -1; |
3483 } | 3497 } |
3484 } | 3498 } |
3485 #endif | 3499 #endif |
3486 | 3500 |
3487 void | 3501 void |
3671 } | 3685 } |
3672 # ifdef FEAT_FOLDING | 3686 # ifdef FEAT_FOLDING |
3673 /* Value may have been changed for closed fold. */ | 3687 /* Value may have been changed for closed fold. */ |
3674 sb->value = sb->wp->w_topline - 1; | 3688 sb->value = sb->wp->w_topline - 1; |
3675 # endif | 3689 # endif |
3690 | |
3691 /* When dragging one scrollbar and there is another one at the other | |
3692 * side move the thumb of that one too. */ | |
3693 if (gui.which_scrollbars[SBAR_RIGHT] && gui.which_scrollbars[SBAR_LEFT]) | |
3694 gui_mch_set_scrollbar_thumb( | |
3695 &sb->wp->w_scrollbars[ | |
3696 sb == &sb->wp->w_scrollbars[SBAR_RIGHT] | |
3697 ? SBAR_LEFT : SBAR_RIGHT], | |
3698 sb->value, sb->size, sb->max); | |
3699 | |
3676 #else | 3700 #else |
3677 bytes[0] = CSI; | 3701 bytes[0] = CSI; |
3678 bytes[1] = KS_VER_SCROLLBAR; | 3702 bytes[1] = KS_VER_SCROLLBAR; |
3679 bytes[2] = KE_FILLER; | 3703 bytes[2] = KE_FILLER; |
3680 bytes[3] = (char_u)sb_num; | 3704 bytes[3] = (char_u)sb_num; |