• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisiond7860ee7eb7ef5c27d45c4569107376d3cbdbdef (tree)
Time2006-02-26 06:55:24
Authorvimboss
Commitervimboss

Log Message

updated for version 7.0207

Change Summary

Incremental Difference

diff -r bcd2edc4539e -r d7860ee7eb7e runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Sat Feb 25 21:52:33 2006 +0000
+++ b/runtime/doc/todo.txt Sat Feb 25 21:55:24 2006 +0000
@@ -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
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,20 +30,17 @@
3030 *known-bugs*
3131 -------------------- Known bugs and current work -----------------------
3232
33-Fix for hlsearch getting stuck on multibyte char also in 6.4. reportec by
34-Yukihiro Nakadaira.
35-
36-
3733 Tab pages:
34+- Add 'guitablabel' option.
3835 - 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.
4641 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
4744 7 :tabdup duplicate the tab with all its windows.
4845 6 :tab ball tab page for each buffer
4946 6 :tab all tab page for each argument
@@ -136,6 +133,7 @@
136133
137134 Mac unicode patch (Da Woon Jung):
138135 - configuration option for platform: i386, ppc or both.
136+ Use __LITTLE_ENDIAN__ to test for current platform.
139137 - selecting proportional font breaks display
140138 - UTF-8 text causes display problems. Font replacement causes this.
141139 - Command-key mappings do not work. (Alan Schmitt)
diff -r bcd2edc4539e -r d7860ee7eb7e runtime/doc/version7.txt
--- a/runtime/doc/version7.txt Sat Feb 25 21:52:33 2006 +0000
+++ b/runtime/doc/version7.txt Sat Feb 25 21:55:24 2006 +0000
@@ -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
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1749,4 +1749,11 @@
17491749
17501750 ml_get errors when searching for "\n\zs" in an empty file.
17511751
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+
17521759 vim:tw=78:ts=8:ft=help:norl:
diff -r bcd2edc4539e -r d7860ee7eb7e src/eval.c
--- a/src/eval.c Sat Feb 25 21:52:33 2006 +0000
+++ b/src/eval.c Sat Feb 25 21:55:24 2006 +0000
@@ -14943,7 +14943,7 @@
1494314943 if (arg != NULL)
1494414944 {
1494514945 if (STRCMP(arg, "$") == 0)
14946- nr = tabpage_index(NULL);
14946+ nr = tabpage_index(NULL) - 1;
1494714947 else
1494814948 EMSG2(_(e_invexpr2), arg);
1494914949 }
diff -r bcd2edc4539e -r d7860ee7eb7e src/gui_gtk_x11.c
--- a/src/gui_gtk_x11.c Sat Feb 25 21:52:33 2006 +0000
+++ b/src/gui_gtk_x11.c Sat Feb 25 21:55:24 2006 +0000
@@ -3061,6 +3061,129 @@
30613061
30623062 #if defined(FEAT_GUI_TABLINE) || defined(PROTO)
30633063 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+}
30643187
30653188 /*
30663189 * Handle selecting one of the tabs.
@@ -3073,20 +3196,8 @@
30733196 gint index,
30743197 gpointer data)
30753198 {
3076- static char_u string[3];
3077-
30783199 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);
30903201 }
30913202
30923203 /*
@@ -3472,6 +3583,11 @@
34723583 }
34733584 gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page",
34743585 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));
34753591 #endif
34763592
34773593 gui.formwin = gtk_form_new();
Show on old repository browser