Compare commits

...

5 Commits

Author SHA1 Message Date
863b53b72e updated for version 7.0-183 2007-01-14 14:28:34 +00:00
89ed3dfd87 updated for version 7.0-182 2007-01-09 19:23:12 +00:00
9460b9d215 updated for version 7.0-181 2007-01-09 14:37:01 +00:00
d675e2c513 updated for version 7.0-180 2007-01-09 14:09:25 +00:00
df88dda91c updated for version 7.0-179 2007-01-09 13:34:50 +00:00
8 changed files with 68 additions and 34 deletions

View File

@ -384,7 +384,7 @@ endif
" Programming menu
if !exists("g:ctags_command")
if has("vms")
let g:ctags_command = "mc vim:ctags ."
let g:ctags_command = "mc vim:ctags *.*"
else
let g:ctags_command = "ctags -R ."
endif

View File

@ -898,6 +898,7 @@ set_internal_string_var(name, value)
}
static lval_T *redir_lval = NULL;
static garray_T redir_ga; /* only valid when redir_lval is not NULL */
static char_u *redir_endp = NULL;
static char_u *redir_varname = NULL;
@ -932,6 +933,9 @@ var_redir_start(name, append)
return FAIL;
}
/* The output is stored in growarray "redir_ga" until redirection ends. */
ga_init2(&redir_ga, (int)sizeof(char), 500);
/* Parse the variable name (can be a dict or list entry). */
redir_endp = get_lval(redir_varname, NULL, redir_lval, FALSE, FALSE, FALSE,
FNE_CHECK_START);
@ -974,42 +978,36 @@ var_redir_start(name, append)
}
/*
* Append "value[len]" to the variable set by var_redir_start().
* Append "value[value_len]" to the variable set by var_redir_start().
* The actual appending is postponed until redirection ends, because the value
* appended may in fact be the string we write to, changing it may cause freed
* memory to be used:
* :redir => foo
* :let foo
* :redir END
*/
void
var_redir_str(value, len)
var_redir_str(value, value_len)
char_u *value;
int len;
int value_len;
{
char_u *val;
typval_T tv;
int save_emsg;
int err;
size_t len;
if (redir_lval == NULL)
return;
if (len == -1)
/* Append the entire string */
val = vim_strsave(value);
if (value_len == -1)
len = STRLEN(value); /* Append the entire string */
else
/* Append only the specified number of characters */
val = vim_strnsave(value, len);
if (val == NULL)
return;
len = value_len; /* Append only "value_len" characters */
tv.v_type = VAR_STRING;
tv.vval.v_string = val;
save_emsg = did_emsg;
did_emsg = FALSE;
set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)".");
err = did_emsg;
did_emsg |= save_emsg;
if (err)
if (ga_grow(&redir_ga, (int)len) == OK)
{
mch_memmove((char *)redir_ga.ga_data + redir_ga.ga_len, value, len);
redir_ga.ga_len += len;
}
else
var_redir_stop();
vim_free(tv.vval.v_string);
}
/*
@ -1018,8 +1016,19 @@ var_redir_str(value, len)
void
var_redir_stop()
{
typval_T tv;
if (redir_lval != NULL)
{
/* Append the trailing NUL. */
ga_append(&redir_ga, NUL);
/* Assign the text to the variable. */
tv.v_type = VAR_STRING;
tv.vval.v_string = redir_ga.ga_data;
set_var_lval(redir_lval, redir_endp, &tv, FALSE, (char_u *)".");
vim_free(tv.vval.v_string);
clear_lval(redir_lval);
vim_free(redir_lval);
redir_lval = NULL;

View File

@ -6178,8 +6178,8 @@ move_lines(frombuf, tobuf)
if (retval != FAIL)
{
curbuf = frombuf;
while (!bufempty())
if (ml_delete(curbuf->b_ml.ml_line_count, FALSE) == FAIL)
for (lnum = curbuf->b_ml.ml_line_count; lnum > 0; --lnum)
if (ml_delete(lnum, FALSE) == FAIL)
{
/* Oops! We could try putting back the saved lines, but that
* might fail again... */

View File

@ -1092,6 +1092,7 @@ extern char_u *all_cflags;
extern char_u *all_lflags;
# ifdef VMS
extern char_u *compiler_version;
extern char_u *compiled_arch;
# endif
extern char_u *compiled_user;
extern char_u *compiled_sys;

View File

@ -1329,8 +1329,11 @@ theend:
mf_put(mfp, hp, FALSE, FALSE);
mf_close(mfp, FALSE); /* will also vim_free(mfp->mf_fname) */
}
vim_free(buf->b_ml.ml_stack);
vim_free(buf);
if (buf != NULL)
{
vim_free(buf->b_ml.ml_stack);
vim_free(buf);
}
if (serious_error && called_from_main)
ml_close(curbuf, TRUE);
#ifdef FEAT_AUTOCMD
@ -3569,8 +3572,9 @@ makeswapname(fname, ffname, buf, dir_name)
#else
(buf->b_p_sn || buf->b_shortname),
#endif
#ifdef RISCOS
/* Avoid problems if fname has special chars, eg <Wimp$Scrap> */
#if defined(VMS) || defined(RISCOS)
/* Avoid problems if fname has special chars, eg <Wimp$Scrap>.
* For VMS always use full path for swapfile. */
ffname,
#else
# ifdef HAVE_READLINK

View File

@ -2221,7 +2221,6 @@ mch_FullName(fname, buf, len, force)
* behaviour should be avoided for the existing files and we need to find
* the exact path of the edited file.
*/
if (force || !mch_isFullName(fname))
{
char_u *fixed_fname = vms_fixfilename(fname);
int fd = mch_open((char *)fixed_fname, O_RDONLY | O_EXTRA, 0);

View File

@ -341,11 +341,15 @@ u_savecommon(top, bot, newbot)
uhp->uh_alt_next = old_curhead;
if (old_curhead != NULL)
{
uhp->uh_alt_prev = old_curhead->uh_alt_prev;
if (uhp->uh_alt_prev != NULL)
uhp->uh_alt_prev->uh_alt_next = uhp;
old_curhead->uh_alt_prev = uhp;
if (curbuf->b_u_oldhead == old_curhead)
curbuf->b_u_oldhead = uhp;
}
uhp->uh_alt_prev = NULL;
else
uhp->uh_alt_prev = NULL;
if (curbuf->b_u_newhead != NULL)
curbuf->b_u_newhead->uh_prev = uhp;
@ -856,6 +860,11 @@ undo_time(step, sec, absolute)
uhp = curbuf->b_u_curhead;
while (uhp != NULL)
{
/* Go back to the first branch with a mark. */
while (uhp->uh_alt_prev != NULL
&& uhp->uh_alt_prev->uh_walk == mark)
uhp = uhp->uh_alt_prev;
/* Find the last branch with a mark, that's the one. */
last = uhp;
while (last->uh_alt_next != NULL
@ -865,6 +874,8 @@ undo_time(step, sec, absolute)
{
/* Make the used branch the first entry in the list of
* alternatives to make "u" and CTRL-R take this branch. */
while (uhp->uh_alt_prev != NULL)
uhp = uhp->uh_alt_prev;
if (last->uh_alt_next != NULL)
last->uh_alt_next->uh_alt_prev = last->uh_alt_prev;
last->uh_alt_prev->uh_alt_next = last->uh_alt_next;

View File

@ -666,6 +666,16 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
183,
/**/
182,
/**/
181,
/**/
180,
/**/
179,
/**/
178,
/**/