Bram,

Patch 7.2.034 introduced a bug which causes spell highlighting not to
work when an empty buffer gets re-used when a file is loaded.  A simple
test case is:

  $ vim -u NONE -N -c 'syn on' -c 'set spell'
  :e src/os_win32.c

As you can see, none of the unknown words are highlighted as spelling
mistakes although they are if you give the file on the command line
instead.

The attached patch looks like the right fix.

Thanks,
-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@debian.org>
diff --git a/src/buffer.c b/src/buffer.c
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -639,6 +639,9 @@
     {
 	clear_wininfo(buf);		/* including window-local options */
 	free_buf_options(buf, TRUE);
+#ifdef FEAT_SPELL
+	ga_clear(&buf->b_s.b_langp);
+#endif
     }
 #ifdef FEAT_EVAL
     vars_clear(&buf->b_vars.dv_hashtab); /* free all internal variables */
@@ -661,9 +664,6 @@
     vim_free(buf->b_start_fenc);
     buf->b_start_fenc = NULL;
 #endif
-#ifdef FEAT_SPELL
-    ga_clear(&buf->b_s.b_langp);
-#endif
 }
 
 /*

Attachment: signature.asc
Description: Digital signature

Reply via email to