Compare commits

...

12 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
Bram Moolenaar
94950a9ee0 updated for version 7.3.072
Problem:    Can't complete file names while ignoring case.
Solution:   Add 'wildignorecase'.
2010-12-02 16:01:29 +01:00
Bram Moolenaar
4161dccada updated for version 7.3.071
Problem:    Editing a file in a window that's in diff mode resets 'diff'
            but not cursor binding.
Solution:   Reset cursor binding in two more places.
2010-12-02 15:33:21 +01:00
Bram Moolenaar
d4ddfafc2a updated for version 7.3.070
Problem:    Can set environment variables in the sandbox, could be abused.
Solution:   Disallow it.
2010-12-02 14:48:14 +01:00
Bram Moolenaar
df6b11e955 updated for version 7.3.069
Problem:    GTK: pressing Enter in inputdialog() doesn't work like clicking OK
            as documented.
Solution:   call gtk_entry_set_activates_default(). (Britton Kerin)
2010-11-24 18:48:12 +01:00
19 changed files with 196 additions and 65 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
@@ -7752,6 +7761,17 @@ A jump table for the options with a short description can be found at |Q_op|.
a pattern from the list. This avoids problems when a future version
uses another default.
*'wildignorecase* *'wic'* *'nowildignorecase* *'nowic'*
'wildignorecase' 'wic' boolean (default off)
global
{not in Vi}
When set case is ignored when completing file names and directories.
Has no effect on systems where file name case is generally ignored.
Does not apply when the shell is used to expand wildcards, which
happens when there are special characters.
*'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
'wildmenu' 'wmnu' boolean (default off)
global

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

@@ -2326,7 +2326,7 @@ ex_let_one(arg, tv, copy, endchars, op)
else if (endchars != NULL
&& vim_strchr(endchars, *skipwhite(arg)) == NULL)
EMSG(_(e_letunexp));
else
else if (!check_secure())
{
c1 = name[len];
name[len] = NUL;
@@ -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

@@ -4524,12 +4524,14 @@ expand_filename(eap, cmdlinep, errormsgp)
else /* n == 2 */
{
expand_T xpc;
int options = WILD_LIST_NOTFOUND|WILD_ADD_SLASH;
ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES;
if (p_wic)
options += WILD_ICASE;
p = ExpandOne(&xpc, eap->arg, NULL,
WILD_LIST_NOTFOUND|WILD_ADD_SLASH,
WILD_EXPAND_FREE);
options, WILD_EXPAND_FREE);
if (p == NULL)
return FAIL;
}

View File

@@ -3339,10 +3339,14 @@ nextwild(xp, type, options)
p2 = NULL;
else
{
int use_options = options |
WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE;
if (p_wic)
use_options += WILD_ICASE;
p2 = ExpandOne(xp, p1,
vim_strnsave(&ccline.cmdbuff[i], xp->xp_pattern_len),
WILD_HOME_REPLACE|WILD_ADD_SLASH|WILD_SILENT|WILD_ESCAPE
|options, type);
use_options, type);
vim_free(p1);
/* longest match: make sure it is not shorter, happens with :help */
if (p2 != NULL && type == WILD_LONGEST)
@@ -3428,6 +3432,7 @@ nextwild(xp, type, options)
* options = WILD_KEEP_ALL: don't remove 'wildignore' entries
* options = WILD_SILENT: don't print warning messages
* options = WILD_ESCAPE: put backslash before special chars
* options = WILD_ICASE: ignore case for files
*
* The variables xp->xp_context and xp->xp_backslash must have been set!
*/
@@ -4361,6 +4366,7 @@ expand_cmdline(xp, str, col, matchcount, matches)
char_u ***matches; /* return: array of pointers to matches */
{
char_u *file_str = NULL;
int options = WILD_ADD_SLASH|WILD_SILENT;
if (xp->xp_context == EXPAND_UNSUCCESSFUL)
{
@@ -4379,9 +4385,11 @@ expand_cmdline(xp, str, col, matchcount, matches)
if (file_str == NULL)
return EXPAND_UNSUCCESSFUL;
if (p_wic)
options += WILD_ICASE;
/* find all files that match the description */
if (ExpandFromContext(xp, file_str, matchcount, matches,
WILD_ADD_SLASH|WILD_SILENT) == FAIL)
if (ExpandFromContext(xp, file_str, matchcount, matches, options) == FAIL)
{
*matchcount = 0;
*matches = NULL;
@@ -4433,7 +4441,7 @@ ExpandFromContext(xp, pat, num_file, file, options)
char_u *pat;
int *num_file;
char_u ***file;
int options;
int options; /* EW_ flags */
{
#ifdef FEAT_CMDL_COMPL
regmatch_T regmatch;
@@ -4487,6 +4495,9 @@ ExpandFromContext(xp, pat, num_file, file, options)
flags |= (EW_FILE | EW_PATH);
else
flags = (flags | EW_DIR) & ~EW_FILE;
if (options & WILD_ICASE)
flags |= EW_ICASE;
/* Expand wildcards, supporting %:h and the like. */
ret = expand_wildcards_eval(&pat, num_file, file, flags);
if (free_pat)

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

@@ -1287,6 +1287,9 @@ gui_mch_dialog(int type, /* type of dialog */
entry = gtk_entry_new();
gtk_widget_show(entry);
/* Make Enter work like pressing OK. */
gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
text = CONVERT_TO_UTF8(textfield);
gtk_entry_set_text(GTK_ENTRY(entry), (const char *)text);
CONVERT_TO_UTF8_FREE(text);
@@ -1795,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 */
@@ -1821,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

@@ -9161,7 +9161,10 @@ unix_expandpath(gap, path, wildoff, flags, didstar)
#ifdef CASE_INSENSITIVE_FILENAME
regmatch.rm_ic = TRUE; /* Behave like Terminal.app */
#else
regmatch.rm_ic = FALSE; /* Don't ever ignore case */
if (flags & EW_ICASE)
regmatch.rm_ic = TRUE; /* 'wildignorecase' set */
else
regmatch.rm_ic = FALSE; /* Don't ignore case */
#endif
regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
vim_free(pat);
@@ -9643,7 +9646,7 @@ expand_in_path(gap, pattern, flags)
if (paths == NULL)
return 0;
files = globpath(paths, pattern, 0);
files = globpath(paths, pattern, (flags & EW_ICASE) ? WILD_ICASE : 0);
vim_free(paths);
if (files == NULL)
return 0;

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

@@ -2740,7 +2740,7 @@ static struct vimoption
(char_u *)&p_wc, PV_NONE,
{(char_u *)(long)Ctrl_E, (char_u *)(long)TAB}
SCRIPTID_INIT},
{"wildcharm", "wcm", P_NUM|P_VI_DEF,
{"wildcharm", "wcm", P_NUM|P_VI_DEF,
(char_u *)&p_wcm, PV_NONE,
{(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
{"wildignore", "wig", P_STRING|P_VI_DEF|P_COMMA|P_NODUP,
@@ -2750,6 +2750,9 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
{"wildignorecase", "wic", P_BOOL|P_VI_DEF,
(char_u *)&p_wic, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"wildmenu", "wmnu", P_BOOL|P_VI_DEF,
#ifdef FEAT_WILDMENU
(char_u *)&p_wmnu, PV_NONE,
@@ -7304,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;
@@ -7316,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))
{
@@ -9756,6 +9765,9 @@ copy_winopt(from, to)
#ifdef FEAT_SCROLLBIND
to->wo_scb = from->wo_scb;
#endif
#ifdef FEAT_CURSORBIND
to->wo_crb = from->wo_crb;
#endif
#ifdef FEAT_SPELL
to->wo_spell = from->wo_spell;
#endif

View File

@@ -872,6 +872,7 @@ EXTERN int p_wiv; /* 'weirdinvert' */
EXTERN char_u *p_ww; /* 'whichwrap' */
EXTERN long p_wc; /* 'wildchar' */
EXTERN long p_wcm; /* 'wildcharm' */
EXTERN long p_wic; /* 'wildignorecase' */
EXTERN char_u *p_wim; /* 'wildmode' */
#ifdef FEAT_WILDMENU
EXTERN int p_wmnu; /* 'wildmenu' */

View File

@@ -2359,6 +2359,7 @@ ex_copen(eap)
set_option_value((char_u *)"bt", 0L, (char_u *)"quickfix",
OPT_LOCAL);
set_option_value((char_u *)"bh", 0L, (char_u *)"wipe", OPT_LOCAL);
RESET_BINDING(curwin);
#ifdef FEAT_DIFF
curwin->w_p_diff = FALSE;
#endif

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,30 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
80,
/**/
79,
/**/
78,
/**/
77,
/**/
76,
/**/
75,
/**/
74,
/**/
73,
/**/
72,
/**/
71,
/**/
70,
/**/
69,
/**/
68,
/**/

View File

@@ -798,6 +798,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
#define WILD_KEEP_ALL 32
#define WILD_SILENT 64
#define WILD_ESCAPE 128
#define WILD_ICASE 256
/* Flags for expand_wildcards() */
#define EW_DIR 0x01 /* include directory names */
@@ -808,6 +809,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
#define EW_SILENT 0x20 /* don't print "1 returned" from shell */
#define EW_EXEC 0x40 /* executable files */
#define EW_PATH 0x80 /* search in 'path' too */
#define EW_ICASE 0x100 /* ignore case */
/* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
* is used when executing commands and EW_SILENT for interactive expanding. */