Compare commits

...

8 Commits

Author SHA1 Message Date
Bram Moolenaar
56f7804065 updated for version 7.3.080
Problem:    Spell doesn't work on VMS.
Solution:   Use different file names. (Zoltan Bartos, Zoltan Arpadffy)
2010-12-08 17:09:32 +01:00
Bram Moolenaar
3d27070767 updated for version 7.3.079
Problem:    Duplicate lines in makefile.
Solution:   Remove the lines. (Hong Xu)
2010-12-08 14:55:02 +01:00
Bram Moolenaar
9c52c3a0a1 updated for version 7.3.078
Problem:    Warning for unused variable.
Solution:   Adjuste #ifdefs.
2010-12-08 14:23:15 +01:00
Bram Moolenaar
2e2e13ca14 updated for version 7.3.077
Problem:    When updating crypt of swapfile fails there is no error message.
            (Carlo Teubner)
Solution:   Add the error message.
2010-12-08 13:17:03 +01:00
Bram Moolenaar
e980d8a934 updated for version 7.3.076
Problem:    Clang warnings for dead code.
Solution:   Remove it. (Carlo Teubner)
2010-12-08 13:11:21 +01:00
Bram Moolenaar
005c3c27ee updated for version 7.3.075
Problem:    Missing part of 'wildignorecase'
Solution:   Also adjust expand()
2010-12-02 21:44:40 +01:00
Bram Moolenaar
bf9680e441 updated for version 7.3.074
Problem:    Can't use the "+ register like "* for yank and put.
Solution:   Add "unnamedplus" to the 'clipboard' option. (Ivan Krasilnikov)
2010-12-02 21:43:16 +01:00
Bram Moolenaar
863053d1d4 updated for version 7.3.073
Problem:    Double free memory when netbeans command follows DETACH.
Solution:   Only free the node when owned. (Xavier de Gaye)
2010-12-02 17:09:54 +01:00
13 changed files with 137 additions and 54 deletions

View File

@@ -1434,6 +1434,15 @@ A jump table for the options with a short description can be found at |Q_op|.
explicitly accessed using the "* notation. Also see
|gui-clipboard|.
unnamedplus A variant of "unnamed" flag which uses the clipboard
register '+' (|quoteplus|) instead of register '*' for
all operations except yank. Yank shall copy the text
into register '+' and also into '*' when "unnamed" is
included.
Only available with the |+x11| feature.
Availability can be checked with: >
if has('unnamedplus')
<
autoselect Works like the 'a' flag in 'guioptions': If present,
then whenever Visual mode is started, or the Visual
area extended, Vim tries to become the owner of the

View File

@@ -380,9 +380,6 @@ MSVCVER = 10.0
!if "$(_NMAKE_VER)" == "10.00.30319.01"
MSVCVER = 10.0
!endif
!if "$(_NMAKE_VER)" == "9.00.30729.01"
MSVCVER = 9.0
!endif
!endif
# Abort bulding VIM if version of VC is unrecognised.

View File

@@ -9876,7 +9876,7 @@ f_expand(argvars, rettv)
char_u *s;
int len;
char_u *errormsg;
int flags = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND;
int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND;
expand_T xpc;
int error = FALSE;
@@ -9894,12 +9894,14 @@ f_expand(argvars, rettv)
* for 'wildignore' and don't put matches for 'suffixes' at the end. */
if (argvars[1].v_type != VAR_UNKNOWN
&& get_tv_number_chk(&argvars[1], &error))
flags |= WILD_KEEP_ALL;
options |= WILD_KEEP_ALL;
if (!error)
{
ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES;
rettv->vval.v_string = ExpandOne(&xpc, s, NULL, flags, WILD_ALL);
if (p_wic)
options += WILD_ICASE;
rettv->vval.v_string = ExpandOne(&xpc, s, NULL, options, WILD_ALL);
}
else
rettv->vval.v_string = NULL;
@@ -11672,7 +11674,7 @@ f_glob(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
int flags = WILD_SILENT|WILD_USE_NL;
int options = WILD_SILENT|WILD_USE_NL;
expand_T xpc;
int error = FALSE;
@@ -11680,14 +11682,16 @@ f_glob(argvars, rettv)
* for 'wildignore' and don't put matches for 'suffixes' at the end. */
if (argvars[1].v_type != VAR_UNKNOWN
&& get_tv_number_chk(&argvars[1], &error))
flags |= WILD_KEEP_ALL;
options |= WILD_KEEP_ALL;
rettv->v_type = VAR_STRING;
if (!error)
{
ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES;
if (p_wic)
options += WILD_ICASE;
rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]),
NULL, flags, WILD_ALL);
NULL, options, WILD_ALL);
}
else
rettv->vval.v_string = NULL;
@@ -12135,6 +12139,9 @@ f_has(argvars, rettv)
#ifdef FEAT_TOOLBAR
"toolbar",
#endif
#if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
"unnamedplus",
#endif
#ifdef FEAT_USR_CMDS
"user-commands", /* was accidentally included in 5.4 */
"user_commands",

View File

@@ -512,7 +512,11 @@ EXTERN VimClipboard clip_plus; /* CLIPBOARD selection in X11 */
# define clip_plus clip_star /* there is only one clipboard */
# define ONE_CLIPBOARD
# endif
EXTERN int clip_unnamed INIT(= FALSE);
#define CLIP_UNNAMED 1
#define CLIP_UNNAMED_PLUS 2
EXTERN int clip_unnamed INIT(= 0); /* above two values or'ed */
EXTERN int clip_autoselect INIT(= FALSE);
EXTERN int clip_autoselectml INIT(= FALSE);
EXTERN int clip_html INIT(= FALSE);

View File

@@ -1798,7 +1798,6 @@ find_replace_cb(GtkWidget *widget UNUSED, gpointer data)
char_u *repl_text;
gboolean direction_down;
SharedFindReplace *sfr;
int rc;
flags = (int)(long)data; /* avoid a lint warning here */
@@ -1824,7 +1823,7 @@ find_replace_cb(GtkWidget *widget UNUSED, gpointer data)
repl_text = CONVERT_FROM_UTF8(repl_text);
find_text = CONVERT_FROM_UTF8(find_text);
rc = gui_do_findrepl(flags, find_text, repl_text, direction_down);
gui_do_findrepl(flags, find_text, repl_text, direction_down);
CONVERT_FROM_UTF8_FREE(repl_text);
CONVERT_FROM_UTF8_FREE(find_text);
}

View File

@@ -586,9 +586,9 @@ void ex_rubydo(exarg_T *eap)
if (u_save(eap->line1 - 1, eap->line2 + 1) != OK)
return;
for (i = eap->line1; i <= eap->line2; i++) {
VALUE line, oldline;
VALUE line;
line = oldline = vim_str2rb_enc_str((char *)ml_get(i));
line = vim_str2rb_enc_str((char *)ml_get(i));
rb_lastline_set(line);
eval_enc_string_protect((char *) eap->arg, &state);
if (state) {

View File

@@ -582,6 +582,9 @@ ml_set_crypt_key(buf, old_key, old_cm)
idx = ip->ip_index + 1; /* go to next index */
page_count = 1;
}
if (error > 0)
EMSG(_("E843: Error while updating swap file crypt"));
}
mfp->mf_old_key = NULL;
@@ -2384,7 +2387,7 @@ theend:
* Make a copy of the line if necessary.
*/
/*
* get a pointer to a (read-only copy of a) line
* Return a pointer to a (read-only copy of a) line.
*
* On failure an error message is given and IObuff is returned (to avoid
* having to check for error everywhere).
@@ -2397,7 +2400,7 @@ ml_get(lnum)
}
/*
* ml_get_pos: get pointer to position 'pos'
* Return pointer to position "pos".
*/
char_u *
ml_get_pos(pos)
@@ -2407,7 +2410,7 @@ ml_get_pos(pos)
}
/*
* ml_get_curline: get pointer to cursor line.
* Return pointer to cursor line.
*/
char_u *
ml_get_curline()
@@ -2416,7 +2419,7 @@ ml_get_curline()
}
/*
* ml_get_cursor: get pointer to cursor position
* Return pointer to cursor position.
*/
char_u *
ml_get_cursor()
@@ -2426,7 +2429,7 @@ ml_get_cursor()
}
/*
* get a pointer to a line in a specific buffer
* Return a pointer to a line in a specific buffer
*
* "will_change": if TRUE mark the buffer dirty (chars in the line will be
* changed)

View File

@@ -200,7 +200,6 @@ coladvance2(pos, addspaces, finetune, wcol)
}
#endif
idx = -1;
ptr = line;
while (col <= wcol && *ptr != NUL)
{
@@ -1223,7 +1222,7 @@ free_all_mem()
#endif
/*
* copy a string into newly allocated memory
* Copy "string" into newly allocated memory.
*/
char_u *
vim_strsave(string)
@@ -1239,6 +1238,12 @@ vim_strsave(string)
return p;
}
/*
* Copy up to "len" bytes of "string" into newly allocated memory and
* terminate with a NUL.
* The allocated memory always has size "len + 1", also when "string" is
* shorter.
*/
char_u *
vim_strnsave(string, len)
char_u *string;

View File

@@ -643,6 +643,7 @@ netbeans_parse_messages(void)
{
char_u *p;
queue_T *node;
int own_node;
while (head.next != NULL && head.next != &head)
{
@@ -681,20 +682,25 @@ netbeans_parse_messages(void)
*p++ = NUL;
if (*p == NUL)
{
own_node = TRUE;
head.next = node->next;
node->next->prev = node->prev;
}
else
own_node = FALSE;
/* now, parse and execute the commands */
nb_parse_cmd(node->buffer);
if (*p == NUL)
if (own_node)
{
/* buffer finished, dispose of the node and buffer */
vim_free(node->buffer);
vim_free(node);
}
else
/* Check that "head" wasn't changed under our fingers, e.g. when a
* DETACH command was handled. */
else if (head.next == node)
{
/* more follows, move to the start */
STRMOVE(node->buffer, p);
@@ -954,7 +960,6 @@ nb_free()
keyQ_T *key_node = keyHead.next;
queue_T *cmd_node = head.next;
nbbuf_T buf;
buf_T *bufp;
int i;
/* free the netbeans buffer list */
@@ -963,7 +968,7 @@ nb_free()
buf = buf_list[i];
vim_free(buf.displayname);
vim_free(buf.signmap);
if ((bufp=buf.bufp) != NULL)
if (buf.bufp != NULL)
{
buf.bufp->b_netbeans_file = FALSE;
buf.bufp->b_was_netbeans_file = FALSE;

View File

@@ -1584,9 +1584,11 @@ cmdline_paste_reg(regname, literally, remcr)
adjust_clip_reg(rp)
int *rp;
{
/* If no reg. specified, and "unnamed" is in 'clipboard', use '*' reg. */
if (*rp == 0 && clip_unnamed)
*rp = '*';
/* If no reg. specified, and "unnamed" or "unnamedplus" is in 'clipboard',
* use '*' or '+' reg, respectively. "unnamedplus" prevails. */
if (*rp == 0 && clip_unnamed != 0)
*rp = ((clip_unnamed & CLIP_UNNAMED_PLUS) && clip_plus.available)
? '+' : '*';
if (!clip_star.available && *rp == '*')
*rp = 0;
if (!clip_plus.available && *rp == '+')
@@ -2842,6 +2844,9 @@ op_yank(oap, deleting, mess)
char_u *p;
char_u *pnew;
struct block_def bd;
#if defined(FEAT_CLIPBOARD) && defined(FEAT_X11)
int did_star = FALSE;
#endif
/* check for read-only register */
if (oap->regname != 0 && !valid_yank_reg(oap->regname, TRUE))
@@ -3115,7 +3120,8 @@ op_yank(oap, deleting, mess)
*/
if (clip_star.available
&& (curr == &(y_regs[STAR_REGISTER])
|| (!deleting && oap->regname == 0 && clip_unnamed)))
|| (!deleting && oap->regname == 0
&& (clip_unnamed & CLIP_UNNAMED))))
{
if (curr != &(y_regs[STAR_REGISTER]))
/* Copy the text from register 0 to the clipboard register. */
@@ -3123,6 +3129,9 @@ op_yank(oap, deleting, mess)
clip_own_selection(&clip_star);
clip_gen_set_selection(&clip_star);
# ifdef FEAT_X11
did_star = TRUE;
# endif
}
# ifdef FEAT_X11
@@ -3130,12 +3139,19 @@ op_yank(oap, deleting, mess)
* If we were yanking to the '+' register, send result to selection.
* Also copy to the '*' register, in case auto-select is off.
*/
else if (clip_plus.available && curr == &(y_regs[PLUS_REGISTER]))
if (clip_plus.available
&& (curr == &(y_regs[PLUS_REGISTER])
|| (!deleting && oap->regname == 0
&& (clip_unnamed & CLIP_UNNAMED_PLUS))))
{
if (curr != &(y_regs[PLUS_REGISTER]))
/* Copy the text from register 0 to the clipboard register. */
copy_yank_reg(&(y_regs[PLUS_REGISTER]));
/* No need to copy to * register upon 'unnamed' now - see below */
clip_own_selection(&clip_plus);
clip_gen_set_selection(&clip_plus);
if (!clip_isautosel())
if (!clip_isautosel() && !did_star)
{
copy_yank_reg(&(y_regs[STAR_REGISTER]));
clip_own_selection(&clip_star);

View File

@@ -7307,7 +7307,7 @@ check_stl_option(s)
static char_u *
check_clipboard_option()
{
int new_unnamed = FALSE;
int new_unnamed = 0;
int new_autoselect = FALSE;
int new_autoselectml = FALSE;
int new_html = FALSE;
@@ -7319,9 +7319,15 @@ check_clipboard_option()
{
if (STRNCMP(p, "unnamed", 7) == 0 && (p[7] == ',' || p[7] == NUL))
{
new_unnamed = TRUE;
new_unnamed |= CLIP_UNNAMED;
p += 7;
}
else if (STRNCMP(p, "unnamedplus", 11) == 0
&& (p[11] == ',' || p[11] == NUL))
{
new_unnamed |= CLIP_UNNAMED_PLUS;
p += 11;
}
else if (STRNCMP(p, "autoselect", 10) == 0
&& (p[10] == ',' || p[10] == NUL))
{

View File

@@ -327,6 +327,16 @@ typedef int idx_T;
typedef long idx_T;
#endif
#ifdef VMS
# define SPL_FNAME_TMPL "%s_%s.spl"
# define SPL_FNAME_ADD "_add."
# define SPL_FNAME_ASCII "_ascii."
#else
# define SPL_FNAME_TMPL "%s.%s.spl"
# define SPL_FNAME_ADD ".add."
# define SPL_FNAME_ASCII ".ascii."
#endif
/* Flags used for a word. Only the lowest byte can be used, the region byte
* comes above it. */
#define WF_REGION 0x01 /* region byte follows */
@@ -2471,14 +2481,24 @@ spell_load_lang(lang)
* Find the first spell file for "lang" in 'runtimepath' and load it.
*/
vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
"spell/%s.%s.spl", lang, spell_enc());
#ifdef VMS
"spell/%s_%s.spl",
#else
"spell/%s.%s.spl",
#endif
lang, spell_enc());
r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
if (r == FAIL && *sl.sl_lang != NUL)
{
/* Try loading the ASCII version. */
vim_snprintf((char *)fname_enc, sizeof(fname_enc) - 5,
"spell/%s.ascii.spl", lang);
#ifdef VMS
"spell/%s_ascii.spl",
#else
"spell/%s.ascii.spl",
#endif
lang);
r = do_in_runtimepath(fname_enc, FALSE, spell_load_cb, &sl);
#ifdef FEAT_AUTOCMD
@@ -2496,7 +2516,12 @@ spell_load_lang(lang)
if (r == FAIL)
{
smsg((char_u *)_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
smsg((char_u *)
#ifdef VMS
_("Warning: Cannot find word list \"%s_%s.spl\" or \"%s_ascii.spl\""),
#else
_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
#endif
lang, spell_enc(), lang);
}
else if (sl.sl_slang != NULL)
@@ -2530,7 +2555,7 @@ spell_enc()
int_wordlist_spl(fname)
char_u *fname;
{
vim_snprintf((char *)fname, MAXPATHL, "%s.%s.spl",
vim_snprintf((char *)fname, MAXPATHL, SPL_FNAME_TMPL,
int_wordlist, spell_enc());
}
@@ -2785,8 +2810,8 @@ spell_load_file(fname, lang, old_lp, silent)
if (lp->sl_fname == NULL)
goto endFAIL;
/* Check for .add.spl. */
lp->sl_add = strstr((char *)gettail(fname), ".add.") != NULL;
/* Check for .add.spl (_add.spl for VMS). */
lp->sl_add = strstr((char *)gettail(fname), SPL_FNAME_ADD) != NULL;
}
else
lp = old_lp;
@@ -9109,8 +9134,8 @@ mkspell(fcount, fnames, ascii, overwrite, added_word)
/* For ":mkspell path/vim" output file is "path/vim.latin1.spl". */
innames = &fnames[0];
incount = 1;
vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0],
spin.si_ascii ? (char_u *)"ascii" : spell_enc());
vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL,
fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc());
}
else if (len > 4 && STRCMP(fnames[0] + len - 4, ".spl") == 0)
{
@@ -9119,15 +9144,15 @@ mkspell(fcount, fnames, ascii, overwrite, added_word)
}
else
/* Name should be language, make the file name from it. */
vim_snprintf((char *)wfname, sizeof(wfname), "%s.%s.spl", fnames[0],
spin.si_ascii ? (char_u *)"ascii" : spell_enc());
vim_snprintf((char *)wfname, sizeof(wfname), SPL_FNAME_TMPL,
fnames[0], spin.si_ascii ? (char_u *)"ascii" : spell_enc());
/* Check for .ascii.spl. */
if (strstr((char *)gettail(wfname), ".ascii.") != NULL)
if (strstr((char *)gettail(wfname), SPL_FNAME_ASCII) != NULL)
spin.si_ascii = TRUE;
/* Check for .add.spl. */
if (strstr((char *)gettail(wfname), ".add.") != NULL)
if (strstr((char *)gettail(wfname), SPL_FNAME_ADD) != NULL)
spin.si_add = TRUE;
}
@@ -9839,10 +9864,7 @@ spell_iswordp(p, wp)
{
/* be quick for ASCII */
if (wp->w_s->b_spell_ismw[*p])
{
s = p + 1; /* skip a mid-word character */
l = MB_BYTE2LEN(*s);
}
}
else
{
@@ -9850,10 +9872,7 @@ spell_iswordp(p, wp)
if (c < 256 ? wp->w_s->b_spell_ismw[c]
: (wp->w_s->b_spell_ismw_mb != NULL
&& vim_strchr(wp->w_s->b_spell_ismw_mb, c) != NULL))
{
s = p + l;
l = MB_BYTE2LEN(*s);
}
}
c = mb_ptr2char(s);
@@ -13813,11 +13832,8 @@ add_suggestion(su, gap, goodword, badlenarg, score, altscore, had_bonus,
su->su_sfmaxscore = cleanup_suggestions(gap,
su->su_sfmaxscore, SUG_CLEAN_COUNT(su));
else
{
i = su->su_maxscore;
su->su_maxscore = cleanup_suggestions(gap,
su->su_maxscore, SUG_CLEAN_COUNT(su));
}
}
}
}

View File

@@ -714,6 +714,22 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
80,
/**/
79,
/**/
78,
/**/
77,
/**/
76,
/**/
75,
/**/
74,
/**/
73,
/**/
72,
/**/