Compare commits

...

11 Commits

Author SHA1 Message Date
Bram Moolenaar
ec8317364b updated for version 7.1-092 2007-08-30 10:51:14 +00:00
Bram Moolenaar
78e1762c48 updated for version 7.1-091 2007-08-30 10:26:19 +00:00
Bram Moolenaar
1a3d086c84 updated for version 7.1-090 2007-08-30 09:47:38 +00:00
Bram Moolenaar
7d61a92145 updated for version 7.1-089 2007-08-30 09:12:23 +00:00
Bram Moolenaar
14d0e7976d updated for version 7.1-088 2007-08-30 08:35:35 +00:00
Bram Moolenaar
d2ac984a1e updated for version 7.1-087 2007-08-21 16:03:51 +00:00
Bram Moolenaar
3a36cf7bca updated for version 7.1-086 2007-08-21 15:29:56 +00:00
Bram Moolenaar
eb1b679067 updated for version 7.1-085 2007-08-21 13:29:28 +00:00
Bram Moolenaar
dd87969c8b updated for version 7.1-084 2007-08-21 13:07:12 +00:00
Bram Moolenaar
fa2e044471 updated for version 7.1-082 2007-08-18 16:21:50 +00:00
Bram Moolenaar
6529c101c3 updated for version 7.1-081 2007-08-18 15:47:34 +00:00
18 changed files with 302 additions and 118 deletions

View File

@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 7.1. Last change: 2007 May 03
*gui_w32.txt* For Vim version 7.1. Last change: 2007 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -53,6 +53,16 @@ vimrc or gvimrc file: >
There is a specific version of gvim.exe that runs under the Win32s subsystem
of Windows 3.1 or 3.11. See |win32s|.
Using Vim as a plugin *gui-w32-windowid*
When gvim starts up normally, it creates its own top level window. If you
pass Vim the command-line option |--windowid| with a decimal or hexadecimal
value, Vim will create a window that is a child of the window with the given
ID. This enables Vim to act as a plugin in another application. This really
is a programmer's interface, and is of no use without a supporting application
to spawn Vim correctly.
==============================================================================
2. Vim as default editor *vim-default-editor*

View File

@@ -12,8 +12,8 @@ This plugin is only available if 'compatible' is not set.
You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
:let loaded_matchparen = 1
The plugin installs CursorMoved autocommands to redefine the match
highlighting.
The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to
redefine the match highlighting.
To disable the plugin after it was loaded use this command: >

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.1. Last change: 2007 May 12
*starting.txt* For Vim version 7.1. Last change: 2007 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -548,6 +548,11 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
that it runs inside another window. See |gui-gtk-socketid|
for details. {not in Vi}
--windowid {id} *--windowid*
Win32 GUI Vim only. Make gvim try to use the window {id} as a
parent, so that it runs inside that window. See
|gui-w32-windowid| for details. {not in Vi}
--echo-wid *--echo-wid*
GTK+ GUI Vim only. Make gvim echo the Window ID on stdout,
which can be used to run gvim in a kpart widget. The format

View File

@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 7.1. Last change: 2007 May 07
*vi_diff.txt* For Vim version 7.1. Last change: 2007 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -827,6 +827,8 @@ Only Vim is able to accept options in between and after the file names.
--socketid {id} Vim: GTK window socket to run Vim in
--windowid {id} Vim: Win32 window ID to run Vim in
--version Vim: show version message and exit.
-? Vile: print usage summary and exit.

View File

@@ -1,6 +1,6 @@
" Vim plugin for showing matching parens
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2007 Jul 30
" Last Change: 2007 Aug 8
" Exit quickly when:
" - this plugin was already loaded (or disabled)
@@ -13,7 +13,7 @@ let g:loaded_matchparen = 1
augroup matchparen
" Replace all matchparen autocommands
autocmd! CursorMoved,CursorMovedI * call s:Highlight_Matching_Pair()
autocmd! CursorMoved,CursorMovedI,WinEnter * call s:Highlight_Matching_Pair()
augroup END
" Skip the rest if it was already done.
@@ -126,7 +126,8 @@ function! s:Highlight_Matching_Pair()
endfunction
" Define commands that will disable and enable the plugin.
command! NoMatchParen 3match none | unlet! g:loaded_matchparen | au! matchparen
command! DoMatchParen runtime plugin/matchparen.vim | doau CursorMoved
command! NoMatchParen windo 3match none | unlet! g:loaded_matchparen |
\ au! matchparen
command! DoMatchParen runtime plugin/matchparen.vim | windo doau CursorMoved
let &cpo = cpo_save

View File

@@ -931,6 +931,23 @@ vim_isfilec(c)
return (c >= 0x100 || (c > 0 && (chartab[c] & CT_FNAME_CHAR)));
}
/*
* return TRUE if 'c' is a valid file-name character or a wildcard character
* Assume characters above 0x100 are valid (multi-byte).
* Explicitly interpret ']' as a wildcard character as mch_has_wildcard("]")
* returns false.
*/
int
vim_isfilec_or_wc(c)
int c;
{
char_u buf[2];
buf[0] = (char_u)c;
buf[1] = NUL;
return vim_isfilec(c) || c == ']' || mch_has_wildcard(buf);
}
/*
* return TRUE if 'c' is a printable character
* Assume characters above 0x100 are printable (multi-byte), except for

View File

@@ -369,17 +369,17 @@ static int call_vim_function __ARGS((char_u *func, int argc, char_u **argv, int
static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars));
static char_u *skip_var_list __ARGS((char_u *arg, int *var_count, int *semicolon));
static char_u *skip_var_one __ARGS((char_u *arg));
static void list_hashtable_vars __ARGS((hashtab_T *ht, char_u *prefix, int empty));
static void list_glob_vars __ARGS((void));
static void list_buf_vars __ARGS((void));
static void list_win_vars __ARGS((void));
static void list_hashtable_vars __ARGS((hashtab_T *ht, char_u *prefix, int empty, int *first));
static void list_glob_vars __ARGS((int *first));
static void list_buf_vars __ARGS((int *first));
static void list_win_vars __ARGS((int *first));
#ifdef FEAT_WINDOWS
static void list_tab_vars __ARGS((void));
static void list_tab_vars __ARGS((int *first));
#endif
static void list_vim_vars __ARGS((void));
static void list_script_vars __ARGS((void));
static void list_func_vars __ARGS((void));
static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg));
static void list_vim_vars __ARGS((int *first));
static void list_script_vars __ARGS((int *first));
static void list_func_vars __ARGS((int *first));
static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first));
static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
static int check_changedtick __ARGS((char_u *arg));
static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet, int fne_flags));
@@ -704,8 +704,8 @@ static dictitem_T *find_var_in_ht __ARGS((hashtab_T *ht, char_u *varname, int wr
static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname));
static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
static void list_one_var __ARGS((dictitem_T *v, char_u *prefix));
static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string));
static void list_one_var __ARGS((dictitem_T *v, char_u *prefix, int *first));
static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string, int *first));
static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
static int var_check_ro __ARGS((int flags, char_u *name));
static int var_check_fixed __ARGS((int flags, char_u *name));
@@ -1699,6 +1699,7 @@ ex_let(eap)
int semicolon = 0;
char_u op[2];
char_u *argend;
int first = TRUE;
argend = skip_var_list(arg, &var_count, &semicolon);
if (argend == NULL)
@@ -1715,19 +1716,19 @@ ex_let(eap)
EMSG(_(e_invarg));
else if (!ends_excmd(*arg))
/* ":let var1 var2" */
arg = list_arg_vars(eap, arg);
arg = list_arg_vars(eap, arg, &first);
else if (!eap->skip)
{
/* ":let" */
list_glob_vars();
list_buf_vars();
list_win_vars();
list_glob_vars(&first);
list_buf_vars(&first);
list_win_vars(&first);
#ifdef FEAT_WINDOWS
list_tab_vars();
list_tab_vars(&first);
#endif
list_script_vars();
list_func_vars();
list_vim_vars();
list_script_vars(&first);
list_func_vars(&first);
list_vim_vars(&first);
}
eap->nextcmd = check_nextcmd(arg);
}
@@ -1932,10 +1933,11 @@ skip_var_one(arg)
* If "empty" is TRUE also list NULL strings as empty strings.
*/
static void
list_hashtable_vars(ht, prefix, empty)
list_hashtable_vars(ht, prefix, empty, first)
hashtab_T *ht;
char_u *prefix;
int empty;
int *first;
{
hashitem_T *hi;
dictitem_T *di;
@@ -1950,7 +1952,7 @@ list_hashtable_vars(ht, prefix, empty)
di = HI2DI(hi);
if (empty || di->di_tv.v_type != VAR_STRING
|| di->di_tv.vval.v_string != NULL)
list_one_var(di, prefix);
list_one_var(di, prefix, first);
}
}
}
@@ -1959,32 +1961,38 @@ list_hashtable_vars(ht, prefix, empty)
* List global variables.
*/
static void
list_glob_vars()
list_glob_vars(first)
int *first;
{
list_hashtable_vars(&globvarht, (char_u *)"", TRUE);
list_hashtable_vars(&globvarht, (char_u *)"", TRUE, first);
}
/*
* List buffer variables.
*/
static void
list_buf_vars()
list_buf_vars(first)
int *first;
{
char_u numbuf[NUMBUFLEN];
list_hashtable_vars(&curbuf->b_vars.dv_hashtab, (char_u *)"b:", TRUE);
list_hashtable_vars(&curbuf->b_vars.dv_hashtab, (char_u *)"b:",
TRUE, first);
sprintf((char *)numbuf, "%ld", (long)curbuf->b_changedtick);
list_one_var_a((char_u *)"b:", (char_u *)"changedtick", VAR_NUMBER, numbuf);
list_one_var_a((char_u *)"b:", (char_u *)"changedtick", VAR_NUMBER,
numbuf, first);
}
/*
* List window variables.
*/
static void
list_win_vars()
list_win_vars(first)
int *first;
{
list_hashtable_vars(&curwin->w_vars.dv_hashtab, (char_u *)"w:", TRUE);
list_hashtable_vars(&curwin->w_vars.dv_hashtab,
(char_u *)"w:", TRUE, first);
}
#ifdef FEAT_WINDOWS
@@ -1992,9 +2000,11 @@ list_win_vars()
* List tab page variables.
*/
static void
list_tab_vars()
list_tab_vars(first)
int *first;
{
list_hashtable_vars(&curtab->tp_vars.dv_hashtab, (char_u *)"t:", TRUE);
list_hashtable_vars(&curtab->tp_vars.dv_hashtab,
(char_u *)"t:", TRUE, first);
}
#endif
@@ -2002,39 +2012,44 @@ list_tab_vars()
* List Vim variables.
*/
static void
list_vim_vars()
list_vim_vars(first)
int *first;
{
list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE);
list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE, first);
}
/*
* List script-local variables, if there is a script.
*/
static void
list_script_vars()
list_script_vars(first)
int *first;
{
if (current_SID > 0 && current_SID <= ga_scripts.ga_len)
list_hashtable_vars(&SCRIPT_VARS(current_SID), (char_u *)"s:", FALSE);
list_hashtable_vars(&SCRIPT_VARS(current_SID),
(char_u *)"s:", FALSE, first);
}
/*
* List function variables, if there is a function.
*/
static void
list_func_vars()
list_func_vars(first)
int *first;
{
if (current_funccal != NULL)
list_hashtable_vars(&current_funccal->l_vars.dv_hashtab,
(char_u *)"l:", FALSE);
(char_u *)"l:", FALSE, first);
}
/*
* List variables in "arg".
*/
static char_u *
list_arg_vars(eap, arg)
list_arg_vars(eap, arg, first)
exarg_T *eap;
char_u *arg;
int *first;
{
int error = FALSE;
int len;
@@ -2091,15 +2106,15 @@ list_arg_vars(eap, arg)
{
switch (*name)
{
case 'g': list_glob_vars(); break;
case 'b': list_buf_vars(); break;
case 'w': list_win_vars(); break;
case 'g': list_glob_vars(first); break;
case 'b': list_buf_vars(first); break;
case 'w': list_win_vars(first); break;
#ifdef FEAT_WINDOWS
case 't': list_tab_vars(); break;
case 't': list_tab_vars(first); break;
#endif
case 'v': list_vim_vars(); break;
case 's': list_script_vars(); break;
case 'l': list_func_vars(); break;
case 'v': list_vim_vars(first); break;
case 's': list_script_vars(first); break;
case 'l': list_func_vars(first); break;
default:
EMSG2(_("E738: Can't list variables for %s"), name);
}
@@ -2116,7 +2131,9 @@ list_arg_vars(eap, arg)
*arg = NUL;
list_one_var_a((char_u *)"",
arg == arg_subsc ? name : name_start,
tv.v_type, s == NULL ? (char_u *)"" : s);
tv.v_type,
s == NULL ? (char_u *)"" : s,
first);
*arg = c;
vim_free(tf);
}
@@ -18001,9 +18018,10 @@ delete_var(ht, hi)
* List the value of one internal variable.
*/
static void
list_one_var(v, prefix)
list_one_var(v, prefix, first)
dictitem_T *v;
char_u *prefix;
int *first;
{
char_u *tofree;
char_u *s;
@@ -18011,16 +18029,17 @@ list_one_var(v, prefix)
s = echo_string(&v->di_tv, &tofree, numbuf, ++current_copyID);
list_one_var_a(prefix, v->di_key, v->di_tv.v_type,
s == NULL ? (char_u *)"" : s);
s == NULL ? (char_u *)"" : s, first);
vim_free(tofree);
}
static void
list_one_var_a(prefix, name, type, string)
list_one_var_a(prefix, name, type, string, first)
char_u *prefix;
char_u *name;
int type;
char_u *string;
int *first; /* when TRUE clear rest of screen and set to FALSE */
{
/* don't use msg() or msg_attr() to avoid overwriting "v:statusmsg" */
msg_start();
@@ -18052,6 +18071,11 @@ list_one_var_a(prefix, name, type, string)
if (type == VAR_FUNC)
msg_puts((char_u *)"()");
if (*first)
{
msg_clr_eos();
*first = FALSE;
}
}
/*

View File

@@ -2974,7 +2974,7 @@ check_readonly(forceit, buf)
* 'fnum' is the number of the file, if zero use ffname/sfname.
*
* Return 1 for "normal" error, 2 for "not written" error, 0 for success
* -1 for succesfully opening another file.
* -1 for successfully opening another file.
* 'lnum' is the line number for the cursor in the new file (if non-zero).
*/
int
@@ -3584,9 +3584,20 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
curwin_init();
#ifdef FEAT_FOLDING
/* It's like all lines in the buffer changed. Need to update
* automatic folding. */
/* It's possible that all lines in the buffer changed. Need to update
* automatic folding for all windows where it's used. */
# ifdef FEAT_WINDOWS
{
win_T *win;
tabpage_T *tp;
FOR_ALL_TAB_WINDOWS(tp, win)
if (win->w_buffer == curbuf)
foldUpdateAll(win);
}
# else
foldUpdateAll(curwin);
# endif
#endif
/* Change directories when the 'acd' option is set. */
@@ -3776,7 +3787,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags)
workshop_file_opened((char *)curbuf->b_ffname, curbuf->b_p_ro);
# endif
# ifdef FEAT_NETBEANS_INTG
if (usingNetbeans & ((flags & ECMD_SET_HELP) != ECMD_SET_HELP))
if (usingNetbeans && ((flags & ECMD_SET_HELP) != ECMD_SET_HELP))
netbeans_file_opened(curbuf);
# endif
}

View File

@@ -3281,32 +3281,27 @@ set_one_cmd_context(xp, buff)
if (ea.argt & XFILE)
{
int in_quote = FALSE;
char_u *bow = NULL; /* Beginning of word */
int c;
int in_quote = FALSE;
char_u *bow = NULL; /* Beginning of word */
/*
* Allow spaces within back-quotes to count as part of the argument
* being expanded.
*/
xp->xp_pattern = skipwhite(arg);
for (p = xp->xp_pattern; *p; )
p = xp->xp_pattern;
while (*p != NUL)
{
if (*p == '\\' && p[1] != NUL)
++p;
#ifdef SPACE_IN_FILENAME
else if (vim_iswhite(*p) && (!(ea.argt & NOSPC) || usefilter))
#else
else if (vim_iswhite(*p))
#ifdef FEAT_MBYTE
if (has_mbyte)
c = mb_ptr2char(p);
else
#endif
{
p = skipwhite(p);
if (in_quote)
bow = p;
else
xp->xp_pattern = p;
--p;
}
else if (*p == '`')
c = *p;
if (c == '\\' && p[1] != NUL)
++p;
else if (c == '`')
{
if (!in_quote)
{
@@ -3315,6 +3310,37 @@ set_one_cmd_context(xp, buff)
}
in_quote = !in_quote;
}
#ifdef SPACE_IN_FILENAME
else if (!vim_isfilec_or_wc(c)
&& (!(ea.argt & NOSPC) || usefilter))
#else
else if (!vim_isfilec_or_wc(c))
#endif
{
while (*p != NUL)
{
#ifdef FEAT_MBYTE
if (has_mbyte)
c = mb_ptr2char(p);
else
#endif
c = *p;
if (c == '`' || vim_isfilec_or_wc(c))
break;
#ifdef FEAT_MBYTE
if (has_mbyte)
len = (*mb_ptr2len)(p);
else
#endif
len = 1;
mb_ptr_adv(p);
}
if (in_quote)
bow = p;
else
xp->xp_pattern = p;
p -= len;
}
mb_ptr_adv(p);
}

View File

@@ -876,7 +876,7 @@ EXTERN int Exec_reg INIT(= FALSE); /* TRUE when executing a register */
EXTERN int no_mapping INIT(= FALSE); /* currently no mapping allowed */
EXTERN int no_zero_mapping INIT(= 0); /* mapping zero not allowed */
EXTERN int allow_keys INIT(= FALSE); /* allow key codes when no_mapping
* is set */
* is set */
EXTERN int no_u_sync INIT(= 0); /* Don't call u_sync() */
EXTERN int restart_edit INIT(= 0); /* call edit when next cmd finished */
@@ -1252,6 +1252,14 @@ EXTERN guint32 gtk_socket_id INIT(= 0);
EXTERN int echo_wid_arg INIT(= FALSE); /* --echo-wid argument */
#endif
#ifdef FEAT_GUI_W32
/*
* The value of the --windowid argument.
* For embedding gvim inside another application.
*/
EXTERN int win_socket_id INIT(= 0);
#endif
#if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL)
EXTERN int typebuf_was_filled INIT(= FALSE); /* received text from client
or from feedkeys() */

View File

@@ -3149,7 +3149,7 @@ gui_mch_set_winpos(int x, int y)
/* TODO: Should make sure the window is move within range
* e.g.: y > ~16 [Menu bar], x > 0, x < screen width
*/
MoveWindow(gui.VimWindow, x, y, TRUE);
MoveWindowStructure(gui.VimWindow, x, y);
}
void
@@ -5293,7 +5293,7 @@ gui_mch_dialog(
short itemType;
short useIcon;
short width;
short totalButtonWidth = 0; /* the width of all button together
short totalButtonWidth = 0; /* the width of all buttons together
including spacing */
short widestButton = 0;
short dfltButtonEdge = 20; /* gut feeling */
@@ -5483,7 +5483,7 @@ gui_mch_dialog(
{
macMoveDialogItem(theDialog, button, buttonItm.box.left, buttonItm.box.top, &box);
/* With vertical, it's better to have all button the same lenght */
/* With vertical, it's better to have all buttons the same length */
if (vertical)
{
macSizeDialogItem(theDialog, button, widestButton, 0);
@@ -5556,7 +5556,7 @@ gui_mch_dialog(
* SetDialogTracksCursor() : Get the I-beam cursor over input box
* MoveDialogItem(): Probably better than SetDialogItem
* SizeDialogItem(): (but is it Carbon Only?)
* AutoSizeDialog(): Magic resize of dialog based on text lenght
* AutoSizeDialog(): Magic resize of dialog based on text length
*/
}
#endif /* FEAT_DIALOG_GUI */

View File

@@ -23,6 +23,8 @@
* e.g., replace LONG with LONG_PTR, etc.
*/
#include "vim.h"
/*
* These are new in Windows ME/XP, only defined in recent compilers.
*/
@@ -1432,16 +1434,29 @@ gui_mch_init(void)
}
}
else
/* Open toplevel window. */
{
/* If the provided windowid is not valid reset it to zero, so that it
* is ignored and we open our own window. */
if (IsWindow((HWND)win_socket_id) <= 0)
win_socket_id = 0;
/* Create a window. If win_socket_id is not zero without border and
* titlebar, it will be reparented below. */
s_hwnd = CreateWindow(
szVimWndClass, "Vim MSWindows GUI",
WS_OVERLAPPEDWINDOW,
gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x,
gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y,
100, /* Any value will do */
100, /* Any value will do */
NULL, NULL,
s_hinst, NULL);
szVimWndClass, "Vim MSWindows GUI",
win_socket_id == 0 ? WS_OVERLAPPEDWINDOW : WS_POPUP,
gui_win_x == -1 ? CW_USEDEFAULT : gui_win_x,
gui_win_y == -1 ? CW_USEDEFAULT : gui_win_y,
100, /* Any value will do */
100, /* Any value will do */
NULL, NULL,
s_hinst, NULL);
if (s_hwnd != NULL && win_socket_id != 0)
{
SetParent(s_hwnd, (HWND)win_socket_id);
ShowWindow(s_hwnd, SW_SHOWMAXIMIZED);
}
}
if (s_hwnd == NULL)
return FAIL;

View File

@@ -73,6 +73,8 @@ static int cs_show __ARGS((exarg_T *eap));
static csinfo_T csinfo[CSCOPE_MAX_CONNECTIONS];
static int eap_arg_len; /* length of eap->arg, set in
cs_lookup_cmd() */
static cscmd_T cs_cmds[] =
{
{ "add", cs_add,
@@ -260,14 +262,7 @@ cs_fgets(buf, size)
if ((p = cs_manage_matches(NULL, NULL, -1, Get)) == NULL)
return TRUE;
if ((int)strlen(p) > size)
{
strncpy((char *)buf, p, size - 1);
buf[size] = '\0';
}
else
(void)strcpy((char *)buf, p);
vim_strncpy(buf, (char_u *)p, size - 1);
return FALSE;
} /* cs_fgets */
@@ -386,7 +381,7 @@ cs_connection(num, dbpath, ppath)
* PRIVATE: cs_add
*
* add cscope database or a directory name (to look for cscope.out)
* the the cscope connection list
* to the cscope connection list
*
* MAXPATHL 256
*/
@@ -966,7 +961,7 @@ cs_find(eap)
}
pat = opt + strlen(opt) + 1;
if (pat == NULL || (pat != NULL && pat[0] == '\0'))
if (pat >= (char *)eap->arg + eap_arg_len)
{
cs_usage_msg(Find);
return FALSE;
@@ -1317,7 +1312,7 @@ cs_insert_filelist(fname, ppath, flags, sb)
#else
/* compare pathnames first */
&& ((fullpathcmp(csinfo[j].fname, fname, FALSE) & FPC_SAME)
/* if not Windows 9x, test index file atributes too */
/* if not Windows 9x, test index file attributes too */
|| (!mch_windows95()
&& csinfo[j].nVolume == bhfi.dwVolumeSerialNumber
&& csinfo[j].nIndexHigh == bhfi.nFileIndexHigh
@@ -1401,6 +1396,9 @@ cs_lookup_cmd(eap)
if (eap->arg == NULL)
return NULL;
/* Store length of eap->arg before it gets modified by strtok(). */
eap_arg_len = STRLEN(eap->arg);
if ((stok = strtok((char *)(eap->arg), (const char *)" ")) == NULL)
return NULL;
@@ -2195,7 +2193,7 @@ cs_reset(eap)
cs_add_common(dblist[i], pplist[i], fllist[i]);
if (p_csverbose)
{
/* dont' use smsg_attr because want to display
/* don't use smsg_attr() because we want to display the
* connection number in the same line as
* "Added cscope database..."
*/

View File

@@ -275,6 +275,7 @@ main
* -display or --display
* --server...
* --socketid
* --windowid
*/
early_arg_scan(&params);
@@ -1489,7 +1490,7 @@ parse_command_name(parmp)
* Get the name of the display, before gui_prepare() removes it from
* argv[]. Used for the xterm-clipboard display.
*
* Also find the --server... arguments and --socketid
* Also find the --server... arguments and --socketid and --windowid
*/
/*ARGSUSED*/
static void
@@ -1536,24 +1537,35 @@ early_arg_scan(parmp)
# endif
}
# endif
# ifdef FEAT_GUI_GTK
# if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
# ifdef FEAT_GUI_W32
else if (STRICMP(argv[i], "--windowid") == 0)
# else
else if (STRICMP(argv[i], "--socketid") == 0)
# endif
{
unsigned int socket_id;
unsigned int id;
int count;
if (i == argc - 1)
mainerr_arg_missing((char_u *)argv[i]);
if (STRNICMP(argv[i+1], "0x", 2) == 0)
count = sscanf(&(argv[i + 1][2]), "%x", &socket_id);
count = sscanf(&(argv[i + 1][2]), "%x", &id);
else
count = sscanf(argv[i+1], "%u", &socket_id);
count = sscanf(argv[i+1], "%u", &id);
if (count != 1)
mainerr(ME_INVALID_ARG, (char_u *)argv[i]);
else
gtk_socket_id = socket_id;
# ifdef FEAT_GUI_W32
win_socket_id = id;
# else
gtk_socket_id = id;
# endif
i++;
}
# endif
# ifdef FEAT_GUI_GTK
else if (STRICMP(argv[i], "--echo-wid") == 0)
echo_wid_arg = TRUE;
# endif
@@ -1683,8 +1695,12 @@ command_line_scan(parmp)
}
}
#endif
#ifdef FEAT_GUI_GTK
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_W32)
# ifdef FEAT_GUI_GTK
else if (STRNICMP(argv[0] + argv_idx, "socketid", 8) == 0)
# else
else if (STRNICMP(argv[0] + argv_idx, "windowid", 8) == 0)
# endif
{
/* already processed -- snatch the following arg */
if (argc > 1)
@@ -1693,6 +1709,8 @@ command_line_scan(parmp)
++argv;
}
}
#endif
#ifdef FEAT_GUI_GTK
else if (STRNICMP(argv[0] + argv_idx, "echo-wid", 8) == 0)
{
/* already processed, skip */
@@ -3120,6 +3138,7 @@ usage()
#endif
#ifdef FEAT_GUI_W32
main_msg(_("-P <parent title>\tOpen Vim inside parent application"));
main_msg(_("--windowid <HWND>\tOpen Vim inside another win32 widget"));
#endif
#ifdef FEAT_GUI_GNOME

View File

@@ -753,7 +753,8 @@ init_signal_stack()
if (signal_stack != NULL)
{
# ifdef HAVE_SIGALTSTACK
# ifdef __APPLE__
# if defined(__APPLE__) && (!defined(MAC_OS_X_VERSION_MAX_ALLOWED) \
|| MAC_OS_X_VERSION_MAX_ALLOWED <= 1040)
/* missing prototype. Adding it to osdef?.h.in doesn't work, because
* "struct sigaltstack" needs to be declared. */
extern int sigaltstack __ARGS((const struct sigaltstack *ss, struct sigaltstack *oss));
@@ -5688,7 +5689,7 @@ gpm_open()
/*
* Closes connection to gpm
* returns non-zero if connection succesfully closed
* returns non-zero if connection successfully closed
*/
static void
gpm_close()

View File

@@ -21,6 +21,7 @@ int vim_iswordc __ARGS((int c));
int vim_iswordp __ARGS((char_u *p));
int vim_iswordc_buf __ARGS((char_u *p, buf_T *buf));
int vim_isfilec __ARGS((int c));
int vim_isfilec_or_wc __ARGS((int c));
int vim_isprintc __ARGS((int c));
int vim_isprintc_strict __ARGS((int c));
int lbr_chartabsize __ARGS((unsigned char *s, colnr_T col));

View File

@@ -279,7 +279,8 @@ static int keepend_level = -1;
*/
typedef struct state_item
{
int si_idx; /* index of syntax pattern */
int si_idx; /* index of syntax pattern or
KEYWORD_IDX */
int si_id; /* highlight group ID for keywords */
int si_trans_id; /* idem, transparancy removed */
int si_m_lnum; /* lnum of the match */
@@ -837,9 +838,18 @@ syn_sync(wp, start_lnum, last_valid)
current_lnum = end_lnum;
break;
}
spp = &(SYN_ITEMS(syn_buf)[cur_si->si_idx]);
found_flags = spp->sp_flags;
found_match_idx = spp->sp_sync_idx;
if (cur_si->si_idx < 0)
{
/* Cannot happen? */
found_flags = 0;
found_match_idx = KEYWORD_IDX;
}
else
{
spp = &(SYN_ITEMS(syn_buf)[cur_si->si_idx]);
found_flags = spp->sp_flags;
found_match_idx = spp->sp_sync_idx;
}
found_current_lnum = current_lnum;
found_current_col = current_col;
found_m_endpos = cur_si->si_m_endpos;
@@ -2533,6 +2543,10 @@ update_si_attr(idx)
stateitem_T *sip = &CUR_STATE(idx);
synpat_T *spp;
/* This should not happen... */
if (sip->si_idx < 0)
return;
spp = &(SYN_ITEMS(syn_buf)[sip->si_idx]);
if (sip->si_flags & HL_MATCH)
sip->si_id = spp->sp_syn_match_id;
@@ -2648,6 +2662,10 @@ update_si_end(sip, startcol, force)
lpos_T end_endpos;
int end_idx;
/* return quickly for a keyword */
if (sip->si_idx < 0)
return;
/* Don't update when it's already done. Can be a match of an end pattern
* that started in a previous line. Watch out: can also be a "keepend"
* from a containing item. */
@@ -2760,6 +2778,10 @@ find_endpos(idx, startpos, m_endpos, hl_endpos, flagsp, end_endpos,
char_u *line;
int had_match = FALSE;
/* just in case we are invoked for a keyword */
if (idx < 0)
return;
/*
* Check for being called with a START pattern.
* Can happen with a match that continues to the next line, because it

View File

@@ -666,6 +666,30 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
92,
/**/
91,
/**/
90,
/**/
89,
/**/
88,
/**/
87,
/**/
86,
/**/
85,
/**/
84,
/**/
83,
/**/
82,
/**/
81,
/**/
80,
/**/