1
0
forked from aniani/vim

updated for version 7.0c

This commit is contained in:
Bram Moolenaar
2006-03-27 17:01:56 +00:00
parent 899dddf888
commit 3991dab8e0
181 changed files with 489 additions and 265 deletions

View File

@@ -15,6 +15,6 @@ REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Vim\Gvim]
"path"="gvim.exe"
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0b]
"DisplayName"="Vim 7.0b: Edit with Vim popup menu entry"
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0c]
"DisplayName"="Vim 7.0c: Edit with Vim popup menu entry"
"UninstallString"="uninstal.exe"

View File

@@ -880,7 +880,7 @@ MAN1DIR = /man1
### Vim version (adjusted by a script)
VIMMAJOR = 7
VIMMINOR = 0b
VIMMINOR = 0c
### Location of Vim files (should not need to be changed, and {{{1
### some things might not work when they are changed!)

View File

@@ -753,7 +753,8 @@
/*
* GUI tabline
*/
#if defined(FEAT_GUI_GTK) && defined(FEAT_WINDOWS)
#if defined(FEAT_WINDOWS) && (defined(FEAT_GUI_GTK) \
|| (defined(FEAT_GUI_MSWIN) && WINVER > 0x0400))
# define FEAT_GUI_TABLINE
#endif

View File

@@ -1142,6 +1142,11 @@ gui_position_components(total_width)
text_area_y = TOOLBAR_BUTTON_HEIGHT + TOOLBAR_BORDER_HEIGHT;
#endif
#if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN)
if (gui_has_tabline())
text_area_y += TABLINE_HEIGHT;
#endif
#if defined(FEAT_TOOLBAR) && (defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_ATHENA))
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
{
@@ -1223,6 +1228,10 @@ gui_get_base_height()
base_height += gui.toolbar_height;
# endif
# endif
# if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN)
if (gui_has_tabline())
base_height += TABLINE_HEIGHT;
# endif
# ifdef FEAT_FOOTER
if (vim_strchr(p_go, GO_FOOTER) != NULL)
base_height += gui.footer_height;
@@ -3924,6 +3933,11 @@ gui_update_scrollbars(force)
# endif
#endif
#if defined(FEAT_GUI_TABLINE) && defined(FEAT_GUI_MSWIN)
if (gui_has_tabline())
y += TABLINE_HEIGHT;
#endif
#ifdef FEAT_WINDOWS
if (wp->w_winrow == 0)
#endif

View File

@@ -158,6 +158,10 @@
#endif
#define TOOLBAR_BORDER_HEIGHT 12 /* room above+below buttons for MSWindows */
#ifdef FEAT_GUI_MSWIN
# define TABLINE_HEIGHT 24
#endif
#if defined(NO_CONSOLE) || defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
# define NO_CONSOLE_INPUT /* use no_console_input() to check if there
is no console input possible */

Binary file not shown.

View File

@@ -297,6 +297,10 @@ static void initialise_toolbar(void);
static int get_toolbar_bitmap(vimmenu_T *menu);
#endif
#ifdef FEAT_GUI_TABLINE
static void initialise_tabline(void);
#endif
#ifdef FEAT_MBYTE_IME
static LRESULT _OnImeComposition(HWND hwnd, WPARAM dbcs, LPARAM param);
static char_u *GetResultStr(HWND hwnd, int GCS, int *lenp);
@@ -760,10 +764,11 @@ _WndProc(
case WM_SETTINGCHANGE:
return _OnSettingChange((UINT)wParam);
#ifdef FEAT_TOOLBAR
#if defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)
case WM_NOTIFY:
switch (((LPNMHDR) lParam)->code)
{
# ifdef FEAT_TOOLBAR
case TTN_NEEDTEXT:
{
LPTOOLTIPTEXT lpttt;
@@ -785,7 +790,20 @@ _WndProc(
}
}
break;
# endif
# ifdef FEAT_GUI_TABLINE
case TCN_SELCHANGE:
if (gui_mch_showing_tabline()
&& ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
send_tabline_event(TabCtrl_GetCurSel(s_tabhwnd) + 1);
break;
# endif
default:
# ifdef FEAT_GUI_TABLINE
if (gui_mch_showing_tabline()
&& ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
return MyWindowProc(hwnd, uMsg, wParam, lParam);
# endif
break;
}
break;
@@ -831,6 +849,19 @@ _WndProc(
result = MyWindowProc(hwnd, uMsg, wParam, lParam);
if (result == HTCLIENT)
{
#ifdef FEAT_GUI_TABLINE
if (gui_mch_showing_tabline())
{
int yPos = GET_Y_LPARAM(lParam);
RECT rct;
/* If the cursor is on the GUI tabline, don't process this
* event */
GetWindowRect(s_textArea, &rct);
if (yPos < rct.top)
return result;
}
#endif
gui_mch_get_winpos(&x, &y);
xPos -= x;
@@ -1280,6 +1311,12 @@ gui_mch_init(void)
*/
initialise_toolbar();
#endif
#ifdef FEAT_GUI_TABLINE
/*
* Create the tabline
*/
initialise_tabline();
#endif
#ifdef MSWIN_FIND_REPLACE
/*
* Initialise the dialog box stuff
@@ -3884,6 +3921,18 @@ get_toolbar_bitmap(vimmenu_T *menu)
}
#endif
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
static void
initialise_tabline(void)
{
InitCommonControls();
s_tabhwnd = CreateWindow(WC_TABCONTROL, "", WS_CHILD|TCS_FOCUSNEVER,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, s_hwnd, NULL, s_hinst, NULL);
}
#endif
#if defined(FEAT_OLE) || defined(FEAT_EVAL) || defined(PROTO)
/*
* Make the GUI window come to the foreground.

View File

@@ -28,7 +28,7 @@
#ifndef __MINGW32__
# include <shellapi.h>
#endif
#if defined(FEAT_TOOLBAR) || defined(FEAT_BEVAL)
#if defined(FEAT_TOOLBAR) || defined(FEAT_BEVAL) || defined(FEAT_GUI_TABLINE)
# include <commctrl.h>
#endif
#ifdef WIN16
@@ -170,6 +170,11 @@ static HBRUSH s_brush = NULL;
static HWND s_toolbarhwnd = NULL;
#endif
#ifdef FEAT_GUI_TABLINE
static HWND s_tabhwnd = NULL;
static int showing_tabline = 0;
#endif
static WPARAM s_wParam = 0;
static LPARAM s_lParam = 0;
@@ -1105,6 +1110,20 @@ gui_mch_set_text_area_pos(int x, int y, int w, int h)
SendMessage(s_toolbarhwnd, WM_SIZE,
(WPARAM)0, (LPARAM)(w + ((long)(TOOLBAR_BUTTON_HEIGHT+8)<<16)));
#endif
#if defined(FEAT_GUI_TABLINE)
if (showing_tabline)
{
int top = 0;
#ifdef FEAT_TOOLBAR
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
top = TOOLBAR_BUTTON_HEIGHT + TOOLBAR_BORDER_HEIGHT;
#endif
MoveWindow(s_tabhwnd, 0, top, w, TABLINE_HEIGHT, TRUE);
}
#endif
/* When side scroll bar is unshown, the size of window will change.
* then, the text area move left or right. thus client rect should be
* forcely redraw. (Yasuhiro Matsumoto) */
@@ -2156,6 +2175,95 @@ gui_mch_show_toolbar(int showit)
#endif
#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
/*
* Show or hide the tabline.
*/
void
gui_mch_show_tabline(int showit)
{
if (s_tabhwnd == NULL)
return;
if (!showit != !showing_tabline)
{
if (showit)
ShowWindow(s_tabhwnd, SW_SHOW);
else
ShowWindow(s_tabhwnd, SW_HIDE);
showing_tabline = showit;
}
}
/*
* Return TRUE when tabline is displayed.
*/
int
gui_mch_showing_tabline(void)
{
return s_tabhwnd != NULL && showing_tabline;
}
/*
* Update the labels of the tabline.
*/
void
gui_mch_update_tabline(void)
{
tabpage_T *tp;
TCITEM tie;
int nr = 0;
int curtabidx = 0;
RECT rc;
if (s_tabhwnd == NULL)
return;
tie.mask = TCIF_TEXT;
tie.iImage = -1;
/* Add a label for each tab page. They all contain the same text area. */
for (tp = first_tabpage; tp != NULL; tp = tp->tp_next, ++nr)
{
if (tp == curtab)
curtabidx = nr;
if (!TabCtrl_GetItemRect(s_tabhwnd, nr, &rc))
{
/* Add the tab */
tie.pszText = "-Empty-";
TabCtrl_InsertItem(s_tabhwnd, nr, &tie);
}
get_tabline_label(tp);
tie.pszText = NameBuff;
TabCtrl_SetItem(s_tabhwnd, nr, &tie);
}
/* Remove any old labels. */
while (TabCtrl_GetItemRect(s_tabhwnd, nr, &rc))
TabCtrl_DeleteItem(s_tabhwnd, nr);
if (TabCtrl_GetCurSel(s_tabhwnd) != curtabidx)
TabCtrl_SetCurSel(s_tabhwnd, curtabidx);
}
/*
* Set the current tab to "nr". First tab is 1.
*/
void
gui_mch_set_curtab(nr)
int nr;
{
if (s_tabhwnd == NULL)
return;
if (TabCtrl_GetCurSel(s_tabhwnd) != nr)
TabCtrl_SetCurSel(s_tabhwnd, nr);
}
#endif
/*
* ":simalt" command.
*/

View File

@@ -4167,8 +4167,13 @@ vim_snprintf(str, str_m, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
{
/* memchr on HP does not like n > 2^31 !!! */
char *q = memchr(str_arg, '\0',
#if SIZEOF_INT <= 2
precision
#else
precision <= (size_t)0x7fffffffL ? precision
: (size_t)0x7fffffffL);
: (size_t)0x7fffffffL
#endif
);
str_arg_l = (q == NULL) ? precision : q - str_arg;
}
break;

View File

@@ -3112,6 +3112,7 @@ get_number(colon, mouse_used)
{
int n = 0;
int c;
int typed = 0;
if (mouse_used != NULL)
*mouse_used = FALSE;
@@ -3134,11 +3135,16 @@ get_number(colon, mouse_used)
{
n = n * 10 + c - '0';
msg_putchar(c);
++typed;
}
else if (c == K_DEL || c == K_KDEL || c == K_BS || c == Ctrl_H)
{
if (typed > 0)
{
MSG_PUTS("\b \b");
--typed;
}
n /= 10;
MSG_PUTS("\b \b");
}
#ifdef FEAT_MOUSE
else if (mouse_used != NULL && c == K_LEFTMOUSE)

View File

@@ -438,6 +438,16 @@ struct vimoption
# define ISP_LATIN1 (char_u *)"@,161-255"
#endif
/* The 16 bit MS-DOS version is low on space, make the string as short as
* possible when compiling with few features. */
#if defined(FEAT_DIFF) || defined(FEAT_FOLDING) || defined(FEAT_SPELL) \
|| defined(FEAT_VERTSPLIT) || defined(FEAT_CLIPBOARD) \
|| defined(FEAT_INS_EXPAND) || defined(FEAT_SYN_HL)
# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine"
#else
# define HIGHLIGHT_INIT "8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,t:Title,v:Visual,w:WarningMsg,W:WildMenu,>:SignColumn,*:TabLine,#:TabLineSel,_:TabLineFill"
#endif
/*
* options[] is initialized here.
* The order of the options MUST be alphabetic for ":set all" and findoption().
@@ -1284,8 +1294,7 @@ static struct vimoption
{(char_u *)FALSE, (char_u *)0L}},
{"highlight", "hl", P_STRING|P_VI_DEF|P_RCLR|P_COMMA|P_NODUP,
(char_u *)&p_hl, PV_NONE,
{(char_u *)"8:SpecialKey,@:NonText,d:Directory,e:ErrorMsg,i:IncSearch,l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,r:Question,s:StatusLine,S:StatusLineNC,c:VertSplit,t:Title,v:Visual,V:VisualNOS,w:WarningMsg,W:WildMenu,f:Folded,F:FoldColumn,A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel,x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill,!:CursorColumn,.:CursorLine",
(char_u *)0L}},
{(char_u *)HIGHLIGHT_INIT, (char_u *)0L}},
{"history", "hi", P_NUM|P_VIM,
(char_u *)&p_hi, PV_NONE,
{(char_u *)0L, (char_u *)20L}},

View File

@@ -34,6 +34,10 @@ extern void gui_mch_draw_menubar __ARGS((void));
extern long_u gui_mch_get_rgb __ARGS((guicolor_T pixel));
extern void gui_mch_activate_window __ARGS((void));
extern void gui_mch_show_toolbar __ARGS((int showit));
extern void gui_mch_show_tabline __ARGS((int showit));
extern int gui_mch_showing_tabline __ARGS((void));
extern void gui_mch_update_tabline __ARGS((void));
extern void gui_mch_set_curtab __ARGS((int nr));
extern void ex_simalt __ARGS((exarg_T *eap));
extern void gui_mch_find_dialog __ARGS((exarg_T *eap));
extern void gui_mch_replace_dialog __ARGS((exarg_T *eap));

View File

@@ -34,6 +34,10 @@ extern void gui_mch_draw_menubar __ARGS((void));
extern long_u gui_mch_get_rgb __ARGS((guicolor_T pixel));
extern void gui_mch_activate_window __ARGS((void));
extern void gui_mch_show_toolbar __ARGS((int showit));
extern void gui_mch_show_tabline __ARGS((int showit));
extern int gui_mch_showing_tabline __ARGS((void));
extern void gui_mch_update_tabline __ARGS((void));
extern void gui_mch_set_curtab __ARGS((int nr));
extern void ex_simalt __ARGS((exarg_T *eap));
extern void gui_mch_find_dialog __ARGS((exarg_T *eap));
extern void gui_mch_replace_dialog __ARGS((exarg_T *eap));

View File

@@ -4667,7 +4667,6 @@ struct affentry_S
char_u *ae_flags; /* flags on the affix (can be NULL) */
char_u *ae_cond; /* condition (NULL for ".") */
regprog_T *ae_prog; /* regexp program for ae_cond or NULL */
char_u ae_nocomp; /* word with affix not compoundable */
};
#ifdef FEAT_MBYTE
@@ -5474,7 +5473,6 @@ spell_read_aff(spin, fname)
&& itemcnt >= 5)
{
affentry_T *aff_entry;
int nocomp = FALSE;
int upper = FALSE;
int lasti = 5;
@@ -5492,7 +5490,6 @@ spell_read_aff(spin, fname)
sizeof(affentry_T), TRUE);
if (aff_entry == NULL)
break;
aff_entry->ae_nocomp = nocomp;
if (STRCMP(items[2], "0") != 0)
aff_entry->ae_chop = getroom_save(spin, items[2]);

View File

@@ -1387,7 +1387,7 @@ u_add_time(buf, buflen, tt)
if (time(NULL) - tt >= 100)
{
curtime = localtime(&tt);
(void)strftime((char *)buf, buflen, "%T", curtime);
(void)strftime((char *)buf, buflen, "%H:%M:%S", curtime);
}
else
#endif

View File

@@ -19,9 +19,9 @@
#define VIM_VERSION_MINOR_STR "0"
#define VIM_VERSION_100 (VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR)
#define VIM_VERSION_BUILD 257
#define VIM_VERSION_BUILD_BCD 0x101
#define VIM_VERSION_BUILD_STR "257"
#define VIM_VERSION_BUILD 258
#define VIM_VERSION_BUILD_BCD 0x102
#define VIM_VERSION_BUILD_STR "258"
#define VIM_VERSION_PATCHLEVEL 0
#define VIM_VERSION_PATCHLEVEL_STR "0"
/* Used by MacOS port should be one of: development, alpha, beta, final */
@@ -33,8 +33,8 @@
* VIM_VERSION_MEDIUM is used for the startup-screen.
* VIM_VERSION_LONG is used for the ":version" command and "Vim -h".
*/
#define VIM_VERSION_NODOT "vim70b"
#define VIM_VERSION_SHORT "7.0b"
#define VIM_VERSION_MEDIUM "7.0b BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0b BETA (2006 Mar 26)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0b BETA (2006 Mar 26, compiled "
#define VIM_VERSION_NODOT "vim70c"
#define VIM_VERSION_SHORT "7.0c"
#define VIM_VERSION_MEDIUM "7.0c BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c BETA (2006 Mar 27)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c BETA (2006 Mar 27, compiled "