summaryrefslogtreecommitdiff
path: root/src/spell.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-12 21:50:18 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-12 21:50:18 +0000
commitf71a3db47e928aaeea83c7bea011188d4898d249 (patch)
tree6ac9fc74bf8aa5c666d3eb6176a507da5a2aff52 /src/spell.c
parente48ec1fa6bf564f210131ae14767af4f9419ec66 (diff)
downloadvim-git-f71a3db47e928aaeea83c7bea011188d4898d249.tar.gz
updated for version 7.0222
Diffstat (limited to 'src/spell.c')
-rw-r--r--src/spell.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/spell.c b/src/spell.c
index 036f60c18..4a65aeeaa 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -299,7 +299,7 @@
#include "vim.h"
-#if defined(FEAT_SYN_HL) || defined(PROTO)
+#if defined(FEAT_SPELL) || defined(PROTO)
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
@@ -1999,8 +1999,10 @@ spell_move_to(wp, dir, allwords, curline, attrp)
char_u *endp;
hlf_T attr;
int len;
+# ifdef FEAT_SYN_HL
int has_syntax = syntax_present(wp->w_buffer);
int col;
+# endif
int can_spell;
char_u *buf = NULL;
int buflen = 0;
@@ -2087,6 +2089,7 @@ spell_move_to(wp, dir, allwords, curline, attrp)
: p - buf)
> wp->w_cursor.col)))
{
+# ifdef FEAT_SYN_HL
if (has_syntax)
{
col = p - buf;
@@ -2094,6 +2097,7 @@ spell_move_to(wp, dir, allwords, curline, attrp)
FALSE, &can_spell);
}
else
+#endif
can_spell = TRUE;
if (can_spell)
@@ -4554,7 +4558,7 @@ spell_reload_one(fname, added_word)
if (spell_load_file(fname, NULL, slang, FALSE) == NULL)
/* reloading failed, clear the language */
slang_clear(slang);
- redraw_all_later(NOT_VALID);
+ redraw_all_later(SOME_VALID);
didit = TRUE;
}
}
@@ -9003,7 +9007,7 @@ spell_add_word(word, len, bad, index, undo)
if (buf != NULL)
buf_reload(buf, buf->b_orig_mode);
- redraw_all_later(NOT_VALID);
+ redraw_all_later(SOME_VALID);
}
}
@@ -15476,4 +15480,4 @@ expand_spelling(lnum, col, pat, matchp)
}
#endif
-#endif /* FEAT_SYN_HL */
+#endif /* FEAT_SPELL */