changeset 591:36071a92cb76 v7.0167

updated for version 7.0167
author vimboss
date Sun, 11 Dec 2005 21:36:39 +0000
parents de152391f6f9
children 6a91f35b354d
files runtime/doc/todo.txt runtime/doc/version7.txt src/eval.c src/main.c
diffstat 4 files changed, 40 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2005 Dec 10
+*todo.txt*      For Vim version 7.0aa.  Last change: 2005 Dec 11
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -30,12 +30,6 @@ be worked on, but only if you sponsor Vi
 							*known-bugs*
 -------------------- Known bugs and current work -----------------------
 
-When a buffer has no name, ":w >>fname" uses "fname" for the buffer, that is
-not logical.
-
-SwapExists with editexisting plugin: Is there a simple way to detect ":tag
-function" and have the remote Vim jump to the tag?
-
 When editing a file "a" that is a symbolic link to "b", while another Vim is
 editing "b", there is no warning.  Follow symlink to make swap file name?
 Patch from Stefano Zacchiroli.  Updated by James Vega, Dec 2.
@@ -156,6 +150,8 @@ When expanding on the command line, reco
 Complete command names by searching in $PATH.  When completing file names
 escape special characters ";&<>(){}". (Adri Verhoef)
 
+Are there more commands where v:swapcommand can be set to something useful?
+
 Awaiting response:
 -   Win32: tearoff menu window should have a scrollbar when it's taller than
     the screen.
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt*  For Vim version 7.0aa.  Last change: 2005 Dec 09
+*version7.txt*  For Vim version 7.0aa.  Last change: 2005 Dec 11
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -400,12 +400,8 @@ Win32: The ":winpos" command now also wo
 |:diffoff|		Switch off diff mode in the current window or in all
 			windows.
 
-|:keepalt|		Do not change the alternate file.
-
 |:delmarks|		Delete marks.
 
-|:sandbox|		Command modifier: execute the argument in the sandbox.
-
 |:exusage|		Help for Ex commands (Nvi command).
 
 |:viusage|		Help for Vi commands (Nvi command).
@@ -422,6 +418,14 @@ Win32: The ":winpos" command now also wo
 |:cexpr|		Read error messages from a Vim expression (Yegappan
 			Lakshmanan).
 
+Ex command modifiers: ~
+
+|:keepalt|		Do not change the alternate file.
+
+|:noautocmd|		Do not trigger autocommand events.
+
+|:sandbox|		Execute a command in the sandbox.
+
 
 New and extended functions: ~
 
@@ -607,6 +611,12 @@ window height.
 The |v:scrollstart| variable has been added to help finding the location in
 your script that causes the hit-enter prompt.
 
+To make it possible to handle the situation that a file is being edited that
+is already being edited by another Vim instance, the |SwapExists| event has
+been added.  The |v:swapname|, |v:swapchoice| and |v:swapcommand| variables
+can be used, for example to use the |client-server| functionality to bring the
+other Vim to the foreground.
+
 ==============================================================================
 IMPROVEMENTS						*improvements-7*
 
@@ -854,6 +864,11 @@ added to the session file to set 'filety
 In the ATTENTION prompt put the "Delete it" choice before "Quit" to make it
 more logical.  (Robert Webb)
 
+When appending to a file while the buffer has no name the name of the appended
+file would be used for the current buffer.  But the buffer contents is
+actually different from the file content.  Don't set the file name, unless the
+'P' flag is present in 'cpoptions'.
+
 ==============================================================================
 COMPILE TIME CHANGES					*compile-changes-7*
 
@@ -1350,7 +1365,7 @@ When reporting a conversion error the li
 given.  Now report the first encountered error.
 
 When using ":e ++enc=name file" and iconv() was used for conversion an error
-caused a fallback to no conversion.  Now replace a character with '?' and
+caused a fall-back to no conversion.  Now replace a character with '?' and
 continue.
 
 When opening a new buffer the local value of 'bomb' was not initialized from
@@ -1417,4 +1432,10 @@ echoed anyway.  Set terminal to raw mode
 
 Unix: ":w a;b~c" caused an error in expanding wildcards.
 
+When appending to a file with ":w >>fname" in a buffer without a name, causing
+the buffer to use "fname", the modified flag was reset.
+
+When appending to to current file the "not edited" flag would be reset.
+":w" would overwrite the file accidentally.
+
  vim:tw=78:ts=8:ft=help:norl:
--- a/src/eval.c
+++ b/src/eval.c
@@ -340,6 +340,7 @@ static struct vimvar
     {VV_NAME("scrollstart",	 VAR_STRING), 0},
     {VV_NAME("swapname",	 VAR_STRING), VV_RO},
     {VV_NAME("swapchoice",	 VAR_STRING), 0},
+    {VV_NAME("swapcommand",	 VAR_STRING), VV_RO},
 };
 
 /* shorthand */
--- a/src/main.c
+++ b/src/main.c
@@ -3492,6 +3492,15 @@ eval_client_expr_to_string(expr)
     redir_off = save_ro;
     --emsg_skip;
 
+    /* A client can tell us to redraw, but not to display the cursor, so do
+     * that here. */
+    setcursor();
+    out_flush();
+#ifdef FEAT_GUI
+    if (gui.in_use)
+	gui_update_cursor(FALSE, FALSE);
+#endif
+
     return res;
 }