Compare commits

...

9 Commits

Author SHA1 Message Date
Bram Moolenaar
94ba1ce055 updated for version 7.2-159 2009-04-22 15:53:09 +00:00
Bram Moolenaar
92a990ba84 updated for version 7.2-158 2009-04-22 15:45:05 +00:00
Bram Moolenaar
fe81d45db4 updated for version 7.2-157 2009-04-22 14:44:41 +00:00
Bram Moolenaar
7bfef80fab updated for version 7.2-156 2009-04-22 14:25:01 +00:00
Bram Moolenaar
69f2d5a9ac updated for version 7.2-155 2009-04-22 14:10:39 +00:00
Bram Moolenaar
12c22cee34 updated for version 7.2-154 2009-04-22 13:58:46 +00:00
Bram Moolenaar
9439cdddf7 updated for version 7.2-153 2009-04-22 13:39:36 +00:00
Bram Moolenaar
77ab2801c7 updated for version 7.2-152 2009-04-22 12:44:48 +00:00
Bram Moolenaar
b9c1e96ce1 updated for version 7.2-151 2009-04-22 11:52:33 +00:00
13 changed files with 85 additions and 30 deletions

2
src/auto/configure vendored
View File

@@ -15519,7 +15519,7 @@ fi
if test "$enable_multibyte" = "yes"; then
cflags_save=$CFLAGS
ldflags_save=$LDFLAGS
if test -n "$x_includes" ; then
if test "x$x_includes" != "xNONE" ; then
CFLAGS="$CFLAGS -I$x_includes"
LDFLAGS="$X_LIBS $LDFLAGS -lX11"
{ $as_echo "$as_me:$LINENO: checking whether X_LOCALE needed" >&5

View File

@@ -2952,7 +2952,7 @@ dnl Check if X_LOCALE should be defined.
if test "$enable_multibyte" = "yes"; then
cflags_save=$CFLAGS
ldflags_save=$LDFLAGS
if test -n "$x_includes" ; then
if test "x$x_includes" != "xNONE" ; then
CFLAGS="$CFLAGS -I$x_includes"
LDFLAGS="$X_LIBS $LDFLAGS -lX11"
AC_MSG_CHECKING(whether X_LOCALE needed)

View File

@@ -19720,6 +19720,7 @@ ex_function(eap)
list_func_head(fp, FALSE);
}
}
vim_free(regmatch.regprog);
}
}
if (*p == '/')

View File

@@ -2699,6 +2699,11 @@ doend:
/* Restore msg_scroll, it's set by file I/O commands, even when no
* message is actually displayed. */
msg_scroll = save_msg_scroll;
/* "silent reg" or "silent echo x" inside "redir" leaves msg_col
* somewhere in the line. Put it back in the first column. */
if (redirecting())
msg_col = 0;
}
#ifdef HAVE_SANDBOX
@@ -3685,7 +3690,9 @@ set_one_cmd_context(xp, buff)
break;
#ifdef FEAT_CSCOPE
case CMD_cscope:
set_context_in_cscope_cmd(xp, arg);
case CMD_lcscope:
case CMD_scscope:
set_context_in_cscope_cmd(xp, arg, ea.cmdidx);
break;
#endif
#ifdef FEAT_LISTCMDS

View File

@@ -5686,7 +5686,7 @@ ex_history(eap)
histype1 = get_histtype(arg);
if (histype1 == -1)
{
if (STRICMP(arg, "all") == 0)
if (STRNICMP(arg, "all", STRLEN(arg)) == 0)
{
histype1 = 0;
histype2 = HIST_COUNT-1;

View File

@@ -98,6 +98,7 @@ cs_usage_msg(x)
static enum
{
EXP_CSCOPE_SUBCMD, /* expand ":cscope" sub-commands */
EXP_SCSCOPE_SUBCMD, /* expand ":scscope" sub-commands */
EXP_CSCOPE_FIND, /* expand ":cscope find" arguments */
EXP_CSCOPE_KILL /* expand ":cscope kill" arguments */
} expand_what;
@@ -112,12 +113,23 @@ get_cscope_name(xp, idx)
expand_T *xp;
int idx;
{
int current_idx;
int i;
switch (expand_what)
{
case EXP_CSCOPE_SUBCMD:
/* Complete with sub-commands of ":cscope":
* add, find, help, kill, reset, show */
return (char_u *)cs_cmds[idx].name;
case EXP_SCSCOPE_SUBCMD:
/* Complete with sub-commands of ":scscope": same sub-commands as
* ":cscope" but skip commands which don't support split windows */
for (i = 0, current_idx = 0; cs_cmds[i].name != NULL; i++)
if (cs_cmds[i].cansplit)
if (current_idx++ == idx)
break;
return (char_u *)cs_cmds[i].name;
case EXP_CSCOPE_FIND:
{
const char *query_type[] =
@@ -133,15 +145,13 @@ get_cscope_name(xp, idx)
}
case EXP_CSCOPE_KILL:
{
int i;
int current_idx = 0;
static char_u connection[2];
/* ":cscope kill" accepts connection numbers or partial names of
* the pathname of the cscope database as argument. Only complete
* with connection numbers. -1 can also be used to kill all
* connections. */
for (i = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
for (i = 0, current_idx = 0; i < CSCOPE_MAX_CONNECTIONS; i++)
{
if (csinfo[i].fname == NULL)
continue;
@@ -165,16 +175,18 @@ get_cscope_name(xp, idx)
* Handle command line completion for :cscope command.
*/
void
set_context_in_cscope_cmd(xp, arg)
set_context_in_cscope_cmd(xp, arg, cmdidx)
expand_T *xp;
char_u *arg;
cmdidx_T cmdidx;
{
char_u *p;
/* Default: expand subcommands */
xp->xp_context = EXPAND_CSCOPE;
expand_what = EXP_CSCOPE_SUBCMD;
xp->xp_pattern = arg;
expand_what = (cmdidx == CMD_scscope)
? EXP_SCSCOPE_SUBCMD : EXP_CSCOPE_SUBCMD;
/* (part of) subcommand already typed */
if (*arg != NUL)

View File

@@ -1554,10 +1554,15 @@ recover_names(fname, list, nr)
for (i = 0; i < num_files; ++i)
if (fullpathcmp(p, files[i], TRUE) & FPC_SAME)
{
/* Remove the name from files[i]. Move further entries
* down. When the array becomes empty free it here, since
* FreeWild() won't be called below. */
vim_free(files[i]);
--num_files;
for ( ; i < num_files; ++i)
files[i] = files[i + 1];
if (--num_files == 0)
vim_free(files);
else
for ( ; i < num_files; ++i)
files[i] = files[i + 1];
}
}
if (nr > 0)
@@ -3522,7 +3527,7 @@ resolve_symlink(fname, buf)
if (errno == EINVAL || errno == ENOENT)
{
/* Found non-symlink or not existing file, stop here.
* When at the first level use the unmodifed name, skip the
* When at the first level use the unmodified name, skip the
* call to vim_FullName(). */
if (depth == 1)
return FAIL;
@@ -3766,8 +3771,10 @@ do_swapexists(buf, fname)
set_vim_var_string(VV_SWAPCHOICE, NULL, -1);
/* Trigger SwapExists autocommands with <afile> set to the file being
* edited. */
* edited. Disallow changing directory here. */
++allbuf_lock;
apply_autocmds(EVENT_SWAPEXISTS, buf->b_fname, NULL, FALSE, NULL);
--allbuf_lock;
set_vim_var_string(VV_SWAPNAME, NULL, -1);
@@ -3793,6 +3800,7 @@ do_swapexists(buf, fname)
*
* Note: If BASENAMELEN is not correct, you will get error messages for
* not being able to open the swapfile
* Note: May trigger SwapExists autocmd, pointers may change!
*/
static char_u *
findswapname(buf, dirp, old_fname)
@@ -4560,7 +4568,7 @@ ml_updatechunk(buf, line, len, updtype)
buf->b_ml.ml_chunksize + curix,
(buf->b_ml.ml_usedchunks - curix) *
sizeof(chunksize_T));
/* Compute length of first half of lines in the splitted chunk */
/* Compute length of first half of lines in the split chunk */
size = 0;
linecnt = 0;
while (curline < buf->b_ml.ml_line_count

View File

@@ -3023,11 +3023,7 @@ redir_write(str, maxlen)
if (*p_vfile != NUL)
verbose_write(s, maxlen);
if (redir_fd != NULL
#ifdef FEAT_EVAL
|| redir_reg || redir_vname
#endif
)
if (redirecting())
{
/* If the string doesn't start with CR or NL, go to msg_col */
if (*s != '\n' && *s != '\r')
@@ -3074,6 +3070,16 @@ redir_write(str, maxlen)
}
}
int
redirecting()
{
return redir_fd != NULL
#ifdef FEAT_EVAL
|| redir_reg || redir_vname
#endif
;
}
/*
* Before giving verbose message.
* Must always be called paired with verbose_leave()!

View File

@@ -495,10 +495,11 @@ shift_block(oap, amount)
block_space_width = non_white_col - oap->start_vcol;
/* We will shift by "total" or "block_space_width", whichever is less.
*/
shift_amount = (block_space_width < total? block_space_width: total);
shift_amount = (block_space_width < (size_t)total
? block_space_width : (size_t)total);
/* The column to which we will shift the text. */
destination_col = non_white_col - shift_amount;
destination_col = (colnr_T)(non_white_col - shift_amount);
/* Now let's find out how much of the beginning of the line we can
* reuse without modification. */

View File

@@ -1,6 +1,6 @@
/* if_cscope.c */
char_u *get_cscope_name __ARGS((expand_T *xp, int idx));
void set_context_in_cscope_cmd __ARGS((expand_T *xp, char_u *arg));
void set_context_in_cscope_cmd __ARGS((expand_T *xp, char_u *arg, cmdidx_T cmdidx));
void do_cscope __ARGS((exarg_T *eap));
void do_scscope __ARGS((exarg_T *eap));
void do_cstag __ARGS((exarg_T *eap));

View File

@@ -54,6 +54,7 @@ void msg_clr_eos_force __ARGS((void));
void msg_clr_cmdline __ARGS((void));
int msg_end __ARGS((void));
void msg_check __ARGS((void));
int redirecting __ARGS((void));
void verbose_enter __ARGS((void));
void verbose_leave __ARGS((void));
void verbose_enter_scroll __ARGS((void));

View File

@@ -2327,8 +2327,8 @@ findmatchlimit(oap, initc, flags, maxtravel)
for (col = pos.col; check_prevcol(linep, col, '\\', &col);)
bslcnt++;
}
/* Only accept a match when 'M' is in 'cpo' or when ecaping is
* what we expect. */
/* Only accept a match when 'M' is in 'cpo' or when escaping
* is what we expect. */
if (cpo_bsl || (bslcnt & 1) == match_escaped)
{
if (c == initc)
@@ -4663,7 +4663,7 @@ find_pattern_in_path(ptr, dir, len, whole, skip_comments,
msg_putchar('\n'); /* cursor below last one */
if (!got_int) /* don't display if 'q'
typed at "--more--"
mesage */
message */
{
msg_home_replace_hl(new_fname);
MSG_PUTS(_(" (includes previously listed match)"));
@@ -4975,7 +4975,7 @@ search_line:
|| IObuff[i-2] == '!'))))
IObuff[i++] = ' ';
}
/* copy as much as posible of the new word */
/* copy as much as possible of the new word */
if (p - aux >= IOSIZE - i)
p = aux + IOSIZE - i - 1;
STRNCPY(IObuff + i, aux, p - aux);
@@ -5010,7 +5010,7 @@ search_line:
if (did_show)
msg_putchar('\n'); /* cursor below last one */
if (!got_int) /* don't display if 'q' typed
at "--more--" mesage */
at "--more--" message */
msg_home_replace_hl(curr_fname);
prev_fname = curr_fname;
}
@@ -5092,7 +5092,7 @@ search_line:
}
if (action != ACTION_SHOW)
{
curwin->w_cursor.col = (colnr_T) (startp - line);
curwin->w_cursor.col = (colnr_T)(startp - line);
curwin->w_set_curswant = TRUE;
}
@@ -5119,7 +5119,8 @@ exit_matched:
&& action == ACTION_EXPAND
&& !(compl_cont_status & CONT_SOL)
#endif
&& *(p = startp + 1))
&& *startp != NUL
&& *(p = startp + 1) != NUL)
goto search_line;
}
line_breakcheck();

View File

@@ -676,6 +676,24 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
159,
/**/
158,
/**/
157,
/**/
156,
/**/
155,
/**/
154,
/**/
153,
/**/
152,
/**/
151,
/**/
150,
/**/