summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2006-01-19 22:09:32 +0000
committervimboss <devnull@localhost>2006-01-19 22:09:32 +0000
commite858ce8a74eaa6a54debe3836b4638852d2e0607 (patch)
tree97c44382074f466a7c5a3c31f8debe0127473ade
parentb5a622b3cc5345111b7519d5d4fbdbd72e61cab6 (diff)
downloadvim-e858ce8a74eaa6a54debe3836b4638852d2e0607.tar.gz
updated for version 7.0182
-rw-r--r--runtime/doc/cmdline.txt7
-rw-r--r--runtime/indent/php.vim40
-rw-r--r--runtime/spell/nl/nl_NL.diff92
-rw-r--r--src/buffer.c7
-rw-r--r--src/ex_docmd.c70
-rw-r--r--src/normal.c21
-rw-r--r--src/os_unix.c2
-rw-r--r--src/proto/ex_getln.pro2
-rw-r--r--src/vim.h1
-rw-r--r--src/window.c6
10 files changed, 172 insertions, 76 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index d12c1ea7..2fc068f2 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1,4 +1,4 @@
-*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Dec 30
+*cmdline.txt* For Vim version 7.0aa. Last change: 2006 Jan 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -153,8 +153,9 @@ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
*c_CTRL-R_=*
'=' the expression register: you are prompted to
enter an expression (see |expression|)
- (doesn't work at the expression prompt; uses
- the |sandbox| to avoid side effects)
+ (doesn't work at the expression prompt; some
+ things such as changing the buffer or current
+ window are not allowed to avoid side effects)
See |registers| about registers. {not in Vi}
Implementation detail: When using the |expression| register
and invoking setcmdpos(), this sets the position before
diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim
index 8d05b03b..de313814 100644
--- a/runtime/indent/php.vim
+++ b/runtime/indent/php.vim
@@ -2,8 +2,9 @@
" Language: PHP
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
-" Last Change: 2005 Nobember 21st
-" Version: 1.20
+" Last Change: 2006 January 15th
+" Newsletter: http://www.2072productions.com/?to=php-indent-for-vim-newsletter.php
+" Version: 1.23
"
" The change log and all the comments have been removed from this file.
"
@@ -11,14 +12,14 @@
" 2072productions.com at the URI provided above.
"
" If you find a bug, please e-mail me at John.wellesz (AT) teaser (DOT) fr
-" with an example of code that break the algorithm.
+" with an example of code that breaks the algorithm.
"
"
" Thanks a lot for using this script.
"
"
" NOTE: This script must be used with PHP syntax ON and with the php syntax
-" script by Lutz Eymers (http://www.isp.de/data/php.vim ) that's the script bundled with Gvim.
+" script by Lutz Eymers ( http://www.isp.de/data/php.vim ) that's the script bundled with Vim.
"
"
" In the case you have syntax errors in your script such as end of HereDoc
@@ -69,6 +70,10 @@
+
+
+
+
if exists("b:did_indent")
finish
endif
@@ -127,7 +132,7 @@ if &fileformat == "unix" && exists("PHP_removeCRwhenUnix") && PHP_removeCRwhenUn
endif
if exists("*GetPhpIndent")
- finish " XXX
+ finish " XXX
endif
let s:endline= '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
@@ -136,7 +141,13 @@ let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
function! GetLastRealCodeLNum(startline) " {{{
+
let lnum = a:startline
+
+ if b:GetLastRealCodeLNum_ADD && b:GetLastRealCodeLNum_ADD == lnum + 1
+ let lnum = b:GetLastRealCodeLNum_ADD
+ endif
+
let old_lnum = lnum
while lnum > 1
@@ -288,7 +299,7 @@ function! IslinePHP (lnum, tofind) " {{{
endfunction " }}}
let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\);'
-let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|[|&]\)'
+let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|else\>\|while\>\|switch\>\|for\%(each\)\=\>\|declare\>\|class\>\|interface\>\|abstract\>\|try\>\|catch\>\|[|&]\)'
let s:autorestoptions = 0
if ! s:autorestoptions
@@ -316,6 +327,8 @@ endfunc
function! GetPhpIndent()
+ let b:GetLastRealCodeLNum_ADD = 0
+
let UserIsEditing=0
if b:PHP_oldchangetick != b:changedtick
let b:PHP_oldchangetick = b:changedtick
@@ -361,7 +374,10 @@ function! GetPhpIndent()
if !b:InPHPcode_checked " {{{ One time check
let b:InPHPcode_checked = 1
- let synname = IslinePHP (prevnonblank(v:lnum), "")
+ let synname = ""
+ if cline !~ '<?.*?>'
+ let synname = IslinePHP (prevnonblank(v:lnum), "")
+ endif
if synname!=""
if synname != "phpHereDoc"
@@ -425,6 +441,7 @@ function! GetPhpIndent()
elseif cline =~? '<script\>'
let b:InPHPcode_and_script = 1
+ let b:GetLastRealCodeLNum_ADD = v:lnum
endif
endif
endif
@@ -453,11 +470,11 @@ function! GetPhpIndent()
endif
endif " }}}
+
if !b:InPHPcode && !b:InPHPcode_and_script
return -1
endif
-
" Indent successive // or # comment the same way the first is {{{
if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
if b:PHP_LastIndentedWasComment == 1
@@ -482,9 +499,11 @@ function! GetPhpIndent()
endif
endif
- if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*'
+ if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*' && cline !~ '\*/\s*$'
+ if getline(v:lnum + 1) !~ '^\s*\*'
+ return -1
+ endif
let b:PHP_InsideMultilineComment = 1
- return -1
endif " }}}
@@ -504,6 +523,7 @@ function! GetPhpIndent()
let s:level = 0
let lnum = GetLastRealCodeLNum(v:lnum - 1)
+
let last_line = getline(lnum)
let ind = indent(lnum)
let endline= s:endline
diff --git a/runtime/spell/nl/nl_NL.diff b/runtime/spell/nl/nl_NL.diff
index 2509250d..5de01c02 100644
--- a/runtime/spell/nl/nl_NL.diff
+++ b/runtime/spell/nl/nl_NL.diff
@@ -1,8 +1,8 @@
*** nl_NL.orig.aff Sun Jul 3 18:24:07 2005
---- nl_NL.aff Tue Aug 23 14:03:48 2005
+--- nl_NL.aff Thu Dec 29 19:42:56 2005
***************
*** 3,6 ****
---- 3,30 ----
+--- 3,31 ----
+ FOL ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
+ LOW ßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ
@@ -13,9 +13,10 @@
+
+ MIDWORD '-
+
-+ KEP =
-+ RAR ?
++ KEEPCASE =
++ RARE ?
+ BAD !
++ SLASH ,
+
NOSPLITSUGS
@@ -53,7 +54,7 @@
! SFX J 0 je [aeiou][bcdfgkpt]
! SFX J 0 jes [aeiou][bcdfgkpt]
---- 57,76 ----
+--- 58,77 ----
SFX J N 18
! SFX J 0 tje [aeiou][aeiou]
! SFX J 0 tjes [aeiou][aeiou]
@@ -79,7 +80,7 @@
REP ubi ibu
! REP croc krok
REP ten than
---- 277,279 ----
+--- 278,280 ----
REP ubi ibu
! REP croc krok
REP ten than
@@ -88,7 +89,7 @@
REP capucino cappuccino
! REP celcius Celsius
REP kado cadeau
---- 312,314 ----
+--- 313,315 ----
REP capucino cappuccino
! REP celcius Celsius
REP kado cadeau
@@ -101,7 +102,7 @@
REP kommittee comité
! REP kwis quiz
REP kwissen quizzen
---- 318,324 ----
+--- 319,325 ----
REP committee comité
! REP komitee comité
! REP komittee comité
@@ -114,7 +115,7 @@
REP copy kopij
! REP pitoresque pittoreske
REP reikweite reikwijdte
---- 326,328 ----
+--- 327,329 ----
REP copy kopij
! REP pitoresque pittoreske
REP reikweite reikwijdte
@@ -126,7 +127,7 @@
! REP kontekst context
! REP korrekt correct
REP kritikus criticus
---- 338,343 ----
+--- 339,344 ----
REP klup club
! REP wiskid whizzkid
! REP kontakt contact
@@ -135,13 +136,13 @@
REP kritikus criticus
***************
*** 333 ****
---- 357,360 ----
+--- 358,361 ----
REP aflassen afgelasten
+ REP svp s.v.p.
+ REP zoz z.o.z.
+
*** nl_NL.orig.dic Sun Jul 3 18:24:07 2005
---- nl_NL.dic Sat Dec 10 20:46:29 2005
+--- nl_NL.dic Tue Jan 17 20:39:49 2006
***************
*** 1,3 ****
119937
@@ -187,8 +188,14 @@
! achterwand/N
achterweg/NE
***************
+*** 4896,4897 ****
+--- 4900,4902 ----
+ aidsepidemie
++ aidspreventieprogramma
+ aidspreventieprogramma's
+***************
*** 7485,7486 ****
---- 7489,7498 ----
+--- 7490,7499 ----
avond/SN
+ 's avonds/=
+ 's middags/=
@@ -201,7 +208,7 @@
avondappèl/S
***************
*** 20681,20682 ****
---- 20693,20695 ----
+--- 20694,20696 ----
cytostatica
+ d.m.v.
daad/P
@@ -210,19 +217,19 @@
hartelozer
! hartelust
harten/S
---- 41822,41824 ----
+--- 41823,41825 ----
hartelozer
! hartenlust
harten/S
***************
*** 46300,46301 ****
---- 46313,46315 ----
+--- 46314,46316 ----
informaticus
+ informatie/S
informatie-uitwisseling
***************
*** 60206,60208 ****
---- 60220,60227 ----
+--- 60221,60228 ----
löss
+ m.a.w.
+ m.b.t.
@@ -233,7 +240,7 @@
maag
***************
*** 77996,77997 ****
---- 78015,78017 ----
+--- 78016,78018 ----
pluisje
+ pluisjes
pluist/UF
@@ -242,39 +249,39 @@
programmablad
! programmaboekje
programmacode
---- 80330,80332 ----
+--- 80331,80333 ----
programmablad
! programmaboekje/S
programmacode
***************
*** 97474,97475 ****
---- 97494,97497 ----
+--- 97495,97498 ----
suïciderisico/X
+ s.v.p.
+ z.o.z.
swagger/S
***************
*** 101428,101429 ****
---- 101450,101453 ----
+--- 101451,101454 ----
toezichthouder/S
+ toezichthoudersaansprakelijkheidsverzekering
+ toezichthoudersaansprakelijkheidsverzekeringen
toezie/N
***************
*** 103707,103708 ****
---- 103731,103733 ----
+--- 103732,103734 ----
tête-à-tête/S
+ u
uchtend/N
***************
*** 110847,110848 ****
---- 110872,110874 ----
+--- 110873,110875 ----
voorjaarscollectie/S
+ voorjaarsconferentie/S
voorjaarsmoeheid
***************
*** 119938 ****
---- 119964,173136 ----
+--- 119965,173166 ----
überhaupt
+ Christiaan/X
+ Fred/X
@@ -285,6 +292,7 @@
+ René/X
+ Renée/X
+ Walter/X
++ Verhagen/X
+ # toevoegingen uit de Woordenlijst van 30 mei 1996
+ a capella
+ a fortiori
@@ -445,25 +453,50 @@
+ wishful thinking
+ à gogo
+ à propos
++ a.s.
+ evt.
+ enz.
++ t,m
+ bijv.
+ t.n.v.
+ m.b.v.
+ et al.
++ Abraham
++ Anita
++ Boudewijn
++ Bram
++ Edwin
++ Erwin
+ Gerard
++ Gert
+ Google
++ Jos
++ Laurens
++ Leon
+ Luc
+ Luuk
-+ Gert
+ Marion
-+ Jos
-+ Boudewijn
-+ Abraham
++ Paul
++ Nikon
++ Pentax
++ Minolta
++ Mariëlle
++ Jeroen
++ Wytze
++ Océ
++ Philips
++ Shell
++ KPN
++ FNV
++ CNV
++ NLUUG
++ ICCF
++ aidsvoorlichting
+ # Woorden uit de Woordenlijst Nederlandse Taal - Officiële Spelling 2005
+ # TODO: werkwoord vervoegingen
+ 's anderendaags
+ 't is dief en diefjesmaat
++ 11 julifeest
+ 11 julifeesten
+ 11 juliviering
+ 11 julivieringen
@@ -2432,6 +2465,8 @@
+ a-priorische
+ a.m.
+ a.u.b.
++ blz.
++ e.d.
+ aagje
+ aagjes
+ aaibaar
@@ -53448,3 +53483,4 @@
+ über-ich
+ übermensch
+ übermenschen
++
diff --git a/src/buffer.c b/src/buffer.c
index 11901179..677215d2 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1806,10 +1806,11 @@ buflist_getfile(n, lnum, options, forceit)
if (buf == curbuf)
return OK;
-#ifdef FEAT_CMDWIN
- if (cmdwin_type != 0)
+ if (editing_cmdline())
+ {
+ editing_cmdline_msg();
return FAIL;
-#endif
+ }
/* altfpos may be changed by getfile(), get it now */
if (lnum == 0)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index e15c6c5d..fe9cd6bc 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2026,7 +2026,17 @@ do_one_cmd(cmdlinep, sourcing,
}
else if (ea.addr_count != 0)
{
- if (ea.line2 < 0 || ea.line2 > curbuf->b_ml.ml_line_count)
+ if (ea.line2 > curbuf->b_ml.ml_line_count)
+ {
+ /* With '-' in 'cpoptions' a line number past the file is an
+ * error, otherwise put it at the end of the file. */
+ if (vim_strchr(p_cpo, CPO_MINUS) != NULL)
+ ea.line2 = -1;
+ else
+ ea.line2 = curbuf->b_ml.ml_line_count;
+ }
+
+ if (ea.line2 < 0)
errormsg = (char_u *)_(e_invrange);
else
{
@@ -2126,18 +2136,22 @@ do_one_cmd(cmdlinep, sourcing,
errormsg = (char_u *)_(e_modifiable);
goto doend;
}
-#ifdef FEAT_CMDWIN
- if (cmdwin_type != 0 && !(ea.argt & CMDWIN)
+
+ if (editing_cmdline() && !(ea.argt & CMDWIN)
# ifdef FEAT_USR_CMDS
&& !USER_CMDIDX(ea.cmdidx)
# endif
)
{
- /* Command not allowed in cmdline window. */
- errormsg = (char_u *)_(e_cmdwin);
+ /* Command not allowed when editing the command line. */
+#ifdef FEAT_CMDWIN
+ if (cmdwin_type != 0)
+ errormsg = (char_u *)_(e_cmdwin);
+ else
+#endif
+ errormsg = (char_u *)_(e_secure);
goto doend;
}
-#endif
if (!ni && !(ea.argt & RANGE) && ea.addr_count > 0)
{
@@ -2977,12 +2991,9 @@ set_one_cmd_context(xp, buff)
int forceit = FALSE;
int usefilter = FALSE; /* filter instead of file name */
+ ExpandInit(xp);
xp->xp_pattern = buff;
xp->xp_context = EXPAND_COMMANDS; /* Default until we get past command */
- xp->xp_backslash = XP_BS_NONE;
-#if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) && defined(FEAT_CMDL_COMPL)
- xp->xp_arg = NULL;
-#endif
ea.argt = 0;
/*
@@ -3254,6 +3265,11 @@ set_one_cmd_context(xp, buff)
if (bow != NULL && in_quote)
xp->xp_pattern = bow;
xp->xp_context = EXPAND_FILES;
+#ifndef BACKSLASH_IN_FILENAME
+ /* For a shell command more chars need to be escaped. */
+ if (usefilter || ea.cmdidx == CMD_bang)
+ xp->xp_shell = TRUE;
+#endif
/* Check for environment variable */
if (*xp->xp_pattern == '$'
@@ -4189,16 +4205,16 @@ expand_filename(eap, cmdlinep, errormsgp)
/* For a shell command a '!' must be escaped. */
if ((eap->usefilter || eap->cmdidx == CMD_bang)
- && vim_strpbrk(repl, (char_u *)"!&;()") != NULL)
+ && vim_strpbrk(repl, (char_u *)"!&;()<>") != NULL)
{
char_u *l;
- l = vim_strsave_escaped(repl, (char_u *)"!&;()");
+ l = vim_strsave_escaped(repl, (char_u *)"!&;()<>");
if (l != NULL)
{
vim_free(repl);
repl = l;
- /* For a sh-like shell escape it another time. */
+ /* For a sh-like shell escape "!" another time. */
if (strstr((char *)p_sh, "sh") != NULL)
{
l = vim_strsave_escaped(repl, (char_u *)"!");
@@ -6017,6 +6033,12 @@ ex_quit(eap)
return;
}
#endif
+ /* Don't quit while editing the command line. */
+ if (editing_cmdline())
+ {
+ editing_cmdline_msg();
+ return;
+ }
#ifdef FEAT_NETBEANS_INTG
netbeansForcedQuit = eap->forceit;
@@ -6079,6 +6101,14 @@ ex_quit_all(eap)
return;
}
# endif
+
+ /* Don't quit while editing the command line. */
+ if (editing_cmdline())
+ {
+ editing_cmdline_msg();
+ return;
+ }
+
exiting = TRUE;
if (eap->forceit || !check_changed_any(FALSE))
getout(0);
@@ -6098,7 +6128,8 @@ ex_close(eap)
cmdwin_result = K_IGNORE;
else
# endif
- ex_win_close(eap, curwin);
+ if (!editing_cmdline())
+ ex_win_close(eap, curwin);
}
static void
@@ -6257,6 +6288,12 @@ ex_exit(eap)
return;
}
#endif
+ /* Don't quit while editing the command line. */
+ if (editing_cmdline())
+ {
+ editing_cmdline_msg();
+ return;
+ }
/*
* if more files or windows we won't exit
@@ -6369,10 +6406,9 @@ handle_drop(filec, filev, split)
exarg_T ea;
int save_msg_scroll = msg_scroll;
-# ifdef FEAT_CMDWIN
- if (cmdwin_type != 0)
+ /* Postpone this while editing the command line. */
+ if (editing_cmdline())
return;
-# endif
/* Check whether the current buffer is changed. If so, we will need
* to split the current window or data could be lost.
diff --git a/src/normal.c b/src/normal.c
index b0262b22..12ede737 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -788,15 +788,14 @@ getcount:
clearopbeep(oap);
goto normal_end;
}
-#ifdef FEAT_CMDWIN
- if (cmdwin_type != 0 && (nv_cmds[idx].cmd_flags & NV_NCW))
+
+ if (editing_cmdline() && (nv_cmds[idx].cmd_flags & NV_NCW))
{
- /* This command is not allowed in the cmdline window: beep. */
+ /* This command is not allowed wile editing a ccmdline: beep. */
clearopbeep(oap);
- EMSG(_(e_cmdwin));
+ editing_cmdline_msg();
goto normal_end;
}
-#endif
#ifdef FEAT_VISUAL
/*
@@ -3640,6 +3639,7 @@ add_to_showcmd(c)
K_RIGHTMOUSE, K_RIGHTDRAG, K_RIGHTRELEASE,
K_MOUSEDOWN, K_MOUSEUP,
K_X1MOUSE, K_X1DRAG, K_X1RELEASE, K_X2MOUSE, K_X2DRAG, K_X2RELEASE,
+ K_CURSORHOLD,
0
};
#endif
@@ -5741,13 +5741,12 @@ nv_gotofile(cap)
{
char_u *ptr;
-#ifdef FEAT_CMDWIN
- if (cmdwin_type != 0)
+ if (editing_cmdline())
{
clearopbeep(cap->oap);
+ editing_cmdline_msg();
return;
}
-#endif
ptr = grab_file_name(cap->count1);
@@ -7802,13 +7801,13 @@ nv_g_cmd(cap)
/* "gQ": improved Ex mode */
case 'Q':
-#ifdef FEAT_CMDWIN
- if (cmdwin_type != 0)
+ if (editing_cmdline())
{
clearopbeep(cap->oap);
+ editing_cmdline_msg();
break;
}
-#endif
+
if (!checkclearopq(oap))
do_exmode(TRUE);
break;
diff --git a/src/os_unix.c b/src/os_unix.c
index faf2847a..afc68ff8 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -4852,7 +4852,7 @@ mch_expandpath(gap, path, flags)
# define SEEK_END 2
#endif
-#define SHELL_SPECIAL (char_u *)"\t \"&';<>[\\]|"
+#define SHELL_SPECIAL (char_u *)"\t \"&';<>\\|"
/* ARGSUSED */
int
diff --git a/src/proto/ex_getln.pro b/src/proto/ex_getln.pro
index fe2752b8..3b11a38a 100644
--- a/src/proto/ex_getln.pro
+++ b/src/proto/ex_getln.pro
@@ -1,6 +1,8 @@
/* ex_getln.c */
char_u *getcmdline __ARGS((int firstc, long count, int indent));
char_u *getcmdline_prompt __ARGS((int firstc, char_u *prompt, int attr, int xp_context, char_u *xp_arg));
+int editing_cmdline __ARGS((void));
+void editing_cmdline_msg __ARGS((void));
char_u *getexline __ARGS((int c, void *dummy, int indent));
char_u *getexmodeline __ARGS((int promptc, void *dummy, int indent));
int cmdline_overstrike __ARGS((void));
diff --git a/src/vim.h b/src/vim.h
index 9fc38f52..bc0b334e 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -324,6 +324,7 @@
# else
# define PATH_ESC_CHARS ((char_u *)" \t*?[{`$\\%#'\"|")
# endif
+# define SHELL_ESC_CHARS ((char_u *)" \t*?[{`$\\%#'\"|<>();&!")
#endif
#define NUMBUFLEN 30 /* length of a buffer to store a number in ASCII */
diff --git a/src/window.c b/src/window.c
index 7d501804..680c3201 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2717,13 +2717,13 @@ win_alloc_first()
win_goto(wp)
win_T *wp;
{
-#ifdef FEAT_CMDWIN
- if (cmdwin_type != 0)
+ if (editing_cmdline())
{
beep_flush();
+ editing_cmdline_msg();
return;
}
-#endif
+
#ifdef FEAT_VISUAL
if (wp->w_buffer != curbuf)
reset_VIsual_and_resel();