changeset 2290:22529abcd646 vim73

Fixed ":s" message. Docs updates.
author Bram Moolenaar <bram@vim.org>
date Sat, 10 Jul 2010 13:52:13 +0200
parents 3331756e4232
children f412e141c821
files runtime/doc/eval.txt runtime/doc/mbyte.txt runtime/doc/options.txt runtime/doc/pattern.txt runtime/doc/todo.txt runtime/doc/version7.txt src/ex_cmds.c src/normal.c
diffstat 8 files changed, 37 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -5571,6 +5571,10 @@ synstack({lnum}, {col})					*synstack()*
 			for id in synstack(line("."), col("."))
 			   echo synIDattr(id, "name")
 			endfor
+<		When the position specified with {lnum} and {col} is invalid
+		nothing is returned.  The position just after the last
+		character in a line and the first column in an empty line are
+		valid positions.
 
 system({expr} [, {input}])				*system()* *E677*
 		Get the output of the shell command {expr}.
--- a/runtime/doc/mbyte.txt
+++ b/runtime/doc/mbyte.txt
@@ -1267,8 +1267,8 @@ is no longer relevant in the GTK+ 2 GUI.
 When reading a file a BOM (Byte Order Mark) can be used to recognize the
 Unicode encoding:
 	EF BB BF     utf-8
-	FF FE        utf-16 big endian
-	FE FF        utf-16 little endian
+	FE FF        utf-16 big endian
+	FF FE        utf-16 little endian
 	00 00 FE FF  utf-32 big endian
 	FF FE 00 00  utf-32 little endian
 
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1169,7 +1169,7 @@ A jump table for the options with a shor
 			Win32 GUI}
 	Which directory to use for the file browser:
 	   last		Use same directory as with last file browser, where a
-	   		file was opened or saved.
+			file was opened or saved.
 	   buffer	Use the directory of the related buffer.
 	   current	Use the current directory.
 	   {path}	Use the specified directory
@@ -3485,15 +3485,15 @@ A jump table for the options with a shor
 	  'i'	Use a Vim icon.  For GTK with KDE it is used in the left-upper
 		corner of the window.  It's black&white on non-GTK, because of
 		limitations of X11.  For a color icon, see |X11-icon|.
-	  							*'go-m'*
+								*'go-m'*
 	  'm'	Menu bar is present.
-	  							*'go-M'*
+								*'go-M'*
 	  'M'	The system menu "$VIMRUNTIME/menu.vim" is not sourced.  Note
 		that this flag must be added in the .vimrc file, before
 		switching on syntax or filetype recognition (when the |gvimrc|
 		file is sourced the system menu has already been loaded; the
 		":syntax on" and ":filetype on" commands load the menu too).
-	  							*'go-g'*
+								*'go-g'*
 	  'g'	Grey menu items: Make menu items that are not active grey.  If
 		'g' is not included inactive menu items are not shown at all.
 		Exception: Athena will always use grey menu items.
@@ -3505,36 +3505,36 @@ A jump table for the options with a shor
 		and Athena GUIs.
 								*'go-r'*
 	  'r'	Right-hand scrollbar is always present.
-	  							*'go-R'*
+								*'go-R'*
 	  'R'	Right-hand scrollbar is present when there is a vertically
 		split window.
-	  							*'go-l'*
+								*'go-l'*
 	  'l'	Left-hand scrollbar is always present.
-	  							*'go-L'*
+								*'go-L'*
 	  'L'	Left-hand scrollbar is present when there is a vertically
 		split window.
 								*'go-b'*
 	  'b'	Bottom (horizontal) scrollbar is present.  Its size depends on
 		the longest visible line, or on the cursor line if the 'h'
 		flag is included. |gui-horiz-scroll|
-	  							*'go-h'*
+								*'go-h'*
 	  'h'	Limit horizontal scrollbar size to the length of the cursor
 		line.  Reduces computations. |gui-horiz-scroll|
 
 	And yes, you may even have scrollbars on the left AND the right if
 	you really want to :-).  See |gui-scrollbars| for more information.
 
-	  							*'go-v'*
+								*'go-v'*
 	  'v'	Use a vertical button layout for dialogs.  When not included,
 		a horizontal layout is preferred, but when it doesn't fit a
 		vertical layout is used anyway.
-	  							*'go-p'*
+								*'go-p'*
 	  'p'	Use Pointer callbacks for X11 GUI.  This is required for some
 		window managers.  If the cursor is not blinking or hollow at
 		the right moment, try adding this flag.  This must be done
 		before starting the GUI.  Set it in your |gvimrc|.  Adding or
 		removing it after the GUI has started has no effect.
-	  							*'go-F'*
+								*'go-F'*
 	  'F'	Add a footer.  Only for Motif.  See |gui-footer|.
 
 
@@ -4454,7 +4454,7 @@ A jump table for the options with a shor
 			is off and there is text preceding the character
 			visible in the first column.
 	  conceal:c	Character to show in place of concealed text, when
-	  		'conceallevel' is set to 1.
+			'conceallevel' is set to 1.
 	  nbsp:c	Character to show for a non-breakable space (character
 			0xA0, 160).  Left blank when omitted.
 
@@ -4917,7 +4917,7 @@ A jump table for the options with a shor
 	respectively; see |CTRL-A| for more info on these commands.
 	alpha	If included, single alphabetical characters will be
 		incremented or decremented.  This is useful for a list with a
-		letter index a), b), etc.
+		letter index a), b), etc.			*octal*
 	octal	If included, numbers that start with a zero will be considered
 		to be octal.  Example: Using CTRL-A on "007" results in "010".
 	hex	If included, numbers starting with "0x" or "0X" will be
@@ -6628,7 +6628,7 @@ A jump table for the options with a shor
 			a buffer.  Otherwise: do not split, use current window.
 			Supported in |quickfix| commands that display errors.
 	   newtab	Like "split", but open a new tab page.  Overrules
-	   		"split" when both are present.
+			"split" when both are present.
 
 						*'synmaxcol'* *'smc'*
 'synmaxcol' 'smc'	number	(default 3000)
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -995,7 +995,8 @@ x	A single character, with no special me
 	in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
 	- If two characters in the sequence are separated by '-', this is
 	  shorthand for the full list of ASCII characters between them.  E.g.,
-	  "[0-9]" matches any decimal digit.
+	  "[0-9]" matches any decimal digit.  Non-ASCII characters can be
+	  used, but the character values must not be more than 256 apart.
 	- A character class expression is evaluated to the set of characters
 	  belonging to that character class.  The following character classes
 	  are supported:
@@ -1043,9 +1044,9 @@ x	A single character, with no special me
 	  "^"):  "[]xyz]" or "[^]xyz]" {not in Vi}.
 	  For '-' you can also make it the first or last character: "[-xyz]",
 	  "[^-xyz]" or "[xyz-]".  For '\' you can also let it be followed by
-	  any character that's not in "^]-\bertn".  "[\xyz]" matches '\', 'x',
-	  'y' and 'z'.  It's better to use "\\" though, future expansions may
-	  use other characters after '\'.
+	  any character that's not in "^]-\bdertnoUux".  "[\xyz]" matches '\',
+	  'x', 'y' and 'z'.  It's better to use "\\" though, future expansions
+	  may use other characters after '\'.
 	- The following translations are accepted when the 'l' flag is not
 	  included in 'cpoptions' {not in Vi}:
 		\e	<Esc>
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1089,6 +1089,9 @@ 2010 Jun 30)
 
 
 Vim 7.3:
+- :s messages concatenate (Tony)
+- Windows XP: copying only gets first letter of bad spelled word. (Cesar
+  Romani, 2010 Jul 7)
 - in August remove UF_VERSION_CRYPT_PREV and UF_VERSION_PREV.
 - Conceal feature: no update when moving to another window. (Dominique Pelle,
   2010 Jul 5)  Vince will look into it.
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -7232,5 +7232,8 @@ MS-Windows: The self-installing executab
 The gvim executable is 32 bits, the installed gvimext.dll is either a 32 or 64
 bit version. (George Reilly)
 
+synstack() did not return anything when just past the end of the line.  Useful
+when using the cursor position in Insert mode.
+
 
  vim:tw=78:ts=8:ft=help:norl:
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -5176,6 +5176,8 @@ do_sub_msg(count_only)
     {
 	if (got_int)
 	    STRCPY(msg_buf, _("(Interrupted) "));
+	else
+	    *msg_buf = NUL;
 	if (sub_nsubs == 1)
 	    vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
 		    "%s", count_only ? _("1 match") : _("1 substitution"));
--- a/src/normal.c
+++ b/src/normal.c
@@ -5410,6 +5410,7 @@ nv_ident(cap)
 {
     char_u	*ptr = NULL;
     char_u	*buf;
+    char_u	*newbuf;
     char_u	*p;
     char_u	*kp;		/* value of 'keywordprg' */
     int		kp_help;	/* 'keywordprg' is ":help" */
@@ -5562,13 +5563,14 @@ nv_ident(cap)
 	    vim_free(buf);
 	    return;
 	}
-	buf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
-	if (buf == NULL)
+	newbuf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1);
+	if (newbuf == NULL)
 	{
 	    vim_free(buf);
 	    vim_free(p);
 	    return;
 	}
+	buf = newbuf;
 	STRCAT(buf, p);
 	vim_free(p);
     }