0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

updated for version 7.0182

This commit is contained in:
Bram Moolenaar
2006-01-19 22:16:24 +00:00
parent 05a7bb363b
commit 8ada17c4d9
17 changed files with 200 additions and 144 deletions

View 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 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. C-indenting.
*cpo--* *cpo--*
- When included, a vertical movement command fails when - When included, a vertical movement command fails when
it would above the first line or below the last line. it would go above the first line or below the last
Without it the cursor moves to the first or last line, line. Without it the cursor moves to the first or
unless it already was in that line. last line, unless it already was in that line.
Applies to the commands "-", "k", CTRL-P, "+", "j", Applies to the commands "-", "k", CTRL-P, "+", "j",
CTRL-N and CTRL-J. CTRL-N, CTRL-J and ":1234".
*cpo-+* *cpo-+*
+ When included, a ":write file" command will reset the + When included, a ":write file" command will reset the
'modified' flag of the buffer, even though the buffer 'modified' flag of the buffer, even though the buffer

View 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 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -799,8 +799,9 @@ accordingly. Vim proceeds in this order:
- The |--noplugin| command line argument is used. - The |--noplugin| command line argument is used.
- The "-u NONE" command line argument is used |-u|. - The "-u NONE" command line argument is used |-u|.
- When Vim was compiled without the |+eval| feature. - When Vim was compiled without the |+eval| feature.
Note that using "-c set noloadplugins" doesn't work, because the Note that using "-c 'set noloadplugins'" doesn't work, because the
commands from the command line have not been executed yet. commands from the command line have not been executed yet. You can
use "--cmd 'set noloadplugins'" |--cmd|.
5. Set 'shellpipe' and 'shellredir' 5. Set 'shellpipe' and 'shellredir'
The 'shellpipe' and 'shellredir' options are set according to the The 'shellpipe' and 'shellredir' options are set according to the

View 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 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 :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* PHP3 and PHP4 *php.vim* *php3.vim* *ft-php-syntax* *ft-php3-syntax*

View File

@@ -5349,7 +5349,6 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt* hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help* help various.txt /*help*
help-context help.txt /*help-context* help-context help.txt /*help-context*
help-tags tags 1
help-translated various.txt /*help-translated* help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window* help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt* help.txt help.txt /*help.txt*

View 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 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*
-------------------- Known bugs and current work ----------------------- -------------------- 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 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 place (e.g., modeline)? Patch from Sumner Hayes, Jan 12. Also use for other
options? options?
@@ -43,6 +37,13 @@ options?
":saveas asdf.c" should set 'filetype' to c when it's empty. Also for ":w ":saveas asdf.c" should set 'filetype' to c when it's empty. Also for ":w
asdf.c" when it sets the buffer filename. 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: ccomplete:
- When using page-up/page-down in menu it sometimes jumps more than a page. - 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) - 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? Is it easy to have an item in a pattern that matches with a mark location?
Similar to |/\%>l| and |/\%c|. (Benji Fisher) 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 Win32 installer: Default _vimrc contains absolute path to diff.exe. After
upgrading it becomes invalid. Fix it automatically somehow? Use $VIMRUNTIME 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 in the path instead of filling it the path? At least give a clear error

View 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 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. string, because it may cause trouble in Insert mode.
When evaluating an expression for CTRL-R = on the command line it was possible 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 to call a function that opens a new window, resulting in errors for
other nasty things were possible. Now evaluate the expression in the sandbox 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. to protect from unexpected behavior. Same for CTRL-\ e.
"d(" deleted the character under the cursor, while the documentation specified "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 Expanding wildcards in a command like ":e aap;<>!" didn't work. Put
backslashes before characters that are special to the shell. (Adri Verhoef) 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: vim:tw=78:ts=8:ft=help:norl:

View 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 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 directory Displays directory contents. Can be used by a file explorer
plugin. The buffer is created with these settings: > plugin. The buffer is created with these settings: >
:set buftype=nowrite :setlocal buftype=nowrite
:set bufhidden=delete :setlocal bufhidden=delete
:set noswapfile :setlocal noswapfile
< The buffer name is the name of the directory and is adjusted < The buffer name is the name of the directory and is adjusted
when using the |:cd| command. when using the |:cd| command.
scratch Contains text that can be discarded at any time. It is kept scratch Contains text that can be discarded at any time. It is kept
when closing the window, it must be deleted explicitly. when closing the window, it must be deleted explicitly.
Settings: > Settings: >
:set buftype=nofile :setlocal buftype=nofile
:set bufhidden=hide :setlocal bufhidden=hide
:set noswapfile :setlocal noswapfile
< The buffer name can be used to identify the buffer. < The buffer name can be used to identify the buffer.
*unlisted-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 normal editing, but to show a help file, remember a file name
or marks. The ":bdelete" command will also set this option, or marks. The ":bdelete" command will also set this option,
thus it doesn't completely delete the buffer. Settings: > thus it doesn't completely delete the buffer. Settings: >
:set nobuflisted :setlocal nobuflisted
< <
vim:tw=78:ts=8:ft=help:norl: vim:tw=78:ts=8:ft=help:norl:

View File

@@ -2,7 +2,7 @@
" Language: Java " Language: Java
" Maintainer: Claudio Fleiner <claudio@fleiner.com> " Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/java.vim " 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. " 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 match javaVarArg "\.\.\."
syn keyword javaScopeDecl public protected private abstract 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.* " java.lang.*
syn match javaLangClass "\<System\>" syn match javaLangClass "\<System\>"
syn keyword javaLangClass Cloneable Comparable Runnable Boolean Byte Class syn keyword javaR_JavaLang NegativeArraySizeException ArrayStoreException IllegalStateException RuntimeException IndexOutOfBoundsException UnsupportedOperationException ArrayIndexOutOfBoundsException ArithmeticException ClassCastException EnumConstantNotPresentException StringIndexOutOfBoundsException IllegalArgumentException IllegalMonitorStateException IllegalThreadStateException NumberFormatException NullPointerException TypeNotPresentException SecurityException
syn keyword javaLangClass Character CharSequence ClassLoader Compiler Double Float syn cluster javaTop add=javaR_JavaLang
syn keyword javaLangClass Integer InheritableThreadLocal Long Math Number Object Package Process syn cluster javaClasses add=javaR_JavaLang
syn keyword javaLangClass Runtime RuntimePermission InheritableThreadLocal JavaHiLink javaR_JavaLang javaR_Java
syn keyword javaLangClass SecurityManager Short String StrictMath StackTraceElement 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 keyword javaLangClass StringBuffer Thread ThreadGroup syn cluster javaTop add=javaC_JavaLang
syn keyword javaLangClass ThreadLocal Throwable Void ArithmeticException syn cluster javaClasses add=javaC_JavaLang
syn keyword javaLangClass ArrayIndexOutOfBoundsException AssertionError JavaHiLink javaC_JavaLang javaC_Java
syn keyword javaLangClass ArrayStoreException ClassCastException 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 keyword javaLangClass ClassNotFoundException syn cluster javaTop add=javaE_JavaLang
syn keyword javaLangClass CloneNotSupportedException Exception syn cluster javaClasses add=javaE_JavaLang
syn keyword javaLangClass IllegalAccessException JavaHiLink javaE_JavaLang javaE_Java
syn keyword javaLangClass IllegalArgumentException syn keyword javaX_JavaLang CloneNotSupportedException Exception NoSuchMethodException IllegalAccessException NoSuchFieldException Throwable InterruptedException ClassNotFoundException InstantiationException
syn keyword javaLangClass IllegalMonitorStateException syn cluster javaTop add=javaX_JavaLang
syn keyword javaLangClass IllegalStateException syn cluster javaClasses add=javaX_JavaLang
syn keyword javaLangClass IllegalThreadStateException JavaHiLink javaX_JavaLang javaX_Java
syn keyword javaLangClass IndexOutOfBoundsException
syn keyword javaLangClass InstantiationException InterruptedException JavaHiLink javaR_Java javaR_
syn keyword javaLangClass NegativeArraySizeException NoSuchFieldException JavaHiLink javaC_Java javaC_
syn keyword javaLangClass NoSuchMethodException NullPointerException JavaHiLink javaE_Java javaE_
syn keyword javaLangClass NumberFormatException RuntimeException JavaHiLink javaX_Java javaX_
syn keyword javaLangClass SecurityException StringIndexOutOfBoundsException JavaHiLink javaX_ javaExceptions
syn keyword javaLangClass UnsupportedOperationException JavaHiLink javaR_ javaExceptions
syn keyword javaLangClass AbstractMethodError ClassCircularityError JavaHiLink javaE_ javaExceptions
syn keyword javaLangClass ClassFormatError Error ExceptionInInitializerError JavaHiLink javaC_ javaConstant
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 javaLangObject clone equals finalize getClass hashCode syn keyword javaLangObject clone equals finalize getClass hashCode
syn keyword javaLangObject notify notifyAll toString wait syn keyword javaLangObject notify notifyAll toString wait
JavaHiLink javaLangClass javaConstant
JavaHiLink javaLangObject javaConstant JavaHiLink javaLangObject javaConstant
syn cluster javaTop add=javaLangObject,javaLangClass syn cluster javaTop add=javaLangObject
syn cluster javaClasses add=javaLangClass
endif endif
if filereadable(expand("<sfile>:p:h")."/javaid.vim") 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 coloring for javadoc comments (HTML)
syntax include @javaHtml <sfile>:p:h/html.vim syntax include @javaHtml <sfile>:p:h/html.vim
unlet b:current_syntax unlet b:current_syntax
syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaTodo,@Spell 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 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 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 javaDocTags contained "@\(param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam
syn match javaDocParam contained "\s\S\+" syn match javaDocParam contained "\s\S\+"
syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>" 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 syntax case match
endif endif
@@ -323,6 +319,7 @@ if version >= 508 || !exists("did_java_syn_inits")
JavaHiLink javaCommentTitle SpecialComment JavaHiLink javaCommentTitle SpecialComment
JavaHiLink javaDocTags Special JavaHiLink javaDocTags Special
JavaHiLink javaDocParam Function JavaHiLink javaDocParam Function
JavaHiLink javaDocSeeTagParam Function
JavaHiLink javaCommentStar javaComment JavaHiLink javaCommentStar javaComment
JavaHiLink javaType Type JavaHiLink javaType Type

View File

@@ -1,8 +1,8 @@
" Vim syntax file " Vim syntax file
" Language: M4 " Language: M4
" Maintainer: Claudio Fleiner " Maintainer: Claudio Fleiner (claudio@fleiner.com)
" URL: http://www.fleiner.com/vim/syntax/m4.vim " 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 " This file will highlight user function calls if they use only
" capital letters and have at least one argument (i.e. the '(' " capital letters and have at least one argument (i.e. the '('
@@ -23,9 +23,9 @@ endif
" define the m4 syntax " define the m4 syntax
syn match m4Variable contained "\$\d\+" syn match m4Variable contained "\$\d\+"
syn match m4Special contained "$[@*#]" syn match m4Special contained "$[@*#]"
syn match m4Comment "dnl\>.*" contains=SpellErrors syn match m4Comment "\<\(m4_\)\=dnl\>.*" contains=SpellErrors
syn match m4Constants "\(\<m4_\)\=__file__" syn match m4Constants "\<\(m4_\)\=__file__"
syn match m4Constants "\(\<m4_\)\=__line__" syn match m4Constants "\<\(m4_\)\=__line__"
syn keyword m4Constants divnum sysval m4_divnum m4_sysval syn keyword m4Constants divnum sysval m4_divnum m4_sysval
syn region m4Paren matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top syn region m4Paren matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top
syn region m4Command matchgroup=m4Function start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top syn region m4Command matchgroup=m4Function start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top

View File

@@ -289,6 +289,13 @@ edit(cmdchar, startln, count)
return FALSE; return FALSE;
} }
#endif #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 #ifdef FEAT_INS_EXPAND
ins_compl_clear(); /* clear stuff for CTRL-X mode */ ins_compl_clear(); /* clear stuff for CTRL-X mode */

View File

@@ -2841,11 +2841,11 @@ check_readonly(forceit, buf)
} }
/* /*
* try to abandon current file and edit a new or existing file * Try to abandon current file and edit a new or existing file.
* 'fnum' is the number of the file, if zero use ffname/sfname * '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 * Return 1 for "normal" error, 2 for "not written" error, 0 for success
* -1 for succesfully opening another file * -1 for succesfully opening another file.
* 'lnum' is the line number for the cursor in the new file (if non-zero). * 'lnum' is the line number for the cursor in the new file (if non-zero).
*/ */
int int
@@ -2861,10 +2861,8 @@ getfile(fnum, ffname, sfname, setpm, lnum, forceit)
int retval; int retval;
char_u *free_me = NULL; char_u *free_me = NULL;
#ifdef FEAT_CMDWIN if (editing_cmdline())
if (cmdwin_type != 0)
return 1; return 1;
#endif
if (fnum == 0) if (fnum == 0)
{ {

View File

@@ -258,6 +258,9 @@ getcmdline(firstc, count, indent)
} }
xpc.xp_context = EXPAND_NOTHING; xpc.xp_context = EXPAND_NOTHING;
xpc.xp_backslash = XP_BS_NONE; xpc.xp_backslash = XP_BS_NONE;
#ifndef BACKSLASH_IN_FILENAME
xpc.xp_shell = FALSE;
#endif
#if defined(FEAT_EVAL) #if defined(FEAT_EVAL)
if (ccline.input_fn) if (ccline.input_fn)
@@ -658,17 +661,13 @@ getcmdline(firstc, count, indent)
restore_cmdline(&save_ccline); restore_cmdline(&save_ccline);
if (c == '=') if (c == '=')
{ {
/* Need to save and restore ccline. And go into the /* Need to save and restore ccline. And set cmdline_busy
* sandbox to avoid nasty things like going to another * to avoid nasty things like going to another buffer when
* buffer when evaluating an expression. */ * evaluating an expression. */
save_cmdline(&save_ccline); save_cmdline(&save_ccline);
#ifdef HAVE_SANDBOX ++cmdline_busy;
++sandbox;
#endif
p = get_expr_line(); p = get_expr_line();
#ifdef HAVE_SANDBOX --cmdline_busy;
--sandbox;
#endif
restore_cmdline(&save_ccline); restore_cmdline(&save_ccline);
if (p != NULL && realloc_cmdbuff((int)STRLEN(p) + 1) == OK) if (p != NULL && realloc_cmdbuff((int)STRLEN(p) + 1) == OK)
@@ -1875,6 +1874,35 @@ getcmdline_prompt(firstc, prompt, attr, xp_context, xp_arg)
} }
#endif #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 static int
cmdline_charsize(idx) cmdline_charsize(idx)
int idx; int idx;
@@ -2786,17 +2814,12 @@ cmdline_paste(regname, literally)
regname = may_get_selection(regname); regname = may_get_selection(regname);
#endif #endif
/* Need to save and restore ccline. And go into the sandbox to avoid /* Need to save and restore ccline. And set cmdline_busy to avoid nasty
* nasty things like going to another buffer when evaluating an * things like going to another buffer when evaluating an expression. */
* expression. */
save_cmdline(&save_ccline); save_cmdline(&save_ccline);
#ifdef HAVE_SANDBOX ++cmdline_busy;
++sandbox;
#endif
i = get_spec_reg(regname, &arg, &allocated, TRUE); i = get_spec_reg(regname, &arg, &allocated, TRUE);
#ifdef HAVE_SANDBOX --cmdline_busy;
--sandbox;
#endif
restore_cmdline(&save_ccline); restore_cmdline(&save_ccline);
if (i) if (i)
@@ -3368,8 +3391,14 @@ ExpandInit(xp)
expand_T *xp; expand_T *xp;
{ {
xp->xp_backslash = XP_BS_NONE; xp->xp_backslash = XP_BS_NONE;
#ifndef BACKSLASH_IN_FILENAME
xp->xp_shell = FALSE;
#endif
xp->xp_numfiles = -1; xp->xp_numfiles = -1;
xp->xp_files = NULL; 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); p = vim_strsave_escaped(files[i], buf);
} }
#else #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 #endif
if (p != NULL) if (p != NULL)
{ {
@@ -4527,8 +4557,9 @@ globpath(path, file)
if (buf == NULL) if (buf == NULL)
return NULL; return NULL;
ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES; xpc.xp_context = EXPAND_FILES;
xpc.xp_backslash = XP_BS_NONE;
ga_init2(&ga, 1, 100); ga_init2(&ga, 1, 100);
/* Loop over all entries in {path}. */ /* Loop over all entries in {path}. */

View File

@@ -86,6 +86,8 @@ EXTERN int clear_cmdline INIT(= FALSE); /* cmdline must be cleared */
#if defined(FEAT_CRYPT) || defined(FEAT_EVAL) #if defined(FEAT_CRYPT) || defined(FEAT_EVAL)
EXTERN int cmdline_star INIT(= FALSE); /* cmdline is crypted */ EXTERN int cmdline_star INIT(= FALSE); /* cmdline is crypted */
#endif #endif
EXTERN int cmdline_busy INIT(= FALSE); /* editing the cmdline */
EXTERN int exec_from_reg INIT(= FALSE); /* executing register */ EXTERN int exec_from_reg INIT(= FALSE); /* executing register */
EXTERN int screen_cleared INIT(= FALSE); /* screen has been cleared */ EXTERN int screen_cleared INIT(= FALSE); /* screen has been cleared */

View File

@@ -2328,7 +2328,6 @@ sm_client_die(GnomeClient *client, gpointer data)
vim_strncpy(IObuff, vim_strncpy(IObuff,
_("Vim: Received \"die\" request from session manager\n"), _("Vim: Received \"die\" request from session manager\n"),
IOSIZE - 1); IOSIZE - 1);
deadly_exit = TRUE;
preserve_exit(); preserve_exit();
} }

View File

@@ -401,6 +401,10 @@ typedef struct expand
int xp_scriptID; /* SID for completion function */ int xp_scriptID; /* SID for completion function */
#endif #endif
int xp_backslash; /* one of the XP_BS_ values */ 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 int xp_numfiles; /* number of files found by
file name completion */ file name completion */
char_u **xp_files; /* list of files */ char_u **xp_files; /* list of files */

View File

@@ -52,6 +52,7 @@
static u_entry_T *u_get_headentry __ARGS((void)); static u_entry_T *u_get_headentry __ARGS((void));
static void u_getbot __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 int u_savecommon __ARGS((linenr_T, linenr_T, linenr_T));
static void u_doit __ARGS((int count)); static void u_doit __ARGS((int count));
static void u_undoredo __ARGS((void)); static void u_undoredo __ARGS((void));
@@ -156,6 +157,40 @@ u_savedel(lnum, nlines)
nlines == curbuf->b_ml.ml_line_count ? 2 : lnum)); 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
undo_allowed()
{
/* Don't allow changes when 'modifiable' is off. */
if (!curbuf->b_p_ma)
{
EMSG(_(e_modifiable));
return FALSE;
}
#ifdef HAVE_SANDBOX
/* In the sandbox it's not allowed to change the text. */
if (sandbox != 0)
{
EMSG(_(e_sandbox));
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 static int
u_savecommon(top, bot, newbot) u_savecommon(top, bot, newbot)
linenr_T top, bot; linenr_T top, bot;
@@ -168,27 +203,10 @@ u_savecommon(top, bot, newbot)
u_entry_T *prev_uep; u_entry_T *prev_uep;
long size; long size;
/* /* When making changes is not allowed return FAIL. It's a crude way to
* Don't allow changes when 'modifiable' is off. Letting the * make all change commands fail. */
* undo fail is a crude way to make all change commands fail. if (!undo_allowed())
*/
if (!curbuf->b_p_ma)
{
EMSG(_(e_modifiable));
return FAIL; return FAIL;
}
#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.
*/
if (sandbox != 0)
{
EMSG(_(e_sandbox));
return FAIL;
}
#endif
#ifdef FEAT_NETBEANS_INTG #ifdef FEAT_NETBEANS_INTG
/* /*
@@ -484,20 +502,8 @@ u_redo(count)
u_doit(count) u_doit(count)
int count; int count;
{ {
/* Don't allow changes when 'modifiable' is off. */ if (!undo_allowed())
if (!curbuf->b_p_ma)
{
EMSG(_(e_modifiable));
return; return;
}
#ifdef HAVE_SANDBOX
/* In the sandbox it's not allowed to change the text. */
if (sandbox != 0)
{
EMSG(_(e_sandbox));
return;
}
#endif
u_newcount = 0; u_newcount = 0;
u_oldcount = 0; u_oldcount = 0;

View File

@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA" #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 14)" #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 14, compiled " #define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 19, compiled "