diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index b5283bc1af18cc89dc36848715e4b4af3deb21bc..85132a60f82818b1ee9d8f30added7f4c2fef066 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.0aa. Last change: 2006 Feb 13 +*change.txt* For Vim version 7.0aa. Last change: 2006 Feb 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1171,7 +1171,7 @@ gq{motion} Format the lines that {motion} moves over. Formatting is done with one of three methods: 1. If 'formatexpr' is not empty the expression is evaluated. This can differ for each buffer. - 2. If 'formatprg' is not mepty an external program + 2. If 'formatprg' is not empty an external program is used. 3. Otherise formatting is done internally. diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt index 59bc24e1fef606f9fd51f208ce2463a25bb32a0e..dc1e8db76992199927e92f8cb8566e3074c664b7 100644 --- a/runtime/doc/todo.txt +++ b/runtime/doc/todo.txt @@ -1,4 +1,4 @@ -*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 14 +*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 15 VIM REFERENCE MANUAL by Bram Moolenaar @@ -32,22 +32,20 @@ be worked on, but only if you sponsor Vim development. See |sponsor|. Support WINDOW TABS. Works like several pages, each with their own split windows. Let's call them "tab pages". - - todo: - - ":qa"? - - "2gt" doesn't restore syntax HL. GUI: scrollbars are wrong. - - line at top of frame with tabs. 'tabline' option 0/1/2 like 'laststatus' - Use the name of the first buffer in the tab (ignoring the help window, - unless it's the only one). Add a number for the window count. + - Mouse click in tab name should select that tab. + - line at top of frame with tabs. + for the name ignore the help window, unless it's the only one). + Add a number for the window count? + Add a '+' if one of the windows is modified? Add 'tabtext' option, like 'statusline'. - Select tab with mouse. + Add an "X" to close the current tab (like firefox). - When deleting a buffer also close windows in other tab pages. - - check all places where (firstwin == lastwin) is used (and vise versa) + - check all places where firstwin and lastwin are used - check all places wheren only_one_window() is used. - - When Vim window is resized all tabs must be resized. + - Add tabpage(): returns current tab page number. - E999 - ":tabclose N" close tab N - docs: + - docs: :tabedit :tabfind :tab N @@ -58,21 +56,20 @@ windows. Let's call them "tab pages". "gt": Use "1gt" - "99gt" to switch to another tab. "gt" goes to the next one. Hint in docs: To mess with another buffer, without changing the window layout, do this in another tab. - - add GUI Tabs for some systems. - Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6. - Simple patch for GTK by Luis M (nov 7). - - Don't forget to provide an "X" to close the current tab. - - Need to be able to search the windows in inactive tabs, e.g. for the - quickfix window. - + 'tabline' values 0/1/2 + - add GUI Tabs for some systems. + Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6. + Simple patch for GTK by Luis M (nov 7). + - Need to be able to search the windows in inactive tabs, e.g. for the + quickfix window. Crash with X command server (Ciaran McCreesh). Ctags still hasn't included the patch... +"fsutil hardlink" can create a hard link on an NTFS file system. (Daniel +Einspanjer) What library function can detect that? + spelling: - Also use the spelling dictionary for dictionary completion. When 'dictionary' is empty and/or when "kspell" is in 'complete'. diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 1502e0c1c07519d645f47fb4da9d8c6959266b5f..c608f9d4adae3835282626d642d30bbafabccfba 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -3456,6 +3456,9 @@ update_window_manager_hints(void) * otherwise the hints don't work. */ width = gui_get_base_width(); height = gui_get_base_height(); +# ifdef FEAT_MENU + height += tabpageline_height() * gui.char_height; +# endif # ifdef HAVE_GTK2 width += get_menu_tool_width(); height += get_menu_tool_height(); diff --git a/src/option.c b/src/option.c index cca91cc5ddd87b8a75b748349474b8265e43df1c..25ddafbd2ad0654ff8db54ee0b8d62d3b2b5bca2 100644 --- a/src/option.c +++ b/src/option.c @@ -2181,6 +2181,13 @@ static struct vimoption {(char_u *)0L, (char_u *)0L} #endif }, + {"tabline", "tal", P_NUM|P_VI_DEF|P_RALL, +#ifdef FEAT_WINDOWS + (char_u *)&p_tal, PV_NONE, +#else + (char_u *)NULL, PV_NONE, +#endif + {(char_u *)1L, (char_u *)0L}}, {"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF, (char_u *)&p_ts, PV_TS, {(char_u *)8L, (char_u *)0L}}, @@ -7259,6 +7266,12 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags) { last_status(FALSE); } + + /* (re)set tab page line */ + else if (pp == &p_tal) + { + shell_new_rows(); /* recompute window positions and heights */ + } #endif #ifdef FEAT_GUI diff --git a/src/option.h b/src/option.h index f1714ae4448a13ca2701d6081fc85d4a30bd73e9..d3c01ecd1a816a802cd79f000017f5aaaa40e8a4 100644 --- a/src/option.h +++ b/src/option.h @@ -577,6 +577,7 @@ EXTERN char_u *p_lispwords; /* 'lispwords' */ #endif #ifdef FEAT_WINDOWS EXTERN long p_ls; /* 'laststatus' */ +EXTERN long p_tal; /* 'tabline' */ #endif EXTERN char_u *p_lcs; /* 'listchars' */ diff --git a/src/proto/gui.pro b/src/proto/gui.pro index d9dea654d8cb1afb5835bdedf00266e9cd4f8c25..eacc2ac82d88b344d686dbd8c5eceff30ce7bfa5 100644 --- a/src/proto/gui.pro +++ b/src/proto/gui.pro @@ -34,6 +34,7 @@ void gui_send_mouse_event __ARGS((int button, int x, int y, int repeated_click, int gui_xy2colrow __ARGS((int x, int y, int *colp)); void gui_menu_cb __ARGS((vimmenu_T *menu)); void gui_init_which_components __ARGS((char_u *oldval)); +void gui_remove_scrollbars __ARGS((void)); void gui_create_scrollbar __ARGS((scrollbar_T *sb, int type, win_T *wp)); scrollbar_T *gui_find_scrollbar __ARGS((long ident)); void gui_drag_scrollbar __ARGS((scrollbar_T *sb, long value, int still_dragging)); diff --git a/src/proto/window.pro b/src/proto/window.pro index a1808bc692bd5012018b2084aa69183fd413f941..0ff745a083c26532315f131d86e6c6c1fb5f053f 100644 --- a/src/proto/window.pro +++ b/src/proto/window.pro @@ -26,6 +26,7 @@ void shell_new_rows __ARGS((void)); void shell_new_columns __ARGS((void)); void win_size_save __ARGS((garray_T *gap)); void win_size_restore __ARGS((garray_T *gap)); +int win_comp_pos __ARGS((void)); void win_setheight __ARGS((int height)); void win_setheight_win __ARGS((int height, win_T *win)); void win_setwidth __ARGS((int width)); diff --git a/src/screen.c b/src/screen.c index ba5475b0d0220f70f55d563d134d8c3dcb1e13a8..9005efafd99eefd7893ba6a5ef0e1464d05ec686 100644 --- a/src/screen.c +++ b/src/screen.c @@ -701,8 +701,14 @@ updateWindow(wp) if (clip_star.available && clip_isautosel()) clip_update_selection(); #endif + win_update(wp); + #ifdef FEAT_WINDOWS + /* When the screen was cleared redraw the tab pages line. */ + if (redraw_tabpage) + draw_tabpage(); + if (wp->w_redr_status # ifdef FEAT_CMDL_INFO || p_ru @@ -7057,6 +7063,9 @@ screenclear2() win_rest_invalid(firstwin); redraw_cmdline = TRUE; +#ifdef FEAT_WINDOWS + redraw_tabpage = TRUE; +#endif if (must_redraw == CLEAR) /* no need to clear again */ must_redraw = NOT_VALID; compute_cmdrow(); @@ -8468,11 +8477,14 @@ draw_tabpage() c = '/'; else c = '\\'; - screen_putchar(c, 0, col++, attr); + if (t_colors < 8) + screen_putchar(c, 0, col++, attr); if (tp->tp_topframe != topframe) attr = attr_nosel; + screen_putchar(' ', 0, col++, attr); + if (tp->tp_topframe == topframe) wp = curwin; else @@ -8488,11 +8500,17 @@ draw_tabpage() len = tabwidth; screen_puts_len(NameBuff, len, 0, col, attr); col += len; + screen_putchar(' ', 0, col++, attr); } - screen_putchar('\\', 0, col++, attr); - while (col < Columns) - screen_putchar('_', 0, col++, attr_fill); + if (t_colors < 8) + { + screen_putchar('\\', 0, col++, attr); + c = '_'; + } + else + c = ' '; + screen_fill(0, 1, col, (int)Columns, c, c, attr_fill); } #endif diff --git a/src/structs.h b/src/structs.h index a743a4f465f33852c94e0e04ce875efba11f88f7..893b826f9bb9ef8efdfcd41c774564375197f99b 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1555,11 +1555,13 @@ typedef struct w_line typedef struct tabpage_S tabpage_T; struct tabpage_S { - tabpage_T *tp_next; /* next tabpage or NULL */ - frame_T *tp_topframe; - win_T *tp_curwin; /* current window in this Tab page */ - win_T *tp_firstwin; /* first window in this Tab page */ - win_T *tp_lastwin; /* last window in this Tab page */ + tabpage_T *tp_next; /* next tabpage or NULL */ + frame_T *tp_topframe; /* topframe for the windows */ + win_T *tp_curwin; /* current window in this Tab page */ + win_T *tp_firstwin; /* first window in this Tab page */ + win_T *tp_lastwin; /* last window in this Tab page */ + long tp_old_Rows; /* Rows when Tab page was left */ + long tp_old_Columns; /* Columns when Tab page was left */ }; /* diff --git a/src/syntax.c b/src/syntax.c index 0db3a6e74ecfd39f1ed01e6255031341dcaa5c6a..2574f3d476c7a95da62222044518ad833b73bfa7 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -6079,9 +6079,8 @@ static char *(highlight_init_both[]) = "DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red", "PmenuThumb cterm=reverse gui=reverse", "PmenuSbar ctermbg=Grey guibg=Grey", - "TabPage term=underline cterm=underline ctermbg=grey gui=underline guibg=grey", - "TabPageSel term=reverse,bold cterm=reverse,bold gui=reverse,bold", - "TabPageFill term=underline cterm=underline ctermbg=grey gui=underline guibg=grey", + "TabPageSel term=bold cterm=bold gui=bold", + "TabPageFill term=reverse cterm=reverse gui=reverse", NULL }; @@ -6110,6 +6109,7 @@ static char *(highlight_init_light[]) = "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue", "DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta", "DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan", + "TabPage term=underline cterm=underline ctermbg=LightGrey gui=underline guibg=LightGrey", NULL }; @@ -6138,6 +6138,7 @@ static char *(highlight_init_dark[]) = "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue", "DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta", "DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan", + "TabPage term=underline cterm=underline ctermbg=DarkGrey gui=underline guibg=DarkGrey", NULL }; diff --git a/src/version.h b/src/version.h index 6ff870f9fae506db4f511baebd2d025176b0813f..0f561bc61bc98d95bc777a0500d3e2e3823f89bd 100644 --- a/src/version.h +++ b/src/version.h @@ -36,5 +36,5 @@ #define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_MEDIUM "7.0aa ALPHA" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 14)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 14, compiled " +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 15)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 15, compiled "