summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/spell.txt33
-rw-r--r--runtime/doc/syntax.txt4
-rw-r--r--runtime/doc/todo.txt31
-rw-r--r--runtime/doc/version7.txt5
-rw-r--r--runtime/spell/en.ascii.splbin1101014 -> 559851 bytes
-rw-r--r--runtime/spell/en.latin1.splbin1103766 -> 561886 bytes
-rw-r--r--runtime/syntax/mail.vim30
-rw-r--r--src/charset.c14
-rw-r--r--src/edit.c14
-rw-r--r--src/eval.c10
-rw-r--r--src/ex_cmds.c2
-rw-r--r--src/ex_getln.c2
-rw-r--r--src/fileio.c29
-rw-r--r--src/hashtable.c2
-rw-r--r--src/if_cscope.c7
-rw-r--r--src/mbyte.c3
-rw-r--r--src/proto/spell.pro2
-rw-r--r--src/screen.c53
-rw-r--r--src/search.c4
-rw-r--r--src/syntax.c7
-rw-r--r--src/version.h4
21 files changed, 154 insertions, 102 deletions
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index 6721820ba..79419b24e 100644
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -1,4 +1,4 @@
-*spell.txt* For Vim version 7.0aa. Last change: 2005 Apr 24
+*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -140,13 +140,19 @@ find them here:
http://lingucomponent.openoffice.org/spell_dic.html
:mksp[ell] [-ascii] {outname} {inname} ... *:mksp* *:mkspell*
- Generate spell file {outname}.spl from Myspell files
- {inname}.aff and {inname}.dic.
+ Generate spell file {outname}.spl.
+
When the [-ascii] argument is present, words with
non-ascii characters are skipped. The resulting file
ends in "ascii.spl". Otherwise the resulting file
ends in "ENC.spl", where ENC is the value of
'encoding'.
+
+ The input can be the Myspell format files {inname}.aff
+ and {inname}.dic. If {inname}.aff does not exist then
+ {inname} is used as the file name of a plain word
+ list.
+
Multiple {inname} arguments can be given to combine
regions into one Vim spell file. Example: >
:mkspell ~/.vim/spell/en /tmp/en_US /tmp/en_CA /tmp/en_AU
@@ -187,6 +193,27 @@ Names will not appear in a dictionary, but do appear in a word list. And
some old words are rarely used and are common misspellings. These do appear
in a dictionary but not in a word list.
+There are two formats: one with affix compression and one without. The files
+with affix compression are used by Myspell (Mozilla and OpenOffice.org). This
+requires two files, one with .aff and one with .dic extension. The second
+format is a list of words.
+
+
+FORMAT OF WORD LIST
+
+The words must appear one per line. That is all that is required. Optional
+items are:
+- Empty and blank lines are ignored.
+- Lines starting with a # are ignored (comment lines).
+- A line starting with "=encoding=" before any word. After the second '='
+ comes an encoding name. This tells Vim to setup conversion from the
+ specified encoding to 'encoding'.
+- Other lines starting with '=' are special. The ones that are not recognized
+ are ignored (but you do get a warning message).
+
+
+FORMAT WITH AFFIX COMPRESSION
+
There are two files: the basic word list and an affix file. The affixes are
used to modify the basic words to get the full word list. This significantly
reduces the number of words, especially for a language like Polish. This is
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 27a9f3a86..2660432d9 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.0aa. Last change: 2005 May 18
+*syntax.txt* For Vim version 7.0aa. Last change: 2005 Jun 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3636,6 +3636,8 @@ the same syntax file on all terminals, and use the optimal highlighting.
1. highlight arguments for normal terminals
+ *bold* *underline* *undercurl*
+ *inverse* *italic* *standout*
term={attr-list} *attr-list* *highlight-term* *E418*
attr-list is a comma separated list (without spaces) of the
following items (in any order):
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 1f10a8695..e547e2acd 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 01
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,12 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+Patch in if_cscope.c also in 6.3? (Froloff)
+ Sergey says it's OK.
+
+Now that search HL combines with existing color, ctermfg=white doesn't work.
+(Gautam Iyer)
+
Add extra list of file locations. Can be used with:
:ltag list of matching tags, like :tselect
@@ -39,21 +45,20 @@ Add extra list of file locations. Can be used with:
:lNfile :lpfile location in previous file
:lrewind :lfirst first location
:llast last location
- :lq [N] go to location N (current one if N omitted)
+ :ll [N] go to location N (current one if N omitted)
:lwindow open window with locations (separate from quickfix window)
:lopen open window with locations
:lclose close window with locations
:llist list locations
:lfile read locations from file using 'errorformat'
:lgetfile idem, don't jump to first one
+ :lbuffer idem, from current buffer.
Win32: Balloon text can't contain line break.
Hints for multiline tooltips from Alexei Alexandrov (2005 Mar 26)
Patch from Sergey Khorev, 2005 Apr 11
Add has("balloon_multiline")
-Patch in if_cscope.c also in 6.3? (Froloff)
-
Mac unicode patch (Da Woon Jung):
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
@@ -92,9 +97,10 @@ Still seems to fail 15% of the time.
PLANNED FOR VERSION 7.0:
- Add SPELLCHECKER, with support for many languages.
- - Use "engspchk" from Charles Campbell for ideas.
- - Is it worth trying the trie structure (see code from Olaf Seibert, 2005
- May 9)
+ - Use "engspchk" from Charles Campbell for ideas (commands, rare words).
+ - Should quickly return if there is no word with the character.
+ Use array with flags, indicating if there is a word starting with this
+ byte. Quickly skip bytes where no word can start.
- Spell checking code todo's:
- Implement user and project word lists. Commands to add words and to
mark words as wrong.
@@ -107,14 +113,10 @@ PLANNED FOR VERSION 7.0:
:set spelllang=en_us,en-rare/SpellRare,en-math/SpellMath
- How about making suggestions? Use an external program like aspell?
Or include the myspell suggestion code in Vim?
- - Some word lists are inefficient. Remove affixes from a word when it
- results in another basic word.
- - References MySpell library (in OpenOffice.org).
+ - References: MySpell library (in OpenOffice.org).
http://spellchecker.mozdev.org/source.html
http://whiteboard.openoffice.org/source/browse/whiteboard/lingucomponent/source/spellcheck/myspell/
author: Kevin Hendricks <kevin.hendricks@sympatico.ca>
- - Alternative: use aspell library.
- ispell is replaced by aspell, thus forget about ispell.
- More complicated: Regions with different languages? E.g. comments in
English, strings in German (po file).
- Commands required:
@@ -136,11 +138,6 @@ PLANNED FOR VERSION 7.0:
items.
- Install spell files with src/main.aap.
Alternatives using ispell or aspell:
- 8 Add spell checking. Use "ispell -a" somehow.
- ~/vim/patches/wm_vim-5_4d.zip can be used as an example (includes
- ispell inside Vim). Gautam Iyer has an example with "aspell".
- Patch from Marcin Dalecki, uses pipe to aspell.
-
- REFACTORING: The main() function is very long. Move parts to separate
functions, especially loops. Ideas from Walter Briscoe (2003 Apr 3, 2004
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index fc8988aae..c34dd5ea0 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2005 May 31
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Jun 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -149,7 +149,8 @@ The "guisp" color can be used to give it a color different from foreground and
background.
The number of possible different highlight attributes was raised from about
220 to over 30000. This allows for the attributes of spelling to be combined
-with syntax highlighting attributes.
+with syntax highlighting attributes. This is also used for syntax
+highlighting.
Much more info here: |spell|.
diff --git a/runtime/spell/en.ascii.spl b/runtime/spell/en.ascii.spl
index 0db7eca5f..5b111cfbe 100644
--- a/runtime/spell/en.ascii.spl
+++ b/runtime/spell/en.ascii.spl
Binary files differ
diff --git a/runtime/spell/en.latin1.spl b/runtime/spell/en.latin1.spl
index 78de0c617..d10869585 100644
--- a/runtime/spell/en.latin1.spl
+++ b/runtime/spell/en.latin1.spl
Binary files differ
diff --git a/runtime/syntax/mail.vim b/runtime/syntax/mail.vim
index a45eb61ce..291daa25c 100644
--- a/runtime/syntax/mail.vim
+++ b/runtime/syntax/mail.vim
@@ -2,7 +2,7 @@
" Language: Mail file
" Previous Maintainer: Felix von Leitner <leitner@math.fu-berlin.de>
" Maintainer: Gautam Iyer <gautam@math.uchicago.edu>
-" Last Change: 2005 Mar 23
+" Last Change: Wed 01 Jun 2005 02:11:07 PM CDT
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -22,7 +22,7 @@ syn cluster mailQuoteExps contains=mailQuoteExp1,mailQuoteExp2,mailQuoteExp3,mai
syn case match
" For "From " matching case is required. The "From " is not matched in quoted
" emails
-syn region mailHeader contains=@mailHeaderFields start="^From " skip="^\s" end="\v^[-A-Za-z0-9]*([^-A-Za-z0-9:]|$)"me=s-1
+syn region mailHeader contains=@mailHeaderFields,@NoSpell start="^From " skip="^\s" end="\v^[-A-Za-z0-9]*([^-A-Za-z0-9:]|$)"me=s-1
syn match mailHeaderKey contained contains=mailEmail,@NoSpell "^From\s.*$"
syn case ignore
@@ -32,18 +32,20 @@ syn region mailHeader keepend contains=@mailHeaderFields,@mailQuoteExps,@NoSpell
syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps,@NoSpell start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$"
syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|reply-to):.*$"
-syn match mailHeaderKey contained "\v(^(\> ?)*)@<=date:"
-syn match mailSubject contained "\v(^(\> ?)*)@<=subject:.*$"
+syn match mailHeaderKey contained contains=@NoSpell "\v(^(\> ?)*)@<=date:"
+syn match mailSubject contained "\v^subject:.*$"
+syn match mailSubject contained contains=@NoSpell "\v(^(\> ?)+)@<=subject:.*$"
" Anything in the header between < and > is an email address
-syn match mailHeaderEmail contained "<.\{-}>" contains=@NoSpell
+syn match mailHeaderEmail contained contains=@NoSpell "<.\{-}>"
" Mail Signatures. (Begin with "-- ", end with change in quote level)
-syn region mailSignature keepend contains=@mailLinks,@mailQuoteExps start="^\z(\(> \?\)*\)-- $" end="^\z1$" end="^\z1\@!"me=s-1 end="^\z1\(> \?\)\+"me=s-1
+syn region mailSignature keepend contains=@mailLinks,@mailQuoteExps start="^--\s$" end="^$" end="^\(> \?\)\+"me=s-1
+syn region mailSignature keepend contains=@mailLinks,@mailQuoteExps,@NoSpell start="^\z(\(> \?\)\+\)--\s$" end="^\z1$" end="^\z1\@!"me=s-1 end="^\z1\(> \?\)\+"me=s-1
" URLs start with a known protocol or www,web,w3.
-syn match mailURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-z0-9/]` contains=@NoSpell
-syn match mailEmail "\v[_=a-z\./+0-9-]+\@[a-z0-9._-]+\a{2}" contains=@NoSpell
+syn match mailURL contains=@NoSpell `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-z0-9/]`
+syn match mailEmail contains=@NoSpell "\v[_=a-z\./+0-9-]+\@[a-z0-9._-]+\a{2}"
" Make sure quote markers in regions (header / signature) have correct color
syn match mailQuoteExp1 contained "\v^(\> ?)"
@@ -54,12 +56,12 @@ syn match mailQuoteExp5 contained "\v^(\> ?){5}"
syn match mailQuoteExp6 contained "\v^(\> ?){6}"
" Even and odd quoted lines. order is imporant here!
-syn match mailQuoted1 contains=mailHeader,@mailLinks,mailSignature "^\([a-z]\+>\|[]|}>]\).*$"
-syn match mailQuoted2 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{2}.*$"
-syn match mailQuoted3 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{3}.*$"
-syn match mailQuoted4 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{4}.*$"
-syn match mailQuoted5 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{5}.*$"
-syn match mailQuoted6 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{6}.*$"
+syn match mailQuoted1 contains=mailHeader,@mailLinks,mailSignature,@NoSpell "^\([a-z]\+>\|[]|}>]\).*$"
+syn match mailQuoted2 contains=mailHeader,@mailLinks,mailSignature,@NoSpell "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{2}.*$"
+syn match mailQuoted3 contains=mailHeader,@mailLinks,mailSignature,@NoSpell "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{3}.*$"
+syn match mailQuoted4 contains=mailHeader,@mailLinks,mailSignature,@NoSpell "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{4}.*$"
+syn match mailQuoted5 contains=mailHeader,@mailLinks,mailSignature,@NoSpell "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{5}.*$"
+syn match mailQuoted6 contains=mailHeader,@mailLinks,mailSignature,@NoSpell "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{6}.*$"
" Need to sync on the header. Assume we can do that within 100 lines
if exists("mail_minlines")
diff --git a/src/charset.c b/src/charset.c
index 25680f677..33c12f262 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1840,6 +1840,20 @@ skipdigits(p)
return p;
}
+#if defined(FEAT_SYN_HL) || defined(PROTO)
+/*
+ * skip over digits and hex characters
+ */
+ char_u *
+skiphex(p)
+ char_u *p;
+{
+ while (vim_isxdigit(*p)) /* skip to next non-digit */
+ ++p;
+ return p;
+}
+#endif
+
#if defined(FEAT_EX_EXTRA) || defined(PROTO)
/*
* skip to digit (or NUL after the string)
diff --git a/src/edit.c b/src/edit.c
index f4682c083..ebfe7fd69 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4568,6 +4568,7 @@ auto_format(trailblank, prev_line)
char_u *old;
char_u *new, *pnew;
int wasatend;
+ int cc;
if (!has_format_option(FO_AUTO))
return;
@@ -4587,11 +4588,12 @@ auto_format(trailblank, prev_line)
if (*old != NUL && !trailblank && wasatend)
{
dec_cursor();
- if (!WHITECHAR(gchar_cursor())
- && curwin->w_cursor.col > 0
- && has_format_option(FO_ONE_LETTER))
+ cc = gchar_cursor();
+ if (!WHITECHAR(cc) && curwin->w_cursor.col > 0
+ && has_format_option(FO_ONE_LETTER))
dec_cursor();
- if (WHITECHAR(gchar_cursor()))
+ cc = gchar_cursor();
+ if (WHITECHAR(cc))
{
curwin->w_cursor = pos;
return;
@@ -4672,10 +4674,12 @@ check_auto_format(end_insert)
int end_insert; /* TRUE when ending Insert mode */
{
int c = ' ';
+ int cc;
if (did_add_space)
{
- if (!WHITECHAR(gchar_cursor()))
+ cc = gchar_cursor();
+ if (!WHITECHAR(cc))
/* Somehow the space was removed already. */
did_add_space = FALSE;
else
diff --git a/src/eval.c b/src/eval.c
index 1051beb60..cdc2f5f16 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -5086,7 +5086,7 @@ list_idx_of_item(l, item)
++idx;
if (li == NULL)
return -1;
- return idx;;
+ return idx;
}
/*
@@ -14820,6 +14820,8 @@ find_var_ht(name, varname)
char_u *name;
char_u **varname;
{
+ hashitem_T *hi;
+
if (name[1] != ':')
{
/* The name must not start with a colon or #. */
@@ -14828,7 +14830,8 @@ find_var_ht(name, varname)
*varname = name;
/* "version" is "v:version" in all scopes */
- if (!HASHITEM_EMPTY(hash_find(&compat_hashtab, name)))
+ hi = hash_find(&compat_hashtab, name);
+ if (!HASHITEM_EMPTY(hi))
return &compat_hashtab;
if (current_funccal == NULL)
@@ -17650,7 +17653,7 @@ shortpath_for_invalid_fname(fname, bufp, fnamelen)
{
char_u *s, *p, *pbuf2, *pbuf3;
char_u ch;
- int l,len,len2,plen,slen;
+ int len, len2, plen, slen;
/* Make a copy */
len2 = *fnamelen;
@@ -17661,7 +17664,6 @@ shortpath_for_invalid_fname(fname, bufp, fnamelen)
slen = 1;
plen = len2;
- l = 0;
if (after_pathsep(pbuf2, s + 1))
{
--s;
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 22627944a..bf04185cf 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -1813,7 +1813,7 @@ write_viminfo(file, forceit)
if (fp_out == NULL)
{
EMSG2(_("E138: Can't write viminfo file %s!"),
- (fp_in == NULL || tempname == NUL) ? fname : tempname);
+ (fp_in == NULL || tempname == NULL) ? fname : tempname);
if (fp_in != NULL)
fclose(fp_in);
goto end;
diff --git a/src/ex_getln.c b/src/ex_getln.c
index a71b68ef9..5d04ad301 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -5297,7 +5297,7 @@ write_viminfo_history(fp)
p = history[type][i].hisstr;
if (p != NULL)
{
- putc(hist_type2char(type, TRUE), fp);
+ fputc(hist_type2char(type, TRUE), fp);
/* For the search history: put the separator in the second
* column; use a space if there isn't one. */
if (type == HIST_SEARCH)
diff --git a/src/fileio.c b/src/fileio.c
index 9f38101bf..5b27b6243 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -765,6 +765,7 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
else if (curbuf->b_help)
{
char_u firstline[80];
+ int fc;
/* Help files are either utf-8 or latin1. Try utf-8 first, if this
* fails it must be latin1.
@@ -774,18 +775,22 @@ readfile(fname, sfname, from, lines_to_skip, lines_to_read, eap, flags)
* That is only in *.??x files. */
fenc = (char_u *)"latin1";
c = enc_utf8;
- if (!c && !read_stdin && TOLOWER_ASC(fname[STRLEN(fname) - 1]) == 'x')
- {
- /* Read the first line (and a bit more). Immediately rewind to
- * the start of the file. If the read() fails "len" is -1. */
- len = vim_read(fd, firstline, 80);
- lseek(fd, (off_t)0L, SEEK_SET);
- for (p = firstline; p < firstline + len; ++p)
- if (*p >= 0x80)
- {
- c = TRUE;
- break;
- }
+ if (!c && !read_stdin)
+ {
+ fc = fname[STRLEN(fname) - 1];
+ if (TOLOWER_ASC(fc) == 'x')
+ {
+ /* Read the first line (and a bit more). Immediately rewind to
+ * the start of the file. If the read() fails "len" is -1. */
+ len = vim_read(fd, firstline, 80);
+ lseek(fd, (off_t)0L, SEEK_SET);
+ for (p = firstline; p < firstline + len; ++p)
+ if (*p >= 0x80)
+ {
+ c = TRUE;
+ break;
+ }
+ }
}
if (c)
diff --git a/src/hashtable.c b/src/hashtable.c
index a8cd1b7d1..d4177d3ea 100644
--- a/src/hashtable.c
+++ b/src/hashtable.c
@@ -275,6 +275,7 @@ hash_lock(ht)
++ht->ht_locked;
}
+#if 0 /* currently not used */
/*
* Lock a hashtable at the specified number of entries.
* Caller must make sure no more than "size" entries will be added.
@@ -288,6 +289,7 @@ hash_lock_size(ht, size)
(void)hash_may_resize(ht, size);
++ht->ht_locked;
}
+#endif
/*
* Unlock a hashtable: allow ht_array changes again.
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 3e5e26ce5..7163c8a03 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -559,7 +559,7 @@ cs_check_for_connections()
static int
cs_check_for_tags()
{
- return (p_tags[0] != NUL && curbuf->b_p_tags != NUL);
+ return (p_tags[0] != NUL && curbuf->b_p_tags != NULL);
} /* cs_check_for_tags */
@@ -1202,6 +1202,9 @@ clear_csinfo(i)
csinfo[i].pid = -1;
csinfo[i].fr_fp = NULL;
csinfo[i].to_fp = NULL;
+#if defined(WIN32)
+ csinfo[i].hProc = NULL;
+#endif
}
#ifndef UNIX
@@ -2090,7 +2093,7 @@ cs_release_csp(i, freefnpp)
(void)fflush(csinfo[i].to_fp);
}
/* give cscope chance to exit normally */
- if (csinfo[i].hProc > 0
+ if (csinfo[i].hProc != NULL
&& WaitForSingleObject(csinfo[i].hProc, 1000) == WAIT_TIMEOUT)
TerminateProcess(csinfo[i].hProc, 0);
#endif
diff --git a/src/mbyte.c b/src/mbyte.c
index 950401297..71a03a5d1 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -426,9 +426,6 @@ mb_init()
vimconv_T vimconv;
char_u *p;
#endif
-#ifdef WIN32
- int prev_enc_utf8 = enc_utf8;
-#endif
if (p_enc == NULL)
{
diff --git a/src/proto/spell.pro b/src/proto/spell.pro
index e56eb9293..45cade679 100644
--- a/src/proto/spell.pro
+++ b/src/proto/spell.pro
@@ -1,5 +1,5 @@
/* spell.c */
-int spell_check __ARGS((win_T *wp, char_u *line, char_u *ptr, int *attrp));
+int spell_check __ARGS((win_T *wp, char_u *ptr, int *attrp));
int spell_move_to __ARGS((int dir, int allwords));
char_u *did_set_spelllang __ARGS((buf_T *buf));
void spell_reload __ARGS((void));
diff --git a/src/screen.c b/src/screen.c
index 013978875..8c6dba123 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -243,7 +243,7 @@ redraw_all_later(type)
}
/*
- * Mark all windows that are editing the current buffer to be udpated later.
+ * Mark all windows that are editing the current buffer to be updated later.
*/
void
redraw_curbuf_later(type)
@@ -725,7 +725,7 @@ updateWindow(wp)
* VALID 1. scroll up/down to adjust for a changed w_topline
* 2. update lines at the top when scrolled down
* 3. redraw changed text:
- * - if wp->w_buffer->b_mod_set set, udpate lines between
+ * - if wp->w_buffer->b_mod_set set, update lines between
* b_mod_top and b_mod_bot.
* - if wp->w_redraw_top non-zero, redraw lines between
* wp->w_redraw_top and wp->w_redr_bot.
@@ -2504,8 +2504,6 @@ win_line(wp, lnum, startrow, endrow)
int has_spell = FALSE; /* this buffer has spell checking */
int spell_attr = 0; /* attributes desired by spelling */
int word_end = 0; /* last byte with same spell_attr */
- int iswordc; /* prev. char was a word character */
- int prev_iswordc = FALSE; /* prev. char was a word character */
#endif
int extra_check; /* has syntax or linebreak */
#ifdef FEAT_MBYTE
@@ -3246,11 +3244,6 @@ win_line(wp, lnum, startrow, endrow)
else
char_attr = search_attr;
-#ifdef FEAT_SYN_HL
- if (spell_attr != 0)
- char_attr = hl_combine_attr(char_attr, spell_attr);
-#endif
-
#ifdef FEAT_DIFF
if (diff_hlf != (enum hlf_value)0 && n_extra == 0)
{
@@ -3586,9 +3579,11 @@ win_line(wp, lnum, startrow, endrow)
if (area_attr == 0 && search_attr == 0)
char_attr = syntax_attr;
+ else
+ char_attr = hl_combine_attr(char_attr, syntax_attr);
}
- /* Check spelling at the start of a word.
+ /* Check spelling (unless at the end of the line).
* Only do this when there is no syntax highlighting, there is
* on @Spell cluster or the current syntax item contains the
* @Spell cluster. */
@@ -3597,33 +3592,27 @@ win_line(wp, lnum, startrow, endrow)
spell_attr = 0;
if (area_attr == 0 && search_attr == 0)
char_attr = syntax_attr;
- if (!has_syntax || can_spell)
+ if (c != 0 && (!has_syntax || can_spell))
{
- char_u *prev_ptr = ptr - (
# ifdef FEAT_MBYTE
- has_mbyte ? mb_l :
+ char_u *prev_ptr = ptr - (has_mbyte ? mb_l : 1);
+# else
+ char_u *prev_ptr = ptr - 1;
# endif
- 1);
-
- iswordc = spell_iswordc(prev_ptr);
- if (iswordc && !prev_iswordc)
- {
- word_end = v + spell_check(wp, line, prev_ptr,
- &spell_attr);
- /* In Insert mode only highlight a word that
- * doesn't touch the cursor. */
- if (spell_attr != 0
- && (State & INSERT) != 0
- && wp->w_cursor.lnum == lnum
- && wp->w_cursor.col >=
+ word_end = v + spell_check(wp, prev_ptr, &spell_attr);
+
+ /* In Insert mode only highlight a word that
+ * doesn't touch the cursor. */
+ if (spell_attr != 0
+ && (State & INSERT) != 0
+ && wp->w_cursor.lnum == lnum
+ && wp->w_cursor.col >=
(colnr_T)(prev_ptr - line)
- && wp->w_cursor.col < (colnr_T)word_end)
- {
- spell_attr = 0;
- spell_redraw_lnum = lnum;
- }
+ && wp->w_cursor.col < (colnr_T)word_end)
+ {
+ spell_attr = 0;
+ spell_redraw_lnum = lnum;
}
- prev_iswordc = iswordc;
}
}
if (spell_attr != 0)
diff --git a/src/search.c b/src/search.c
index 5ffcb3679..9d2981736 100644
--- a/src/search.c
+++ b/src/search.c
@@ -375,11 +375,13 @@ ignorecase(pat)
#endif
if (*p == '\\' && p[1] != NUL) /* skip "\S" et al. */
p += 2;
- else if (isupper(*p++))
+ else if (isupper(*p))
{
ic = FALSE;
break;
}
+ else
+ ++p;
}
}
no_smartcase = FALSE;
diff --git a/src/syntax.c b/src/syntax.c
index fc2710ab0..d8e781a74 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3143,6 +3143,8 @@ syntax_clear(buf)
for (i = buf->b_syn_clusters.ga_len; --i >= 0; )
syn_clear_cluster(buf, i);
ga_clear(&buf->b_syn_clusters);
+ buf->b_spell_cluster_id = 0;
+ buf->b_nospell_cluster_id = 0;
buf->b_syn_sync_flags = 0;
buf->b_syn_sync_minlines = 0;
@@ -6003,7 +6005,6 @@ static char *(highlight_init_both[]) =
"StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold",
"StatusLineNC term=reverse cterm=reverse gui=reverse",
"VertSplit term=reverse cterm=reverse gui=reverse",
- "Visual term=reverse cterm=reverse gui=reverse guifg=Grey guibg=fg",
"VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold",
"DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red",
NULL
@@ -6027,6 +6028,7 @@ static char *(highlight_init_light[]) =
"Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue",
"FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
"SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
+ "Visual term=reverse ctermbg=Blue guibg=Blue",
"DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue",
"DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta",
"DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan",
@@ -6051,6 +6053,7 @@ static char *(highlight_init_dark[]) =
"Folded term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=DarkGrey guifg=Cyan",
"FoldColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
"SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
+ "Visual term=reverse ctermbg=Blue guibg=Blue",
"DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue",
"DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta",
"DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan",
@@ -7765,6 +7768,8 @@ highlight_list_one(id)
didh = highlight_list_arg(id, didh, LIST_STRING,
0, sgp->sg_gui_bg_name, "guibg");
didh = highlight_list_arg(id, didh, LIST_STRING,
+ 0, sgp->sg_gui_sp_name, "guisp");
+ didh = highlight_list_arg(id, didh, LIST_STRING,
0, sgp->sg_font_name, "font");
#endif
diff --git a/src/version.h b/src/version.h
index 9b1907275..3fa4e3d19 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 Jun 1)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 1, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 4)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 4, compiled "