]> granicus.if.org Git - vim/commitdiff
updated for version 7.0182 v7.0182
authorBram Moolenaar <Bram@vim.org>
Thu, 19 Jan 2006 22:16:24 +0000 (22:16 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 19 Jan 2006 22:16:24 +0000 (22:16 +0000)
17 files changed:
runtime/doc/options.txt
runtime/doc/starting.txt
runtime/doc/syntax.txt
runtime/doc/tags
runtime/doc/todo.txt
runtime/doc/version7.txt
runtime/doc/windows.txt
runtime/syntax/java.vim
runtime/syntax/m4.vim
src/edit.c
src/ex_cmds.c
src/ex_getln.c
src/globals.h
src/gui_gtk_x11.c
src/structs.h
src/undo.c
src/version.h

index c6535366dc8a5a4613792dff455bc81f71239fb3..16c36db2ca464c572f9cfb17afe0d58342ac0625 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 7.0aa.  Last change: 2006 Jan 04
+*options.txt*  For Vim version 7.0aa.  Last change: 2006 Jan 19
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1982,11 +1982,11 @@ A jump table for the options with a short description can be found at |Q_op|.
                        C-indenting.
                                                                *cpo--*
                -       When included, a vertical movement command fails when
-                       it would above the first line or below the last line.
-                       Without it the cursor moves to the first or last line,
-                       unless it already was in that line.
+                       it would go above the first line or below the last
+                       line.  Without it the cursor moves to the first or
+                       last line, unless it already was in that line.
                        Applies to the commands "-", "k", CTRL-P, "+", "j",
-                       CTRL-N and CTRL-J.
+                       CTRL-N, CTRL-J and ":1234".
                                                                *cpo-+*
                +       When included, a ":write file" command will reset the
                        'modified' flag of the buffer, even though the buffer
index 55ca07351743fc21b52c8c0b165153460bfc931f..1579e214190f26427d97574f2ab6b86eeb658fc2 100644 (file)
@@ -1,4 +1,4 @@
-*starting.txt*  For Vim version 7.0aa.  Last change: 2005 Dec 04
+*starting.txt*  For Vim version 7.0aa.  Last change: 2006 Jan 19
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -799,8 +799,9 @@ accordingly.  Vim proceeds in this order:
        - The |--noplugin| command line argument is used.
        - The "-u NONE" command line argument is used |-u|.
        - When Vim was compiled without the |+eval| feature.
-       Note that using "-c set noloadplugins" doesn't work, because the
-       commands from the command line have not been executed yet.
+       Note that using "-c 'set noloadplugins'" doesn't work, because the
+       commands from the command line have not been executed yet.  You can
+       use "--cmd 'set noloadplugins'" |--cmd|.
 
 5. Set 'shellpipe' and 'shellredir'
        The 'shellpipe' and 'shellredir' options are set according to the
index 2ded3f2eb4e868cdbe63d19052cb5cf6c1535d31..4b27b68f76888ca63be82a2c25cb8aaf8d6139c5 100644 (file)
@@ -1,4 +1,4 @@
-*syntax.txt*   For Vim version 7.0aa.  Last change: 2005 Dec 31
+*syntax.txt*   For Vim version 7.0aa.  Last change: 2006 Jan 17
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1884,6 +1884,13 @@ If you want to fold blocks in if statements, etc. as well set the following: >
 
        :let perl_fold_blocks = 1
 
+To avoid folding packages or subs when perl_fold is let, let the appropriate
+variable(s): >
+
+       :unlet perl_nofold_packages
+       :unlet perl_nofold_subs
+
+
 
 PHP3 and PHP4          *php.vim* *php3.vim* *ft-php-syntax* *ft-php3-syntax*
 
index b585a8b498489c3a6d70e219b5f7b0ee46341251..2174f20c618ce19fb3f8b3e7b8bb9481fd707b05 100644 (file)
@@ -5349,7 +5349,6 @@ hebrew    hebrew.txt      /*hebrew*
 hebrew.txt     hebrew.txt      /*hebrew.txt*
 help   various.txt     /*help*
 help-context   help.txt        /*help-context*
-help-tags      tags    1
 help-translated        various.txt     /*help-translated*
 help-xterm-window      various.txt     /*help-xterm-window*
 help.txt       help.txt        /*help.txt*
index 5de02e686c6678014a9fe835129437576338067b..da95e6072370d39bc1bfd634da5981d8638b2ae9 100644 (file)
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2006 Jan 14
+*todo.txt*      For Vim version 7.0aa.  Last change: 2006 Jan 19
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -30,12 +30,6 @@ be worked on, but only if you sponsor Vim development.  See |sponsor|.
                                                        *known-bugs*
 -------------------- Known bugs and current work -----------------------
 
-When the file "" exists, then ":!ls aap<Tab>" should put backslashes before
-'&', ';', '<' and '>'.
-
-Evaluating CTRL-R = in the sandbox causes trouble (G. Sumner Hayes).  Can the
-rules for the commandline window be used?
-
 Evaluate 'balloonexpr' in the sandbox only when it was set from an unsafe
 place (e.g., modeline)?  Patch from Sumner Hayes, Jan 12.  Also use for other
 options?
@@ -43,6 +37,13 @@ options?
 ":saveas asdf.c" should set 'filetype' to c when it's empty.  Also for ":w
 asdf.c" when it sets the buffer filename.
 
+When ":cclose" is used the buffer is not wiped out and is no longer recognized
+as a quickfix buffer, thus it's not reused either.
+
+Patch to support lists and dicts for the Python interface. (G. Sumner Hayes,
+Jan 12).  Docs in a previous patch.
+Use free_tv() instead of clear_tv() and vim_free().
+
 ccomplete:
 - When using page-up/page-down in menu it sometimes jumps more than a page.
 - When an option is set: In completion mode and the user types (identifier)
@@ -125,10 +126,6 @@ global_event_filter() for GTK.
 Is it easy to have an item in a pattern that matches with a mark location?
 Similar to |/\%>l| and |/\%c|.  (Benji Fisher)
 
-Patch to support lists and dicts for the Python interface. (G. Sumner Hayes,
-Jan 12).  Docs in a previous patch.
-Use free_tv() instead of clear_tv() and vim_free().
-
 Win32 installer: Default _vimrc contains absolute path to diff.exe.  After
 upgrading it becomes invalid.  Fix it automatically somehow?  Use $VIMRUNTIME
 in the path instead of filling it the path?  At least give a clear error
index 00830d98dbc7260b21be0a61f90639778cb1ea72..5743a797101b246a4be13f8cefc504f68e9df185 100644 (file)
@@ -1,4 +1,4 @@
-*version7.txt*  For Vim version 7.0aa.  Last change: 2006 Jan 14
+*version7.txt*  For Vim version 7.0aa.  Last change: 2006 Jan 19
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1527,8 +1527,9 @@ When 'esckeys' is not set don't send the xterm code to request the version
 string, because it may cause trouble in Insert mode.
 
 When evaluating an expression for CTRL-R = on the command line it was possible
-to open a new window, resulting in errors for incremental search, and many
-other nasty things were possible.  Now evaluate the expression in the sandbox
+to call a function that opens a new window, resulting in errors for
+incremental search, and many other nasty things were possible.  Now set
+"cmdline_busy" and disallow changing the buffer or jumpting to another window
 to protect from unexpected behavior.  Same for CTRL-\ e.
 
 "d(" deleted the character under the cursor, while the documentation specified
@@ -1566,4 +1567,11 @@ Added mf_set_dirty().
 Expanding wildcards in a command like ":e aap;<>!" didn't work.  Put
 backslashes before characters that are special to the shell. (Adri Verhoef)
 
+A CursorHold autocommand would cause a message to be cleared.  Don't show the
+special key for the event for 'showcmd'.
+
+When expanding a file name for a shell command, as in "!cmd foo<Tab>" or ":r
+!cmd foo<Tab>" also escape characters that are special for the shell:
+"!;&()<>".
+
  vim:tw=78:ts=8:ft=help:norl:
index 8fd9666195f0e42245873c47713741ed15278007..6912808c045ebe77b2791ee66dde9c4767cd9801 100644 (file)
@@ -1,4 +1,4 @@
-*windows.txt*   For Vim version 7.0aa.  Last change: 2005 Apr 01
+*windows.txt*   For Vim version 7.0aa.  Last change: 2006 Jan 19
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1100,18 +1100,18 @@ help            Contains a help file.  Will only be created with the |:help|
 
 directory      Displays directory contents.  Can be used by a file explorer
                plugin.  The buffer is created with these settings: >
-                       :set buftype=nowrite
-                       :set bufhidden=delete
-                       :set noswapfile
+                       :setlocal buftype=nowrite
+                       :setlocal bufhidden=delete
+                       :setlocal noswapfile
 <              The buffer name is the name of the directory and is adjusted
                when using the |:cd| command.
 
 scratch                Contains text that can be discarded at any time.  It is kept
                when closing the window, it must be deleted explicitly.
                Settings: >
-                       :set buftype=nofile
-                       :set bufhidden=hide
-                       :set noswapfile
+                       :setlocal buftype=nofile
+                       :setlocal bufhidden=hide
+                       :setlocal noswapfile
 <              The buffer name can be used to identify the buffer.
 
                                                *unlisted-buffer*
@@ -1119,7 +1119,7 @@ unlisted  The buffer is not in the buffer list.  It is not used for
                normal editing, but to show a help file, remember a file name
                or marks.  The ":bdelete" command will also set this option,
                thus it doesn't completely delete the buffer.  Settings: >
-                       :set nobuflisted
+                       :setlocal nobuflisted
 <
 
  vim:tw=78:ts=8:ft=help:norl:
index c6363d9d8defa35b59811d6094038525f3837c55..0c250c643f4b35b16917eca7753cdc6049501881 100644 (file)
@@ -2,7 +2,7 @@
 " Language:     Java
 " Maintainer:   Claudio Fleiner <claudio@fleiner.com>
 " URL:         http://www.fleiner.com/vim/syntax/java.vim
-" Last Change:  2005 Nov 04
+" Last Change:  2006 Jan 15
 
 " Please check :help java.vim for comments on some of the options available.
 
@@ -65,48 +65,42 @@ syn match   javaUserLabelRef        "\k\+" contained
 syn match   javaVarArg          "\.\.\."
 syn keyword javaScopeDecl      public protected private abstract
 
-if exists("java_highlight_java_lang_ids") || exists("java_highlight_java_lang") || exists("java_highlight_all")
+if exists("java_highlight_java_lang_ids")
+  let java_highlight_all=1
+endif
+if exists("java_highlight_all")  || exists("java_highlight_java")  || exists("java_highlight_java_lang") 
   " java.lang.*
   syn match javaLangClass "\<System\>"
-  syn keyword javaLangClass  Cloneable Comparable Runnable Boolean Byte Class
-  syn keyword javaLangClass  Character CharSequence ClassLoader Compiler Double Float
-  syn keyword javaLangClass  Integer InheritableThreadLocal Long Math Number Object Package Process
-  syn keyword javaLangClass  Runtime RuntimePermission InheritableThreadLocal
-  syn keyword javaLangClass  SecurityManager Short String StrictMath StackTraceElement
-  syn keyword javaLangClass  StringBuffer Thread ThreadGroup
-  syn keyword javaLangClass  ThreadLocal Throwable Void ArithmeticException
-  syn keyword javaLangClass  ArrayIndexOutOfBoundsException AssertionError
-  syn keyword javaLangClass  ArrayStoreException ClassCastException
-  syn keyword javaLangClass  ClassNotFoundException
-  syn keyword javaLangClass  CloneNotSupportedException Exception
-  syn keyword javaLangClass  IllegalAccessException
-  syn keyword javaLangClass  IllegalArgumentException
-  syn keyword javaLangClass  IllegalMonitorStateException
-  syn keyword javaLangClass  IllegalStateException
-  syn keyword javaLangClass  IllegalThreadStateException
-  syn keyword javaLangClass  IndexOutOfBoundsException
-  syn keyword javaLangClass  InstantiationException InterruptedException
-  syn keyword javaLangClass  NegativeArraySizeException NoSuchFieldException
-  syn keyword javaLangClass  NoSuchMethodException NullPointerException
-  syn keyword javaLangClass  NumberFormatException RuntimeException
-  syn keyword javaLangClass  SecurityException StringIndexOutOfBoundsException
-  syn keyword javaLangClass  UnsupportedOperationException
-  syn keyword javaLangClass  AbstractMethodError ClassCircularityError
-  syn keyword javaLangClass  ClassFormatError Error ExceptionInInitializerError
-  syn keyword javaLangClass  IllegalAccessError InstantiationError
-  syn keyword javaLangClass  IncompatibleClassChangeError InternalError
-  syn keyword javaLangClass  LinkageError NoClassDefFoundError
-  syn keyword javaLangClass  NoSuchFieldError NoSuchMethodError
-  syn keyword javaLangClass  OutOfMemoryError StackOverflowError
-  syn keyword javaLangClass  ThreadDeath UnknownError UnsatisfiedLinkError
-  syn keyword javaLangClass  UnsupportedClassVersionError VerifyError
-  syn keyword javaLangClass  VirtualMachineError
+  syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException
+  syn cluster javaTop add=javaR_JavaLang
+  syn cluster javaClasses add=javaR_JavaLang
+  JavaHiLink javaR_JavaLang javaR_Java
+  syn keyword javaC_JavaLang Process RuntimePermission StringKeySet CharacterData01 Class ThreadLocal ThreadLocalMap CharacterData0E Package Character StringCoding Long ProcessImpl ProcessEnvironment Short AssertionStatusDirectives 1PackageInfoProxy UnicodeBlock InheritableThreadLocal AbstractStringBuilder StringEnvironment ClassLoader ConditionalSpecialCasing CharacterDataPrivateUse StringBuffer StringDecoder Entry StringEntry WrappedHook StringBuilder StrictMath State ThreadGroup Runtime CharacterData02 MethodArray Object CharacterDataUndefined Integer Gate Boolean Enum Variable Subset StringEncoder Void Terminator CharsetSD IntegerCache CharacterCache Byte CharsetSE Thread SystemClassLoaderAction CharacterDataLatin1 StringValues StackTraceElement Shutdown ShortCache String ConverterSD ByteCache Lock EnclosingMethodInfo Math Float Value Double SecurityManager LongCache ProcessBuilder StringEntrySet Compiler Number UNIXProcess ConverterSE ExternalData CaseInsensitiveComparator CharacterData00 NativeLibrary
+  syn cluster javaTop add=javaC_JavaLang
+  syn cluster javaClasses add=javaC_JavaLang
+  JavaHiLink javaC_JavaLang javaC_Java
+  syn keyword javaE_JavaLang IncompatibleClassChangeError InternalError UnknownError ClassCircularityError AssertionError ThreadDeath IllegalAccessError NoClassDefFoundError ClassFormatError UnsupportedClassVersionError NoSuchFieldError VerifyError ExceptionInInitializerError InstantiationError LinkageError NoSuchMethodError Error UnsatisfiedLinkError StackOverflowError AbstractMethodError VirtualMachineError OutOfMemoryError
+  syn cluster javaTop add=javaE_JavaLang
+  syn cluster javaClasses add=javaE_JavaLang
+  JavaHiLink javaE_JavaLang javaE_Java
+  syn keyword javaX_JavaLang CloneNotSupportedException Exception NoSuchMethodException IllegalAccessException NoSuchFieldException Throwable InterruptedException ClassNotFoundException InstantiationException
+  syn cluster javaTop add=javaX_JavaLang
+  syn cluster javaClasses add=javaX_JavaLang
+  JavaHiLink javaX_JavaLang javaX_Java
+
+  JavaHiLink javaR_Java javaR_
+  JavaHiLink javaC_Java javaC_
+  JavaHiLink javaE_Java javaE_
+  JavaHiLink javaX_Java javaX_
+  JavaHiLink javaX_                 javaExceptions
+  JavaHiLink javaR_                 javaExceptions
+  JavaHiLink javaE_                 javaExceptions
+  JavaHiLink javaC_                 javaConstant
+
   syn keyword javaLangObject clone equals finalize getClass hashCode
   syn keyword javaLangObject notify notifyAll toString wait
-  JavaHiLink javaLangClass                  javaConstant
   JavaHiLink javaLangObject                 javaConstant
-  syn cluster javaTop add=javaLangObject,javaLangClass
-  syn cluster javaClasses add=javaLangClass
+  syn cluster javaTop add=javaLangObject
 endif
 
 if filereadable(expand("<sfile>:p:h")."/javaid.vim")
@@ -162,13 +156,15 @@ if !exists("java_ignore_javadoc") && main_syntax != 'jsp'
   " syntax coloring for javadoc comments (HTML)
   syntax include @javaHtml <sfile>:p:h/html.vim
   unlet b:current_syntax
-  syn region  javaDocComment    start="/\*\*"  end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaTodo,@Spell
-  syn region  javaCommentTitle  contained matchgroup=javaDocComment start="/\*\*"   matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags
-
-  syn region javaDocTags  contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
-  syn match  javaDocTags  contained "@\(see\|param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
-  syn match  javaDocParam contained "\s\S\+"
-  syn match  javaDocTags  contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>"
+  syn region  javaDocComment    start="/\*\*"  end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaDocSeeTag,javaTodo,@Spell
+  syn region  javaCommentTitle  contained matchgroup=javaDocComment start="/\*\*"   matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags,javaDocSeeTag
+
+  syn region javaDocTags         contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}"
+  syn match  javaDocTags         contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
+  syn match  javaDocParam        contained "\s\S\+"
+  syn match  javaDocTags         contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>"
+  syn region javaDocSeeTag       contained matchgroup=javaDocTags start="@see\s\+" matchgroup=NONE end="\_."re=e-1 contains=javaDocSeeTagParam
+  syn match  javaDocSeeTagParam  contained @"\_[^"]\+"\|<a\s\+\_.\{-}</a>\|\(\k\|\.\)*\(#\k\+\((\_[^)]\+)\)\=\)\=@ extend
   syntax case match
 endif
 
@@ -323,6 +319,7 @@ if version >= 508 || !exists("did_java_syn_inits")
   JavaHiLink javaCommentTitle          SpecialComment
   JavaHiLink javaDocTags               Special
   JavaHiLink javaDocParam              Function
+  JavaHiLink javaDocSeeTagParam                Function
   JavaHiLink javaCommentStar           javaComment
 
   JavaHiLink javaType                  Type
index ef60a8ff79fbab8ec3eeb129e622f9bf96cd0493..ba7a294d14fa0e1d1d0b7a4282aeadcb2d804c10 100644 (file)
@@ -1,8 +1,8 @@
 " Vim syntax file
 " Language:            M4
-" Maintainer:  Claudio Fleiner
+" Maintainer:  Claudio Fleiner (claudio@fleiner.com)
 " URL:                 http://www.fleiner.com/vim/syntax/m4.vim
-" Last Change: 2001 Apr 26
+" Last Change: 2005 Jan 15
 
 " This file will highlight user function calls if they use only
 " capital letters and have at least one argument (i.e. the '('
@@ -23,9 +23,9 @@ endif
 " define the m4 syntax
 syn match  m4Variable contained "\$\d\+"
 syn match  m4Special  contained "$[@*#]"
-syn match  m4Comment  "dnl\>.*" contains=SpellErrors
-syn match  m4Constants "\(\<m4_\)\=__file__"
-syn match  m4Constants "\(\<m4_\)\=__line__"
+syn match  m4Comment  "\<\(m4_\)\=dnl\>.*" contains=SpellErrors
+syn match  m4Constants "\<\(m4_\)\=__file__"
+syn match  m4Constants "\<\(m4_\)\=__line__"
 syn keyword m4Constants divnum sysval m4_divnum m4_sysval
 syn region m4Paren    matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top
 syn region m4Command  matchgroup=m4Function  start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top
index 298ebc3c83d87e363a255a7bee0efc6c71397bbb..ab3558a9f975b95968eeed3d554c73c434e3cfa5 100644 (file)
@@ -289,6 +289,13 @@ edit(cmdchar, startln, count)
        return FALSE;
     }
 #endif
+    /* Don't allow changes in the buffer while editing the cmdline.  The
+     * caller of getcmdline() may get confused. */
+    if (cmdline_busy)
+    {
+       EMSG(_(e_secure));
+       return FALSE;
+    }
 
 #ifdef FEAT_INS_EXPAND
     ins_compl_clear();     /* clear stuff for CTRL-X mode */
index c4fd0c4bd0a99e3206c9fbd269013cfb35d6c749..e192d100c5f1189d9878afe8487c06b7139ced48 100644 (file)
@@ -2841,11 +2841,11 @@ check_readonly(forceit, buf)
 }
 
 /*
- * try to abandon current file and edit a new or existing file
- * 'fnum' is the number of the file, if zero use ffname/sfname
+ * Try to abandon current file and edit a new or existing file.
+ * 'fnum' is the number of the file, if zero use ffname/sfname.
  *
- * return 1 for "normal" error, 2 for "not written" error, 0 for success
- * -1 for succesfully opening another file
+ * Return 1 for "normal" error, 2 for "not written" error, 0 for success
+ * -1 for succesfully opening another file.
  * 'lnum' is the line number for the cursor in the new file (if non-zero).
  */
     int
@@ -2861,10 +2861,8 @@ getfile(fnum, ffname, sfname, setpm, lnum, forceit)
     int                retval;
     char_u     *free_me = NULL;
 
-#ifdef FEAT_CMDWIN
-    if (cmdwin_type != 0)
+    if (editing_cmdline())
        return 1;
-#endif
 
     if (fnum == 0)
     {
index 95109534aabb7df2644a70f1b404a3f8743084c8..b1142c472f8f202c2b5898aedafafaeea950439b 100644 (file)
@@ -258,6 +258,9 @@ getcmdline(firstc, count, indent)
     }
     xpc.xp_context = EXPAND_NOTHING;
     xpc.xp_backslash = XP_BS_NONE;
+#ifndef BACKSLASH_IN_FILENAME
+    xpc.xp_shell = FALSE;
+#endif
 
 #if defined(FEAT_EVAL)
     if (ccline.input_fn)
@@ -658,17 +661,13 @@ getcmdline(firstc, count, indent)
                restore_cmdline(&save_ccline);
                if (c == '=')
                {
-                   /* Need to save and restore ccline.  And go into the
-                    * sandbox to avoid nasty things like going to another
-                    * buffer when evaluating an expression. */
+                   /* Need to save and restore ccline.  And set cmdline_busy
+                    * to avoid nasty things like going to another buffer when
+                    * evaluating an expression. */
                    save_cmdline(&save_ccline);
-#ifdef HAVE_SANDBOX
-                   ++sandbox;
-#endif
+                   ++cmdline_busy;
                    p = get_expr_line();
-#ifdef HAVE_SANDBOX
-                   --sandbox;
-#endif
+                   --cmdline_busy;
                    restore_cmdline(&save_ccline);
 
                    if (p != NULL && realloc_cmdbuff((int)STRLEN(p) + 1) == OK)
@@ -1875,6 +1874,35 @@ getcmdline_prompt(firstc, prompt, attr, xp_context, xp_arg)
 }
 #endif
 
+/*
+ * Return TRUE when the command line is being edited.  That means the current
+ * buffer and window can't be changed.
+ */
+    int
+editing_cmdline()
+{
+#ifdef FEAT_CMDWIN
+    if (cmdwin_type != 0)
+       return TRUE;
+#endif
+    return cmdline_busy;
+}
+
+/*
+ * Give an error message for a command that isn't allowed while the cmdline
+ * window is open or editing the cmdline in another way.
+ */
+    void
+editing_cmdline_msg()
+{
+#ifdef FEAT_CMDWIN
+    if (cmdwin_type != 0)
+       EMSG(_(e_cmdwin));
+    else
+#endif
+       EMSG(_(e_secure));
+}
+
     static int
 cmdline_charsize(idx)
     int                idx;
@@ -2786,17 +2814,12 @@ cmdline_paste(regname, literally)
     regname = may_get_selection(regname);
 #endif
 
-    /* Need to save and restore ccline.  And go into the sandbox to avoid
-     * nasty things like going to another buffer when evaluating an
-     * expression. */
+    /* Need to save and restore ccline.  And set cmdline_busy to avoid nasty
+     * things like going to another buffer when evaluating an expression. */
     save_cmdline(&save_ccline);
-#ifdef HAVE_SANDBOX
-    ++sandbox;
-#endif
+    ++cmdline_busy;
     i = get_spec_reg(regname, &arg, &allocated, TRUE);
-#ifdef HAVE_SANDBOX
-    --sandbox;
-#endif
+    --cmdline_busy;
     restore_cmdline(&save_ccline);
 
     if (i)
@@ -3368,8 +3391,14 @@ ExpandInit(xp)
     expand_T   *xp;
 {
     xp->xp_backslash = XP_BS_NONE;
+#ifndef BACKSLASH_IN_FILENAME
+    xp->xp_shell = FALSE;
+#endif
     xp->xp_numfiles = -1;
     xp->xp_files = NULL;
+#if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
+    xp->xp_arg = NULL;
+#endif
 }
 
 /*
@@ -3446,7 +3475,8 @@ ExpandEscape(xp, str, numfiles, files, options)
                    p = vim_strsave_escaped(files[i], buf);
                }
 #else
-               p = vim_strsave_escaped(files[i], PATH_ESC_CHARS);
+               p = vim_strsave_escaped(files[i],
+                            xp->xp_shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS);
 #endif
                if (p != NULL)
                {
@@ -4527,8 +4557,9 @@ globpath(path, file)
     if (buf == NULL)
        return NULL;
 
+    ExpandInit(&xpc);
     xpc.xp_context = EXPAND_FILES;
-    xpc.xp_backslash = XP_BS_NONE;
+
     ga_init2(&ga, 1, 100);
 
     /* Loop over all entries in {path}. */
index c22466c069d24f75f77da0abd0ba2187b6132a99..9c81e4efbff6757d17b6db23fb28b8533131caee 100644 (file)
@@ -86,6 +86,8 @@ EXTERN int    clear_cmdline INIT(= FALSE);    /* cmdline must be cleared */
 #if defined(FEAT_CRYPT) || defined(FEAT_EVAL)
 EXTERN int     cmdline_star INIT(= FALSE);     /* cmdline is crypted */
 #endif
+EXTERN int     cmdline_busy INIT(= FALSE);     /* editing the cmdline */
+
 EXTERN int     exec_from_reg INIT(= FALSE);    /* executing register */
 
 EXTERN int     screen_cleared INIT(= FALSE);   /* screen has been cleared */
index 84c5fe4064cef8dd363206b2e1b55a57ee18512e..1502e0c1c07519d645f47fb4da9d8c6959266b5f 100644 (file)
@@ -2328,7 +2328,6 @@ sm_client_die(GnomeClient *client, gpointer data)
     vim_strncpy(IObuff,
                    _("Vim: Received \"die\" request from session manager\n"),
            IOSIZE - 1);
-    deadly_exit = TRUE;
     preserve_exit();
 }
 
index 5420b4e4bd90021176231d7cd2b6418734bd7cb5..b71f592b0bc874e12da652abf2ae16ee7c1d8f25 100644 (file)
@@ -401,6 +401,10 @@ typedef struct expand
     int                xp_scriptID;            /* SID for completion function */
 #endif
     int                xp_backslash;           /* one of the XP_BS_ values */
+#ifndef BACKSLASH_IN_FILENAME
+    int                xp_shell;               /* for a shell command more characters
+                                          need to be escaped */
+#endif
     int                xp_numfiles;            /* number of files found by
                                                    file name completion */
     char_u     **xp_files;             /* list of files */
index 34e1f400d7335c93617b1622f9ecbb31c87b4bca..1b69cf1113ff18593d9be76ed066f5f56bf4b564 100644 (file)
@@ -52,6 +52,7 @@
 
 static u_entry_T *u_get_headentry __ARGS((void));
 static void u_getbot __ARGS((void));
+static int undo_allowed __ARGS((void));
 static int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T));
 static void u_doit __ARGS((int count));
 static void u_undoredo __ARGS((void));
@@ -156,40 +157,57 @@ u_savedel(lnum, nlines)
                        nlines == curbuf->b_ml.ml_line_count ? 2 : lnum));
 }
 
+/*
+ * Return TRUE when undo is allowed.  Otherwise give an error message and
+ * return FALSE.
+ */
     static int
-u_savecommon(top, bot, newbot)
-    linenr_T   top, bot;
-    linenr_T   newbot;
+undo_allowed()
 {
-    linenr_T           lnum;
-    long               i;
-    struct u_header    *uhp;
-    u_entry_T          *uep;
-    u_entry_T          *prev_uep;
-    long               size;
-
-    /*
-     * Don't allow changes when 'modifiable' is off.  Letting the
-     * undo fail is a crude way to make all change commands fail.
-     */
+    /* Don't allow changes when 'modifiable' is off.  */
     if (!curbuf->b_p_ma)
     {
        EMSG(_(e_modifiable));
-       return FAIL;
+       return FALSE;
     }
 
 #ifdef HAVE_SANDBOX
-    /*
-     * In the sandbox it's not allowed to change the text.  Letting the
-     * undo fail is a crude way to make all change commands fail.
-     */
+    /* In the sandbox it's not allowed to change the text. */
     if (sandbox != 0)
     {
        EMSG(_(e_sandbox));
-       return FAIL;
+       return FALSE;
     }
 #endif
 
+    /* Don't allow changes in the buffer while editing the cmdline.  The
+     * caller of getcmdline() may get confused. */
+    if (cmdline_busy)
+    {
+       EMSG(_(e_secure));
+       return FALSE;
+    }
+
+    return TRUE;
+}
+
+    static int
+u_savecommon(top, bot, newbot)
+    linenr_T   top, bot;
+    linenr_T   newbot;
+{
+    linenr_T           lnum;
+    long               i;
+    struct u_header    *uhp;
+    u_entry_T          *uep;
+    u_entry_T          *prev_uep;
+    long               size;
+
+    /* When making changes is not allowed return FAIL.  It's a crude way to
+     * make all change commands fail. */
+    if (!undo_allowed())
+       return FAIL;
+
 #ifdef FEAT_NETBEANS_INTG
     /*
      * Netbeans defines areas that cannot be modified.  Bail out here when
@@ -484,20 +502,8 @@ u_redo(count)
 u_doit(count)
     int count;
 {
-    /* Don't allow changes when 'modifiable' is off. */
-    if (!curbuf->b_p_ma)
-    {
-       EMSG(_(e_modifiable));
-       return;
-    }
-#ifdef HAVE_SANDBOX
-    /* In the sandbox it's not allowed to change the text. */
-    if (sandbox != 0)
-    {
-       EMSG(_(e_sandbox));
+    if (!undo_allowed())
        return;
-    }
-#endif
 
     u_newcount = 0;
     u_oldcount = 0;
index 3cb3dd984c95de2b8affbede0d90d979c016463d..0251f806c47a79c00e44f38197b374d2f03a67de 100644 (file)
@@ -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 (2006 Jan 14)"
-#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 14, compiled "
+#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 19)"
+#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 19, compiled "