updated for version 7.0082
diff --git a/src/eval.c b/src/eval.c
index cdc2f5f..aa39350 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7931,7 +7931,7 @@
}
/*
- * return 0 for not writable, 1 for writable file, 2 for a dir which we have
+ * Return 0 for not writable, 1 for writable file, 2 for a dir which we have
* rights to write into.
*/
static void
@@ -7939,34 +7939,7 @@
typval_T *argvars;
typval_T *rettv;
{
- char_u *p;
- int retval = 0;
-#if defined(UNIX) || defined(VMS)
- int perm = 0;
-#endif
-
- p = get_tv_string(&argvars[0]);
-#if defined(UNIX) || defined(VMS)
- perm = mch_getperm(p);
-#endif
-#ifndef MACOS_CLASSIC /* TODO: get either mch_writable or mch_access */
- if (
-# ifdef WIN3264
- mch_writable(p) &&
-# else
-# if defined(UNIX) || defined(VMS)
- (perm & 0222) &&
-# endif
-# endif
- mch_access((char *)p, W_OK) == 0
- )
-#endif
- {
- ++retval;
- if (mch_isdir(p))
- ++retval;
- }
- rettv->vval.v_number = retval;
+ rettv->vval.v_number = filewritable(get_tv_string(&argvars[0]));
}
static void findfilendir __ARGS((typval_T *argvars, typval_T *rettv, int dir));
@@ -9492,6 +9465,9 @@
"netbeans_intg",
#endif
#ifdef FEAT_SYN_HL
+ "spell",
+#endif
+#ifdef FEAT_SYN_HL
"syntax",
#endif
#if defined(USE_SYSTEM) || !defined(UNIX)
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index bf04185..4e2d29f 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2433,7 +2433,7 @@
{
/* Overwriting a file that is loaded in another buffer is not a
* good idea. */
- EMSG(_("E139: File is loaded in another buffer"));
+ EMSG(_(e_bufloaded));
goto theend;
}
}
@@ -2591,7 +2591,7 @@
{
char_u buff[IOSIZE];
- dialog_msg(buff, _("Overwrite existing file \"%.*s\"?"), fname);
+ dialog_msg(buff, _("Overwrite existing file \"%s\"?"), fname);
if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) != VIM_YES)
return FAIL;
eap->forceit = TRUE;
@@ -2721,7 +2721,7 @@
{
char_u buff[IOSIZE];
- dialog_msg(buff, _("'readonly' option is set for \"%.*s\".\nDo you wish to write anyway?"),
+ dialog_msg(buff, _("'readonly' option is set for \"%s\".\nDo you wish to write anyway?"),
buf->b_fname);
if (vim_dialog_yesno(VIM_QUESTION, NULL, buff, 2) == VIM_YES)
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index eb11fb9..9289d38 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -757,6 +757,10 @@
RANGE|DFLALL|WHOLEFOLD|BANG|EXTRA|NOTRLCOM|MODIFY),
EX(CMD_split, "split", ex_splitview,
BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR),
+EX(CMD_spellgood, "spellgood", ex_spell,
+ NEEDARG|EXTRA|TRLBAR),
+EX(CMD_spellwrong, "spellwrong", ex_spell,
+ NEEDARG|EXTRA|TRLBAR),
EX(CMD_sprevious, "sprevious", ex_previous,
EXTRA|RANGE|NOTADR|COUNT|BANG|EDITCMD|ARGOPT|TRLBAR),
EX(CMD_srewind, "srewind", ex_rewind,
diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro
index f9aab8d..365f2ea 100644
--- a/src/proto/misc2.pro
+++ b/src/proto/misc2.pro
@@ -92,4 +92,5 @@
void sort_strings __ARGS((char_u **files, int count));
int pathcmp __ARGS((const char *p, const char *q, int maxlen));
char_u *parse_list_options __ARGS((char_u *option_str, option_table_T *table, int table_size));
+int filewritable __ARGS((char_u *fname));
/* vim: set ft=c : */