updated for version 7.0132
diff --git a/src/edit.c b/src/edit.c
index fe130e6..96ebe71 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -136,6 +136,7 @@
static void start_arrow __ARGS((pos_T *end_insert_pos));
#ifdef FEAT_SYN_HL
static void check_spell_redraw __ARGS((void));
+static void spell_back_to_badword __ARGS((void));
#endif
static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
static int echeck_abbr __ARGS((int));
@@ -2365,6 +2366,9 @@
case 's':
case Ctrl_S:
ctrl_x_mode = CTRL_X_SPELL;
+#ifdef FEAT_SYN_HL
+ spell_back_to_badword();
+#endif
break;
case Ctrl_RSB:
ctrl_x_mode = CTRL_X_TAGS;
@@ -3533,7 +3537,7 @@
{
#ifdef FEAT_SYN_HL
compl_col = spell_word_start(startcol);
- if (compl_col == startcol)
+ if (compl_col == (colnr_T)startcol)
return FAIL;
compl_length = (int)curs_col - compl_col;
compl_pattern = vim_strnsave(line + compl_col, compl_length);
@@ -4759,7 +4763,7 @@
/*
* start_arrow() is called when an arrow key is used in insert mode.
- * It resembles hitting the <ESC> key.
+ * For undo/redo it resembles hitting the <ESC> key.
*/
static void
start_arrow(end_insert_pos)
@@ -4792,6 +4796,20 @@
redrawWinline(lnum, FALSE);
}
}
+
+/*
+ * Called when starting CTRL_X_SPELL mode: Move backwards to a previous badly
+ * spelled word, if there is one.
+ */
+ static void
+spell_back_to_badword()
+{
+ pos_T tpos = curwin->w_cursor;
+
+ spell_move_to(BACKWARD, TRUE, TRUE);
+ if (curwin->w_cursor.col != tpos.col)
+ start_arrow(&tpos);
+}
#endif
/*
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 52104f4..529baf7 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -30,7 +30,6 @@
#ifdef FEAT_AUTOCMD
static void delbuf_msg __ARGS((char_u *name));
#endif
-static int do_sub_msg __ARGS((int count_only));
static int
#ifdef __BORLANDC__
_RTLENTRYF
@@ -3940,13 +3939,6 @@
static char_u *old_sub = NULL; /* previous substitute pattern */
static int global_need_beginline; /* call beginline() after ":g" */
-/*
- * When ":global" is used to number of substitutions and changed lines is
- * accumulated until it's finished.
- */
-static long sub_nsubs; /* total number of substitutions */
-static linenr_T sub_nlines; /* total number of lines changed */
-
/* do_sub()
*
* Perform a substitution from line eap->line1 to line eap->line2 using the
@@ -4829,7 +4821,7 @@
* Can also be used after a ":global" command.
* Return TRUE if a message was given.
*/
- static int
+ int
do_sub_msg(count_only)
int count_only; /* used 'n' flag for ":s" */
{
diff --git a/src/globals.h b/src/globals.h
index 60eff1f..6bfc13d 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1057,6 +1057,14 @@
EXTERN char_u no_lines_msg[] INIT(= N_("--No lines in buffer--"));
+/*
+ * When ":global" is used to number of substitutions and changed lines is
+ * accumulated until it's finished.
+ * Also used for ":spellrepall".
+ */
+EXTERN long sub_nsubs; /* total number of substitutions */
+EXTERN linenr_T sub_nlines; /* total number of lines changed */
+
/* table to store parsed 'wildmode' */
EXTERN char_u wim_flags[4];
diff --git a/src/option.c b/src/option.c
index 67bcf5e..9b0e636 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1506,6 +1506,15 @@
{"mesg", NULL, P_BOOL|P_VI_DEF,
(char_u *)NULL, PV_NONE,
{(char_u *)FALSE, (char_u *)0L}},
+ {"mkspellmem", "msm", P_STRING|P_VI_DEF|P_EXPAND|P_SECURE,
+#ifdef FEAT_SYN_HL
+ (char_u *)&p_msm, PV_NONE,
+ {(char_u *)"460000,2000,500", (char_u *)0L}
+#else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+#endif
+ },
{"modeline", "ml", P_BOOL|P_VIM,
(char_u *)&p_ml, PV_ML,
{(char_u *)FALSE, (char_u *)TRUE}},
@@ -4621,6 +4630,7 @@
(void)opt_strings_flags(p_ttym, p_ttym_values, &ttym_flags, FALSE);
#endif
#ifdef FEAT_SYN_HL
+ (void)spell_check_msm();
(void)spell_check_sps();
(void)compile_cap_prog(curbuf);
#endif
@@ -5791,6 +5801,12 @@
if (spell_check_sps() != OK)
errmsg = e_invarg;
}
+ /* 'mkspellmem' */
+ else if (varp == &p_msm)
+ {
+ if (spell_check_msm() != OK)
+ errmsg = e_invarg;
+ }
#endif
#ifdef FEAT_QUICKFIX
diff --git a/src/option.h b/src/option.h
index 9aa2aaa..3cfdd4f 100644
--- a/src/option.h
+++ b/src/option.h
@@ -594,6 +594,9 @@
#ifdef FEAT_MENU
EXTERN long p_mis; /* 'menuitems' */
#endif
+#ifdef FEAT_SYN_HL
+EXTERN char_u *p_msm; /* 'mkspellmem' */
+#endif
EXTERN long p_mls; /* 'modelines' */
EXTERN char_u *p_mouse; /* 'mouse' */
#ifdef FEAT_GUI
diff --git a/src/proto/ex_cmds.pro b/src/proto/ex_cmds.pro
index 6404cc8..87af03a 100644
--- a/src/proto/ex_cmds.pro
+++ b/src/proto/ex_cmds.pro
@@ -34,6 +34,7 @@
int check_restricted __ARGS((void));
int check_secure __ARGS((void));
void do_sub __ARGS((exarg_T *eap));
+int do_sub_msg __ARGS((int count_only));
void ex_global __ARGS((exarg_T *eap));
void global_exe __ARGS((char_u *cmd));
int read_viminfo_sub_string __ARGS((vir_T *virp, int force));
diff --git a/src/proto/spell.pro b/src/proto/spell.pro
index 2123440..46ac575 100644
--- a/src/proto/spell.pro
+++ b/src/proto/spell.pro
@@ -11,6 +11,7 @@
void spell_add_word __ARGS((char_u *word, int len, int bad, int index));
void init_spell_chartab __ARGS((void));
int spell_check_sps __ARGS((void));
+int spell_check_msm __ARGS((void));
void spell_suggest __ARGS((void));
void ex_spellrepall __ARGS((exarg_T *eap));
void spell_suggest_list __ARGS((garray_T *gap, char_u *word, int maxcount, int need_cap));
diff --git a/src/version.h b/src/version.h
index 94726c6..7a32845 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 16)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 16, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 19)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 19, compiled "