changeset 336:2d8c2622e1fa

updated for version 7.0087
author vimboss
date Fri, 17 Jun 2005 22:00:15 +0000
parents 53543f031fbc
children 75786cfb4e86
files runtime/doc/eval.txt runtime/doc/options.txt runtime/doc/spell.txt runtime/doc/tags runtime/filetype.vim src/gui_w32.c src/ops.c src/screen.c src/spell/Makefile src/testdir/test49.vim src/version.h
diffstat 11 files changed, 93 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Jun 14
+*eval.txt*      For Vim version 7.0aa.  Last change: 2005 Jun 17
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -948,8 +948,11 @@ register						*expr-register*
 
 The result is the contents of the named register, as a single string.
 Newlines are inserted where required.  To get the contents of the unnamed
-register use @" or @@.  The '=' register can not be used here.  See
-|registers| for an explanation of the available registers.
+register use @" or @@.  See |registers| for an explanation of the available
+registers.
+
+When using the '=' register you get the expression itself, not what it
+evaluates to.  Use |eval()| to evaluate it.
 
 
 nesting							*expr-nesting* *E110*
@@ -3290,11 +3293,16 @@ range({expr} [, {max} [, {stride}]])				
 		- If {stride} is specified: [{expr}, {expr} + {stride}, ...,
 		  {max}] (increasing {expr} with {stride} each time, not
 		  producing a value past {max}).
+		When the maximum is one before the start the result is an
+		empty list.  When the maximum is more than one before the
+		start this is an error.
 		Examples: >
 			range(4) 		" [0, 1, 2, 3]
 			range(2, 4)		" [2, 3, 4]
 			range(2, 9, 3)		" [2, 5, 8]
 			range(2, -2, -1) 	" [2, 1, 0, -1, -2]
+			range(0)		" []
+			range(2, 0)		" error!
 <
 							*readfile()*
 readfile({fname} [, {binary} [, {max}]])
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 7.0aa.  Last change: 2005 Jun 07
+*options.txt*	For Vim version 7.0aa.  Last change: 2005 Jun 17
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -5644,6 +5644,8 @@ A jump table for the options with a shor
 	When a word is added while this option is empty Vim will set it for
 	you: Using the first "spell" directory in 'runtimepath' that is
 	writable and the first language name that appears in 'spelllang'.
+	This option cannot be set from a |modeline| or in the |sandbox|, for
+	security reasons.
 
 						*'spelllang'* *'spl'*
 'spelllang' 'spl'	string	(default "en")
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -1,4 +1,4 @@
-*spell.txt*	For Vim version 7.0aa.  Last change: 2005 Jun 16
+*spell.txt*	For Vim version 7.0aa.  Last change: 2005 Jun 17
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -401,7 +401,7 @@ The same word with all upper-case charac
 	AlS		AlS ALS			als Als ALs aLs aLS
 
 The KEP affix ID can be used to specifically match a word with identical case
-only, see below.
+only, see below |spell-affix-KEP|.
 
 Note in line 5 to 7 that non-word characters are used.  You can include
 any character in a word.  When checking the text a word still only matches
@@ -435,7 +435,8 @@ word characters (as specified with ENC).
 ":mkspell" is used may not support a locale with this encoding and isalpha()
 won't work.  For example when using "cp1250" on Unix.
 
-							*E761* *E762*
+					*E761* *E762* *spell-affix-FOL*
+					*spell-affix-LOW* *spell-affix-UPP*
 Three lines in the affix file are needed.  Simplistic example:
 
 	FOL  áëñáëñ ~
@@ -464,6 +465,11 @@ otherwise they can't be combined without
 generated with the "-ascii" argument will not contain the table with
 characters, so that it can be combine with spell files for any encoding.
 
+					    *spell-affix-PFX* *spell-affix-SFX*
+The usual PFX (prefix) and SFX (suffix) lines are supported.  Note that
+Myspell ignores any extra text after the relevant info.  Vim requires this
+text to start with a "#" so that mistakes don't go unnoticed.
+
 							*spell-affix-KEP*
 In the affix file a KEP line can be used to define the affix name used for
 keep-case words.  Example:
@@ -510,6 +516,9 @@ to prefer suggestions with these letters
 
 The first line specifies the number of MAP lines following.  Vim ignores it.
 
+A letter must only appear in one of the MAP items.  It's a bit more efficient
+if the first letter is ASCII or at least one without accents.
+
 
 SOUNDS-A-LIKE						*spell-affix-SAL*
 
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -2405,8 +2405,10 @@ 90.5	usr_90.txt	/*90.5*
 :source	repeat.txt	/*:source*
 :source_crnl	repeat.txt	/*:source_crnl*
 :sp	windows.txt	/*:sp*
-:spellg	spell.txt	/*:spellg*
+:spe	spell.txt	/*:spe*
 :spellgood	spell.txt	/*:spellgood*
+:spellw	spell.txt	/*:spellw*
+:spellwrong	spell.txt	/*:spellwrong*
 :split	windows.txt	/*:split*
 :split_f	windows.txt	/*:split_f*
 :spr	windows.txt	/*:spr*
@@ -6251,11 +6253,16 @@ spec_chglog_release_info	pi_spec.txt	/*s
 special-buffers	windows.txt	/*special-buffers*
 speed-up	tips.txt	/*speed-up*
 spell	spell.txt	/*spell*
+spell-affix-FOL	spell.txt	/*spell-affix-FOL*
 spell-affix-KEP	spell.txt	/*spell-affix-KEP*
+spell-affix-LOW	spell.txt	/*spell-affix-LOW*
 spell-affix-MAP	spell.txt	/*spell-affix-MAP*
+spell-affix-PFX	spell.txt	/*spell-affix-PFX*
 spell-affix-RAR	spell.txt	/*spell-affix-RAR*
 spell-affix-REP	spell.txt	/*spell-affix-REP*
 spell-affix-SAL	spell.txt	/*spell-affix-SAL*
+spell-affix-SFX	spell.txt	/*spell-affix-SFX*
+spell-affix-UPP	spell.txt	/*spell-affix-UPP*
 spell-affix-chars	spell.txt	/*spell-affix-chars*
 spell-affix-mbyte	spell.txt	/*spell-affix-mbyte*
 spell-affix-vim	spell.txt	/*spell-affix-vim*
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:	Bram Moolenaar <Bram@vim.org>
-" Last Change:	2005 Jun 16
+" Last Change:	2005 Jun 17
 
 " Listen very carefully, I will say this only once
 if exists("did_load_filetypes")
@@ -1439,7 +1439,7 @@ au BufNewFile,BufRead *.sim			setf simul
 au BufNewFile,BufRead *.sin,*.s85		setf sinda
 
 " SKILL
-au BufNewFile,BufRead *.il			setf skill
+au BufNewFile,BufRead *.il,*.ils,*.cdf		setf skill
 
 " SLRN
 au BufNewFile,BufRead .slrnrc			setf slrnrc
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -415,6 +415,9 @@ init_mouse_wheel(void)
 #ifndef SPI_GETWHEELSCROLLLINES
 # define SPI_GETWHEELSCROLLLINES    104
 #endif
+#ifndef SPI_SETWHEELSCROLLLINES
+# define SPI_SETWHEELSCROLLLINES    105
+#endif
 
 #define VMOUSEZ_CLASSNAME  "MouseZ"		/* hidden wheel window class */
 #define VMOUSEZ_TITLE      "Magellan MSWHEEL"	/* hidden wheel window title */
--- a/src/ops.c
+++ b/src/ops.c
@@ -5717,6 +5717,11 @@ write_reg_contents_ex(name, str, maxlen,
     struct yankreg  *old_y_previous, *old_y_current;
     long	    len;
 
+    if (maxlen >= 0)
+	len = maxlen;
+    else
+	len = (long)STRLEN(str);
+
     /* Special case: '/' search pattern */
     if (name == '/')
     {
@@ -5724,6 +5729,26 @@ write_reg_contents_ex(name, str, maxlen,
 	return;
     }
 
+#ifdef FEAT_EVAL
+    if (name == '=')
+    {
+	char_u	    *p, *s;
+
+	p = vim_strnsave(str, (int)len);
+	if (p == NULL)
+	    return;
+	if (must_append)
+	{
+	    s = concat_str(get_expr_line_src(), p);
+	    vim_free(p);
+	    p = s;
+
+	}
+	set_expr_line(p);
+	return;
+    }
+#endif
+
     if (!valid_yank_reg(name, TRUE))	    /* check for valid reg name */
     {
 	emsg_invreg(name);
@@ -5740,10 +5765,6 @@ write_reg_contents_ex(name, str, maxlen,
     get_yank_register(name, TRUE);
     if (!y_append && !must_append)
 	free_yank_all();
-    if (maxlen >= 0)
-	len = maxlen;
-    else
-	len = (long)STRLEN(str);
 #ifndef FEAT_VISUAL
     /* Just in case - make sure we don't use MBLOCK */
     if (yank_type == MBLOCK)
--- a/src/screen.c
+++ b/src/screen.c
@@ -3594,11 +3594,16 @@ win_line(wp, lnum, startrow, endrow)
 			char_attr = syntax_attr;
 		    if (c != 0 && (!has_syntax || can_spell))
 		    {
+			char_u	*prev_ptr;
 # ifdef FEAT_MBYTE
-			char_u	*prev_ptr = ptr - (has_mbyte ? mb_l : 1);
-# else
-			char_u	*prev_ptr = ptr - 1;
+			if (has_mbyte)
+			{
+			    prev_ptr = ptr - mb_l;
+			    v -= mb_l - 1;
+			}
+			else
 # endif
+			    prev_ptr = ptr - 1;
 			word_end = v + spell_check(wp, prev_ptr, &spell_attr);
 
 			/* In Insert mode only highlight a word that
--- a/src/spell/Makefile
+++ b/src/spell/Makefile
@@ -15,6 +15,9 @@ pl: $(SPELLDIR)/pl.iso-8859-2.spl \
 nl: $(SPELLDIR)/nl.latin1.spl \
 	$(SPELLDIR)/nl.utf-8.spl
 
+de: $(SPELLDIR)/de.latin1.spl \
+	$(SPELLDIR)/de.utf-8.spl
+
 fr: $(SPELLDIR)/fr.latin1.spl \
 	$(SPELLDIR)/fr.utf-8.spl
 
@@ -36,6 +39,9 @@ diff:
 	-diff -a -C 1 pl_PL.orig.aff pl_PL.aff >pl_PL.diff
 	-diff -a -C 1 pl_PL.orig.dic pl_PL.dic >>pl_PL.diff
 	
+	-diff -a -C 1 de_DE.orig.aff de_DE.aff >de_DE.diff
+	-diff -a -C 1 de_DE.orig.dic de_DE.dic >>de_DE.diff
+	
 	-diff -a -C 1 fr_FR.orig.aff fr_FR.aff >fr_FR.diff
 	-diff -a -C 1 fr_FR.orig.dic fr_FR.dic >>fr_FR.diff
 
@@ -84,6 +90,14 @@ diff:
 			nl_NL.aff nl_NL.dic
 	env LANG=nl_NL.UTF-8 $(VIM) -e -c "mkspell! $(SPELLDIR)/nl nl_NL" -c q
 
+$(SPELLDIR)/de.latin1.spl : $(VIM) \
+			de_DE.aff de_DE.dic
+	env LANG=de_DE.ISO8859-1 $(VIM) -e -c "mkspell! $(SPELLDIR)/de de_DE" -c q
+
+$(SPELLDIR)/de.utf-8.spl : $(VIM) \
+			de_DE.aff de_DE.dic
+	env LANG=de_DE.UTF-8 $(VIM) -e -c "mkspell! $(SPELLDIR)/de de_DE" -c q
+
 $(SPELLDIR)/fr.latin1.spl : $(VIM) \
 			fr_FR.aff fr_FR.dic
 	env LANG=fr_FR.ISO8859-1 $(VIM) -e -c "mkspell! $(SPELLDIR)/fr fr_FR" -c q
--- a/src/testdir/test49.vim
+++ b/src/testdir/test49.vim
@@ -1,6 +1,6 @@
 " Vim script language tests
 " Author:	Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com>
-" Last Change:	2005 May 18
+" Last Change:	2005 Jun 17
 
 "-------------------------------------------------------------------------------
 " Test environment							    {{{1
@@ -8069,7 +8069,7 @@ if ExtraVim()
     function! MSG(n)
 	let g:taken = g:taken . "M" . a:n
 	if (a:n >= 10 && a:n <= 27) ? v:errmsg != "" : v:errmsg !~ "asdf"
-	    let g:taken = g:taken . "x"
+	    let g:taken = g:taken . v:errmsg
 	endif
 	let v:errmsg = ""
     endfunction
@@ -8225,13 +8225,13 @@ if ExtraVim()
     let var = ERR(36) + CONT(36)
     call MSG(36)
 
-    let v{ERRabort(37) + CONT(37)} = 0
+    let v{ERRabort(37) + CONT(37) . 'asdf'} = 0
     call MSG(37)
-    let v{ERRabort(38) + CONT(38)}
+    let v{ERRabort(38) + CONT(38) . 'asdf'}
     call MSG(38)
     let var = exists('v{ERRabort(39) + CONT(39)}')
     call MSG(39)
-    unlet v{ERRabort(40) + CONT(40)}
+    unlet v{ERRabort(40) + CONT(40) . 'asdf'}
     call MSG(40)
     function F{ERRabort(41) + CONT(41)}()
     endfunction
--- 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 16)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 16, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 17)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 17, compiled "