updated for version 7.0222
diff --git a/src/edit.c b/src/edit.c
index f3c6199..a43891f 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -169,7 +169,7 @@
static void check_auto_format __ARGS((int));
static void redo_literal __ARGS((int c));
static void start_arrow __ARGS((pos_T *end_insert_pos));
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
static void check_spell_redraw __ARGS((void));
static void spell_back_to_badword __ARGS((void));
static int spell_bad_len = 0; /* length of located bad word */
@@ -1911,7 +1911,10 @@
int dict_opt;
{
if (dict_opt ? (*curbuf->b_p_dict == NUL && *p_dict == NUL
- && !curwin->w_p_spell)
+# ifdef FEAT_SPELL
+ && !curwin->w_p_spell
+# endif
+ )
: (*curbuf->b_p_tsr == NUL && *p_tsr == NUL))
{
ctrl_x_mode = 0;
@@ -2333,7 +2336,7 @@
if (stop_arrow() == FAIL)
return;
- if (startcol > curwin->w_cursor.col)
+ if (startcol > (int)curwin->w_cursor.col)
startcol = curwin->w_cursor.col;
compl_col = startcol;
compl_length = curwin->w_cursor.col - startcol;
@@ -2589,7 +2592,7 @@
if (*dict == NUL)
{
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
/* When 'dictionary' is empty and spell checking is enabled use
* "spell". */
if (!thesaurus && curwin->w_p_spell)
@@ -2644,14 +2647,18 @@
* backticks (for security, the 'dict' option may have been set in
* a modeline). */
copy_option_part(&dict, buf, LSIZE, ",");
+# ifdef FEAT_SPELL
if (!thesaurus && STRCMP(buf, "spell") == 0)
count = -1;
- else if (vim_strchr(buf, '`') != NULL
+ else
+# endif
+ if (vim_strchr(buf, '`') != NULL
|| expand_wildcards(1, &buf, &count, &files,
EW_FILE|EW_SILENT) != OK)
count = 0;
}
+# ifdef FEAT_SPELL
if (count == -1)
{
/* Complete from active spelling. Skip "\<" in the pattern, we
@@ -2663,6 +2670,7 @@
spell_dump_compl(curbuf, ptr, regmatch.rm_ic, &dir, 0);
}
else
+# endif
{
ins_compl_files(count, files, thesaurus, flags,
®match, buf, &dir);
@@ -3116,7 +3124,7 @@
case 's':
case Ctrl_S:
ctrl_x_mode = CTRL_X_SPELL;
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
spell_back_to_badword();
#endif
break;
@@ -3646,7 +3654,7 @@
#endif
case CTRL_X_SPELL:
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
num_matches = expand_spelling(first_match_pos.lnum,
first_match_pos.col, compl_pattern, &matches);
if (num_matches > 0)
@@ -4445,7 +4453,7 @@
}
else if (ctrl_x_mode == CTRL_X_SPELL)
{
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
if (spell_bad_len > 0)
compl_col = curs_col - spell_bad_len;
else
@@ -5718,12 +5726,12 @@
stop_insert(end_insert_pos, FALSE);
arrow_used = TRUE; /* this means we stopped the current insert */
}
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
check_spell_redraw();
#endif
}
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
/*
* If we skipped highlighting word at cursor, do it now.
* It may be skipped again, thus reset spell_redraw_lnum first.
@@ -7303,7 +7311,7 @@
int temp;
static int disabled_redraw = FALSE;
-#ifdef FEAT_SYN_HL
+#ifdef FEAT_SPELL
check_spell_redraw();
#endif
#if defined(FEAT_HANGULIN)