Mirror of the Vim source from https://github.com/vim/vim
Revision | d7860ee7eb7ef5c27d45c4569107376d3cbdbdef (tree) |
---|---|
Time | 2006-02-26 06:55:24 |
Author | vimboss |
Commiter | vimboss |
updated for version 7.0207
@@ -1,4 +1,4 @@ | ||
1 | -*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 24 | |
1 | +*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 25 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -30,20 +30,17 @@ | ||
30 | 30 | *known-bugs* |
31 | 31 | -------------------- Known bugs and current work ----------------------- |
32 | 32 | |
33 | -Fix for hlsearch getting stuck on multibyte char also in 6.4. reportec by | |
34 | -Yukihiro Nakadaira. | |
35 | - | |
36 | - | |
37 | 33 | Tab pages: |
34 | +- Add 'guitablabel' option. | |
38 | 35 | - GTK GUI implementation for the tab pages line: |
39 | - /tmp/vim61_tab.patch.bz2 | |
40 | - Window height can be wrong: | |
41 | - :set go-=e | |
42 | - resize to fill screen | |
43 | - :set go+=e | |
44 | - Add 'guitabitem' option? | |
45 | -- GUI implementation for the tab pages line for other systems. | |
36 | + handling of tab in insert mode (like clicking mouse in other window) | |
37 | + and cmdline mode (keep current tab) | |
38 | + | |
39 | +9 GUI implementation for the tab pages line for other systems. | |
40 | +8 Make GUI menu in tab pages line configurable. Like the popup menu. | |
46 | 41 | 8 tab pages in the session file, if "tabpages" in 'sessionoptions' |
42 | +8 :tabmove +N move tab page N pages forward | |
43 | +8 :tabmove -N move tab page N pages backward | |
47 | 44 | 7 :tabdup duplicate the tab with all its windows. |
48 | 45 | 6 :tab ball tab page for each buffer |
49 | 46 | 6 :tab all tab page for each argument |
@@ -136,6 +133,7 @@ | ||
136 | 133 | |
137 | 134 | Mac unicode patch (Da Woon Jung): |
138 | 135 | - configuration option for platform: i386, ppc or both. |
136 | + Use __LITTLE_ENDIAN__ to test for current platform. | |
139 | 137 | - selecting proportional font breaks display |
140 | 138 | - UTF-8 text causes display problems. Font replacement causes this. |
141 | 139 | - Command-key mappings do not work. (Alan Schmitt) |
@@ -1,4 +1,4 @@ | ||
1 | -*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 24 | |
1 | +*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 25 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -1749,4 +1749,11 @@ | ||
1749 | 1749 | |
1750 | 1750 | ml_get errors when searching for "\n\zs" in an empty file. |
1751 | 1751 | |
1752 | +When selecting a block and using "$" to select until the end of every line and | |
1753 | +not highlighting the character under the cursor the first character of the | |
1754 | +block could be unhighlighted. | |
1755 | + | |
1756 | +When counting words for the Visual block area and using "$" to select until | |
1757 | +the end of every line only up to the length of the last line was counted. | |
1758 | + | |
1752 | 1759 | vim:tw=78:ts=8:ft=help:norl: |
@@ -14943,7 +14943,7 @@ | ||
14943 | 14943 | if (arg != NULL) |
14944 | 14944 | { |
14945 | 14945 | if (STRCMP(arg, "$") == 0) |
14946 | - nr = tabpage_index(NULL); | |
14946 | + nr = tabpage_index(NULL) - 1; | |
14947 | 14947 | else |
14948 | 14948 | EMSG2(_(e_invexpr2), arg); |
14949 | 14949 | } |
@@ -3061,6 +3061,129 @@ | ||
3061 | 3061 | |
3062 | 3062 | #if defined(FEAT_GUI_TABLINE) || defined(PROTO) |
3063 | 3063 | static int ignore_tabline_evt = FALSE; |
3064 | +static GtkWidget *tabline_menu; | |
3065 | +static int clicked_page; /* page clicked in tab line */ | |
3066 | + | |
3067 | +/* | |
3068 | + * Handle selecting an item in the tab line popup menu. | |
3069 | + */ | |
3070 | +/*ARGSUSED*/ | |
3071 | + static void | |
3072 | +tabline_menu_handler(GtkMenuItem *item, gpointer user_data) | |
3073 | +{ | |
3074 | + char_u string[3]; | |
3075 | + | |
3076 | + /* Add the string cmd into input buffer */ | |
3077 | + string[0] = CSI; | |
3078 | + string[1] = KS_TABMENU; | |
3079 | + string[2] = KE_FILLER; | |
3080 | + add_to_input_buf(string, 3); | |
3081 | + string[0] = clicked_page; | |
3082 | + string[1] = (char_u)(long)user_data; | |
3083 | + add_to_input_buf_csi(string, 2); | |
3084 | + | |
3085 | + if (gtk_main_level() > 0) | |
3086 | + gtk_main_quit(); | |
3087 | +} | |
3088 | + | |
3089 | +/* | |
3090 | + * Send the event for clicking to select tab page "nr". | |
3091 | + */ | |
3092 | + static void | |
3093 | +send_tabline_event(int nr) | |
3094 | +{ | |
3095 | + char_u string[3]; | |
3096 | + | |
3097 | + string[0] = CSI; | |
3098 | + string[1] = KS_TABLINE; | |
3099 | + string[2] = KE_FILLER; | |
3100 | + add_to_input_buf(string, 3); | |
3101 | + string[0] = nr; | |
3102 | + add_to_input_buf_csi(string, 1); | |
3103 | + | |
3104 | + if (gtk_main_level() > 0) | |
3105 | + gtk_main_quit(); | |
3106 | +} | |
3107 | + | |
3108 | +/* | |
3109 | + * Create a menu for the tab line. | |
3110 | + */ | |
3111 | + static GtkWidget * | |
3112 | +create_tabline_menu(void) | |
3113 | +{ | |
3114 | + GtkWidget *menu, *item; | |
3115 | + | |
3116 | + menu = gtk_menu_new(); | |
3117 | + | |
3118 | + item = gtk_menu_item_new_with_label(_("Close")); | |
3119 | + gtk_widget_show(item); | |
3120 | + gtk_container_add(GTK_CONTAINER(menu), item); | |
3121 | + gtk_signal_connect(GTK_OBJECT(item), "activate", | |
3122 | + GTK_SIGNAL_FUNC(tabline_menu_handler), | |
3123 | + (gpointer)TABLINE_MENU_CLOSE); | |
3124 | + | |
3125 | + item = gtk_menu_item_new_with_label(_("New tab")); | |
3126 | + gtk_widget_show(item); | |
3127 | + gtk_container_add(GTK_CONTAINER(menu), item); | |
3128 | + gtk_signal_connect(GTK_OBJECT(item), "activate", | |
3129 | + GTK_SIGNAL_FUNC(tabline_menu_handler), | |
3130 | + (gpointer)TABLINE_MENU_NEW); | |
3131 | + | |
3132 | + item = gtk_menu_item_new_with_label(_("Open Tab...")); | |
3133 | + gtk_widget_show(item); | |
3134 | + gtk_container_add(GTK_CONTAINER(menu), item); | |
3135 | + gtk_signal_connect(GTK_OBJECT(item), "activate", | |
3136 | + GTK_SIGNAL_FUNC(tabline_menu_handler), | |
3137 | + (gpointer)TABLINE_MENU_OPEN); | |
3138 | + | |
3139 | + return menu; | |
3140 | +} | |
3141 | + | |
3142 | + static gboolean | |
3143 | +on_tabline_menu(GtkWidget *widget, GdkEvent *event) | |
3144 | +{ | |
3145 | + /* Was this button press event ? */ | |
3146 | + if (event->type == GDK_BUTTON_PRESS) | |
3147 | + { | |
3148 | + GdkEventButton *bevent = (GdkEventButton *)event; | |
3149 | + int x = bevent->x; | |
3150 | + GtkWidget *page; | |
3151 | + GtkWidget *label; | |
3152 | + | |
3153 | + /* Find out where the click was. */ | |
3154 | + for (clicked_page = 1; ; ++clicked_page) | |
3155 | + { | |
3156 | + page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(gui.tabline), | |
3157 | + clicked_page - 1); | |
3158 | + if (page == NULL) | |
3159 | + { | |
3160 | + /* Past all the labels, return zero. */ | |
3161 | + clicked_page = 0; | |
3162 | + break; | |
3163 | + } | |
3164 | + label = gtk_notebook_get_tab_label(GTK_NOTEBOOK(gui.tabline), page); | |
3165 | + /* The label size apparently doesn't include the spacing, estimate | |
3166 | + * it by the page position. */ | |
3167 | + if (page->allocation.x * 2 + label->allocation.x | |
3168 | + + label->allocation.width + 1>= x) | |
3169 | + break; | |
3170 | + } | |
3171 | + | |
3172 | + /* If the event was generated for 3rd button popup the menu. */ | |
3173 | + if (bevent->button == 3) | |
3174 | + { | |
3175 | + gtk_menu_popup(GTK_MENU(widget), NULL, NULL, NULL, NULL, | |
3176 | + bevent->button, bevent->time); | |
3177 | + /* We handled the event. */ | |
3178 | + return TRUE; | |
3179 | + } | |
3180 | + else if (bevent->button == 1 && clicked_page == 0) | |
3181 | + /* Click after all tabs moves to next tab page. */ | |
3182 | + send_tabline_event(0); | |
3183 | + } | |
3184 | + /* We didn't handle the event. */ | |
3185 | + return FALSE; | |
3186 | +} | |
3064 | 3187 | |
3065 | 3188 | /* |
3066 | 3189 | * Handle selecting one of the tabs. |
@@ -3073,20 +3196,8 @@ | ||
3073 | 3196 | gint index, |
3074 | 3197 | gpointer data) |
3075 | 3198 | { |
3076 | - static char_u string[3]; | |
3077 | - | |
3078 | 3199 | if (!ignore_tabline_evt) |
3079 | - { | |
3080 | - string[0] = CSI; | |
3081 | - string[1] = KS_TABLINE; | |
3082 | - string[2] = KE_FILLER; | |
3083 | - add_to_input_buf(string, 3); | |
3084 | - string[0] = index + 1; | |
3085 | - add_to_input_buf_csi(string, 1); | |
3086 | - | |
3087 | - if (gtk_main_level() > 0) | |
3088 | - gtk_main_quit(); | |
3089 | - } | |
3200 | + send_tabline_event(index + 1); | |
3090 | 3201 | } |
3091 | 3202 | |
3092 | 3203 | /* |
@@ -3472,6 +3583,11 @@ | ||
3472 | 3583 | } |
3473 | 3584 | gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page", |
3474 | 3585 | GTK_SIGNAL_FUNC(on_select_tab), NULL); |
3586 | + | |
3587 | + /* Create a popup menu for the tab line and connect it. */ | |
3588 | + tabline_menu = create_tabline_menu(); | |
3589 | + gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event", | |
3590 | + GTK_SIGNAL_FUNC(on_tabline_menu), GTK_OBJECT(tabline_menu)); | |
3475 | 3591 | #endif |
3476 | 3592 | |
3477 | 3593 | gui.formwin = gtk_form_new(); |