summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2006-04-06 20:18:50 +0000
committervimboss <devnull@localhost>2006-04-06 20:18:50 +0000
commitaad637a4fc6a00269d772bcfc80f69a565d37136 (patch)
treeed09901efe925ec1b065c8dbd4cd94165b01cf6f
parent9b6279bee8b73aa78d58be9b07628a7028fd4c49 (diff)
downloadvim-aad637a4fc6a00269d772bcfc80f69a565d37136.tar.gz
updated for version 7.0c11
-rw-r--r--runtime/autoload/netrw.vim17
-rw-r--r--runtime/doc/editing.txt4
-rw-r--r--runtime/doc/index.txt4
-rw-r--r--runtime/doc/insert.txt5
-rw-r--r--runtime/doc/pi_netrw.txt5
-rw-r--r--runtime/doc/spell.txt45
-rw-r--r--runtime/doc/tabpage.txt5
-rw-r--r--runtime/doc/tags2
-rw-r--r--runtime/doc/windows.txt11
-rw-r--r--runtime/syntax/make.vim32
-rw-r--r--runtime/syntax/sh.vim26
-rw-r--r--src/buffer.c4
-rw-r--r--src/ex_docmd.c4
-rw-r--r--src/feature.h9
-rw-r--r--src/normal.c12
-rw-r--r--src/option.c6
-rw-r--r--src/option.h2
-rw-r--r--src/po/en_GB.po246
-rw-r--r--src/screen.c6
-rw-r--r--src/spell.c226
-rw-r--r--src/version.h6
-rw-r--r--src/window.c14
22 files changed, 565 insertions, 126 deletions
diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 00a3f3e8..7f4bd64e 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,7 +1,7 @@
" netrw.vim: Handles file transfer and remote directory listing across a network
" AUTOLOAD PORTION
-" Date: Mar 31, 2006
-" Version: 84
+" Date: Apr 06, 2006
+" Version: 86
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
@@ -23,7 +23,7 @@
if &cp || exists("g:loaded_netrw")
finish
endif
-let g:loaded_netrw = "v84"
+let g:loaded_netrw = "v86"
if v:version < 700
echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
finish
@@ -457,8 +457,7 @@ fun! netrw#NetRead(mode,...)
" ftp + <.netrc>: NetRead Method #2 {{{3
elseif b:netrw_method == 2 " read with ftp + <.netrc>
" call Decho("read via ftp+.netrc (method #2)")
- let netrw_fname= escape(b:netrw_fname,g:netrw_fname_escape)
-" call Decho("netrw_fname<".netrw_fname.">")
+ let netrw_fname= b:netrw_fname
new
setlocal ff=unix
exe "put ='".g:netrw_ftpmode."'"
@@ -3388,6 +3387,7 @@ fun! s:LocalFastBrowser()
au!
au ShellCmdPost,FocusGained * call s:LocalBrowseShellCmdRefresh()
augroup END
+ endif
" user must have changed fastbrowse to its fast setting, so remove
" the associated autocmd events
@@ -4098,7 +4098,12 @@ fun! s:SetSort()
let priority = priority + 1
endwhile
- exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+/\1/e'
+ " I'm afraid that I don't remember why the following line was present. It
+ " has something to do with priority -- items that satisfy a two or more
+ " priority patterns get preceded by two or more priority patterns: ###/
+ " So, I want to remove priority patterns, but not ###/ directory names.
+ " Following pattern retains just one priority pattern.
+ exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+\ze./\1/e'
" call Dret("SetSort")
endfun
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt
index eecdd861..8a9497a2 100644
--- a/runtime/doc/editing.txt
+++ b/runtime/doc/editing.txt
@@ -1,4 +1,4 @@
-*editing.txt* For Vim version 7.0c. Last change: 2006 Apr 02
+*editing.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -313,6 +313,8 @@ CTRL-^ Edit the alternate file (equivalent to ":e #").
in the 'path' is edited.
This command fails if Vim refuses to |abandon| the
current file.
+ If you want to edit the file in a new window use
+ |CTRL-W_CTRL-F|.
If you do want to edit a new file, use: >
:e <cfile>
< To make gf always work like that: >
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index f1647599..215c3c1f 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1,4 +1,4 @@
-*index.txt* For Vim version 7.0c. Last change: 2006 Mar 24
+*index.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -549,6 +549,8 @@ tag command action in Normal mode ~
|CTRL-W_g]| CTRL-W g ] split window and do |:tselect| for tag
under cursor
|CTRL-W_g}| CTRL-W g } do a |:ptjump| to the tag under the cursor
+|CTRL-W_gf| CTRL-W g f edit file name under the cursor in a new
+ tab page
|CTRL-W_h| CTRL-W h go to Nth left window (stop at first window)
|CTRL-W_i| CTRL-W i split window and jump to declaration of
identifier under the cursor
diff --git a/runtime/doc/insert.txt b/runtime/doc/insert.txt
index 417a4b32..5ffc8a85 100644
--- a/runtime/doc/insert.txt
+++ b/runtime/doc/insert.txt
@@ -1,4 +1,4 @@
-*insert.txt* For Vim version 7.0c. Last change: 2006 Apr 05
+*insert.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1007,7 +1007,8 @@ items:
word the text that will be inserted, mandatory
abbr abbreviation of "word"; when not empty it is used in
the menu instead of "word"
- menu extra text for the popup menu, after "word" or "abbr"
+ menu extra text for the popup menu, displayed after "word"
+ or "abbr"
info more information about the item, can be displayed in a
preview window
kind single letter indicating the type of completion
diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt
index bc9af21f..c577ed58 100644
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt* For Vim version 7.0c. Last change: Mar 22, 2006
+*pi_netrw.txt* For Vim version 7.0c. Last change: Apr 06, 2006
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -1448,6 +1448,9 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
11. History *netrw-history* {{{1
+ v85: * bug fix -- missing an endif
+ * bug fix -- handles spaces in names and directories when using
+ ftp-based browsing
v83: * disabled stop-acd handling; the change in directory handling
may allow acd to be used again. Awaiting feedback.
* D was refusing to delete remote files/directories in wide
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index f76ab51e..ebfecbcc 100644
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -1,4 +1,4 @@
-*spell.txt* For Vim version 7.0c. Last change: 2006 Apr 03
+*spell.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -712,7 +712,7 @@ accepted. This is different from a word with mixed case that is automatically
marked as keep-case, those words may appear in all upper-case letters.
-FORMAT WITH .AFF and .DIC FILES
+FORMAT WITH .AFF AND .DIC FILES *aff-dic-format*
There are two files: the basic word list and an affix file. The affix file
specifies settings for the language and can contain affixes. The affixes are
@@ -1033,7 +1033,7 @@ AFFIX FLAGS *spell-affix-flags*
This is a feature that comes from Hunspell: The affix may specify flags. This
works similar to flags specified on a basic word. The flags apply to the
-basic word plus the affix. Example:
+basic word plus the affix (but there are restrictions). Example:
SFX S Y 1 ~
SFX S 0 s . ~
@@ -1054,14 +1054,33 @@ only used once for affixes, except that both one prefix and one suffix can be
used when both support combining.
Specifically, the affix flags can be used for:
-- Affixes on affixes, as in the example above.
+- Suffixes on suffixes, as in the example above. This works once, thus you
+ can have two suffixes on a word (plus one prefix).
- Making the word with the affix rare, by using the |spell-RARE| flag.
- Exclude the word with the affix from compounding, by using the
|spell-COMPOUNDFORBIDFLAG| flag.
- Allow the word with the affix to be part of a compound word on the side of
the affix with the |spell-COMPOUNDPERMITFLAG|.
+- Use the NEEDCOMPOUND flag: word plus affix can only be used as part of a
+ compound word. |spell-NEEDCOMPOUND|
+- Compound flags: word plus affix can be part of a compound word at the end,
+ middle, start, etc. The flags are combined with the flags of the basic
+ word. |spell-compound|
+- NEEDAFFIX: another affix is needed to make a valid word.
+- CIRCUMFIX, as explained just below.
+
+
+CIRCUMFIX *spell-CIRCUMFIX*
+
+The CIRCUMFIX flag means a prefix and suffix must be added at the same time.
+If a prefix has the CIRCUMFIX flag than only suffixes with the CIRCUMFIX flag
+can be added, and the other way around.
+An alternative is to only specify the suffix, and give the that suffix two
+flags: The required prefix and the NEEDAFFIX flag. |spell-NEEDAFFIX|
+
+
+PFXPOSTPONE *spell-PFXPOSTPONE*
- *spell-PFXPOSTPONE*
When an affix file has very many prefixes that apply to many words it's not
possible to build the whole word list in memory. This applies to Hebrew (a
list with all words is over a Gbyte). In that case applying prefixes must be
@@ -1070,11 +1089,11 @@ in the .aff file:
PFXPOSTPONE ~
-Only prefixes without a chop string can be postponed, prefixes with a chop
-string will still be included in the word list. An exception if the chop
-string is one character and equal to the last character of the added string,
-but in lower case. Thus when the chop string is used to allow the following
-word to start with an upper case letter.
+Only prefixes without a chop string and without flags can be postponed.
+Prefixes with a chop string or with flags will still be included in the word
+list. An exception if the chop string is one character and equal to the last
+character of the added string, but in lower case. Thus when the chop string
+is used to allow the following word to start with an upper case letter.
WORDS WITH A SLASH *spell-SLASH*
@@ -1477,12 +1496,6 @@ CHECKCOMPOUNDTRIPLE (Hunspell) *spell-CHECKCOMPOUNDTRIPLE*
CHECKCOMPOUNDPATTERN (Hunspell) *spell-CHECKCOMPOUNDPATTERN*
Forbid compounding when patterns match. Not supported.
-CIRCUMFIX (Hunspell) *spell-CIRCUMFIX*
- This means a prefix and suffix must be added at the same time.
- Instead only specify the suffix, and give the that suffix two
- flags: The required prefix and the NEEDAFFIX flag.
- |spell-NEEDAFFIX|
-
COMPLEXPREFIXES (Hunspell) *spell-COMPLEXPREFIXES*
Enables using two prefixes. Not supported.
diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt
index db51d843..5439fd4d 100644
--- a/runtime/doc/tabpage.txt
+++ b/runtime/doc/tabpage.txt
@@ -1,4 +1,4 @@
-*tabpage.txt* For Vim version 7.0c. Last change: 2006 Mar 31
+*tabpage.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -79,6 +79,9 @@ In the GUI tab pages line you can use the right mouse button to open menu.
:tab split " opens current buffer in new tab page
:tab help gt " opens tab page with help for "gt"
+CTRL-W gf Open a new tab page and edit the file name under the cursor.
+ See |CTRL-W_gf|.
+
CLOSING A TAB PAGE:
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 3e2de485..4134a1da 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -3199,6 +3199,7 @@ CTRL-W_d tagsrch.txt /*CTRL-W_d*
CTRL-W_f windows.txt /*CTRL-W_f*
CTRL-W_g] windows.txt /*CTRL-W_g]*
CTRL-W_g_CTRL-] windows.txt /*CTRL-W_g_CTRL-]*
+CTRL-W_gf windows.txt /*CTRL-W_gf*
CTRL-W_g} windows.txt /*CTRL-W_g}*
CTRL-W_h windows.txt /*CTRL-W_h*
CTRL-W_i tagsrch.txt /*CTRL-W_i*
@@ -4430,6 +4431,7 @@ added-options version5.txt /*added-options*
added-regexp version5.txt /*added-regexp*
added-various version5.txt /*added-various*
added-win32-GUI version5.txt /*added-win32-GUI*
+aff-dic-format spell.txt /*aff-dic-format*
after-directory options.txt /*after-directory*
aleph options.txt /*aleph*
alt intro.txt /*alt*
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index b6db5404..fbc3e788 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt* For Vim version 7.0c. Last change: 2006 Apr 01
+*windows.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -707,7 +707,7 @@ CTRL-W g CTRL-] Split current window in two. Use identifier under cursor as a
CTRL-W f *CTRL-W_f* *CTRL-W_CTRL-F*
CTRL-W CTRL-F Split current window in two. Edit file name under cursor.
- Like ":split ]f", but window isn't split if the file does not
+ Like ":split gf", but window isn't split if the file does not
exist.
Uses the 'path' variable as a list of directory names where to
look for the file. Also the path for current file is
@@ -723,6 +723,13 @@ CTRL-W F *CTRL-W_F*
jump to the line number following the file name. See |gF| for
details on how the line number is obtained.
+CTRL-W gf *CTRL-W_gf*
+ Open a new tab page and edit the file name under the cursor.
+ Like "tab split" and "gf", but the new tab page isn't created
+ if the file does not exist.
+ {not available when the |+file_in_path| feature was disabled
+ at compile time}
+
Also see |CTRL-W_CTRL-I|: open window for an included file that includes
the keyword under the cursor.
diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim
index aba073ee..4d3b0df4 100644
--- a/runtime/syntax/make.vim
+++ b/runtime/syntax/make.vim
@@ -2,7 +2,7 @@
" Language: Makefile
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" URL: http://www.fleiner.com/vim/syntax/make.vim
-" Last Change: 2005 Apr 17
+" Last Change: 2006 Apr 5
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -13,15 +13,15 @@ elseif exists("b:current_syntax")
endif
" some special characters
-syn match makeSpecial "^\s*[@-]\+"
+syn match makeSpecial "^\s*[@+-]\+"
syn match makeNextLine "\\\n\s*"
" some directives
-syn match makePreCondit "^\s*\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)"
-syn match makeInclude "^\s*[-s]\=include"
-syn match makeStatement "^\s*vpath"
-syn match makeExport "^\s*\(export\|unexport\)\>"
-syn match makeOverride "^\s*override"
+syn match makePreCondit "^ *\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)"
+syn match makeInclude "^ *[-s]\=include"
+syn match makeStatement "^ *vpath"
+syn match makeExport "^ *\(export\|unexport\)\>"
+syn match makeOverride "^ *override"
hi link makeOverride makeStatement
hi link makeExport makeStatement
@@ -30,8 +30,8 @@ syn region makeDefine start="^\s*define\s" end="^\s*endef\s*$" contains=makeStat
" Microsoft Makefile specials
syn case ignore
-syn match makeInclude "^!\s*include"
-syn match makePreCondit "!\s*\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>"
+syn match makeInclude "^! *include"
+syn match makePreCondit "! *\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>"
syn case match
" identifiers
@@ -39,8 +39,8 @@ syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement
syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString
syn match makeIdent "\$\$\w*"
syn match makeIdent "\$[^({]"
-syn match makeIdent "^\s*\a\w*\s*[:+?!*]="me=e-2
-syn match makeIdent "^\s*\a\w*\s*="me=e-1
+syn match makeIdent "^ *\a\w*\s*[:+?!*]="me=e-2
+syn match makeIdent "^ *\a\w*\s*="me=e-1
syn match makeIdent "%"
" Makefile.in variables
@@ -54,8 +54,8 @@ syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSourc
syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError
-syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
-syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError
+syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands
+syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError
syn match makeCommandError "^\s\+\S.*" contained
syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError
@@ -67,9 +67,9 @@ syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|cal
" Comment
if exists("make_microsoft")
- syn match makeComment "#.*" contains=makeTodo,@Spell
-else
- syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo,@Spell
+ syn match makeComment "#.*" contains=makeTodo
+elseif !exists("make_no_comments")
+ syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo
syn match makeComment "#$"
endif
syn keyword makeTodo TODO FIXME XXX contained
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim
index ee029e23..8e20b988 100644
--- a/runtime/syntax/sh.vim
+++ b/runtime/syntax/sh.vim
@@ -2,8 +2,8 @@
" Language: shell (sh) Korn shell (ksh) bash (sh)
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
-" Last Change: Mar 01, 2006
-" Version: 81
+" Last Change: Apr 06, 2006
+" Version: 82
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Using the following VIM variables: {{{1
@@ -79,7 +79,7 @@ syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError
syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shExSingleQuote,shSingleQuote,shDoubleQuote,shSpecial
syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shSingleQuote,shDoubleQuote,shSpecial,shExpr,shDblBrace,shDeref,shDerefSimple
syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest
-syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shSpecial,shOperator,shFunctionStart
+syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shSpecial,shOperator,shFunctionStart
syn cluster shHereBeginList contains=@shCommandSubList
syn cluster shHereList contains=shBeginHere,shHerePayload
syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload
@@ -154,9 +154,15 @@ syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum
" Loops: do, if, while, until {{{1
" ======
-syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
-syn region shIf transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen
-syn region shFor matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
+if g:sh_fold_enabled
+ syn region shDo fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
+ syn region shIf fold transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey
+ syn region shFor fold matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
+else
+ syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList
+ syn region shIf transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey
+ syn region shFor matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn
+endif
if exists("b:is_kornshell") || exists("b:is_bash")
syn cluster shCaseList add=shRepeat
syn region shRepeat matchgroup=shLoop start="\<while\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace
@@ -174,7 +180,11 @@ syn match shComma contained ","
syn match shCaseBar contained skipwhite "[^|"`'()]\{-}|"hs=e nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar
syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="[^#$()'"]\{-})"ms=s,hs=e end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment
-syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
+if g:sh_fold_enabled
+ syn region shCaseEsac fold matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
+else
+ syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList
+endif
syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote
if exists("b:is_bash")
syn region shCaseExSingleQuote matchgroup=shOperator start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained
@@ -319,7 +329,7 @@ endif
" Functions: {{{1
syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo
-syn match shFunctionStart "{" contained
+syn match shFunctionStart "^\s*{" contained
if g:sh_fold_enabled
syn region shFunctionOne transparent fold start="^\s*\h\w*\s*()\_s*\ze{" matchgroup=shFunctionStart end="}" contains=@shFunctionList
syn region shFunctionTwo transparent fold start="\h\w*\s*\%(()\)\=\_s*\ze{" matchgroup=shFunctionStart end="}" contains=shFunctionKey,@shFunctionList contained
diff --git a/src/buffer.c b/src/buffer.c
index 15abab51..fbad67c9 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -434,7 +434,7 @@ close_buffer(win, buf, action)
if (usingNetbeans)
netbeans_file_closed(buf);
#endif
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
/* Change directories when the acd option is set on. */
if (p_acd && curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
@@ -1418,7 +1418,7 @@ enter_buffer(buf)
netbeans_file_activated(curbuf);
#endif
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
/* Change directories when the acd option is set on. */
if (p_acd && curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 0e0bcaec..cff6d4cc 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7029,7 +7029,9 @@ ex_splitview(eap)
|| eap->cmdidx == CMD_tabfind
|| eap->cmdidx == CMD_tabnew)
{
- if (win_new_tabpage(cmdmod.tab) != FAIL)
+ if (win_new_tabpage(cmdmod.tab != 0 ? cmdmod.tab
+ : eap->addr_count == 0 ? 0
+ : (int)eap->line2 + 1) != FAIL)
{
do_exedit(eap, NULL);
diff --git a/src/feature.h b/src/feature.h
index 7d2f668e..fdd7a295 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -1246,3 +1246,12 @@
# define FEAT_FOOTER
#endif
+
+/*
+ * +autochdir 'autochdir' option.
+ */
+#if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
+ || defined(FEAT_BIG)
+# define FEAT_AUTOCHDIR
+#endif
+
diff --git a/src/normal.c b/src/normal.c
index e285b80d..bc6955d8 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5080,15 +5080,15 @@ handle_tabmenu()
break;
case TABLINE_MENU_NEW:
- if (current_tab > 0)
- goto_tabpage(current_tab);
- do_cmdline_cmd((char_u *)"tabnew");
+ vim_snprintf((char *)IObuff, IOSIZE, "%dtabnew",
+ current_tab > 0 ? current_tab - 1 : 999);
+ do_cmdline_cmd(IObuff);
break;
case TABLINE_MENU_OPEN:
- if (current_tab > 0)
- goto_tabpage(current_tab);
- do_cmdline_cmd((char_u *)"browse tabnew");
+ vim_snprintf((char *)IObuff, IOSIZE, "browse %dtabnew",
+ current_tab > 0 ? current_tab - 1 : 999);
+ do_cmdline_cmd(IObuff);
break;
}
}
diff --git a/src/option.c b/src/option.c
index 2f7e90ae..f809a736 100644
--- a/src/option.c
+++ b/src/option.c
@@ -521,7 +521,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}
#endif
},
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
{"autochdir", "acd", P_BOOL|P_VI_DEF,
(char_u *)&p_acd, PV_NONE,
{(char_u *)FALSE, (char_u *)0L}},
@@ -7263,15 +7263,15 @@ set_bool_option(opt_idx, varp, value, opt_flags)
else
gui_mch_disable_beval_area(balloonEval);
}
+#endif
-# if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
else if ((int *)varp == &p_acd)
{
if (p_acd && curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
shorten_fnames(TRUE);
}
-# endif
#endif
#ifdef FEAT_DIFF
diff --git a/src/option.h b/src/option.h
index 7bc952e3..afa18948 100644
--- a/src/option.h
+++ b/src/option.h
@@ -303,7 +303,7 @@
#ifdef FEAT_RIGHTLEFT
EXTERN long p_aleph; /* 'aleph' */
#endif
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
EXTERN int p_acd; /* 'autochdir' */
#endif
#ifdef FEAT_MBYTE
diff --git a/src/po/en_GB.po b/src/po/en_GB.po
index 152092a5..e15b8350 100644
--- a/src/po/en_GB.po
+++ b/src/po/en_GB.po
@@ -5,10 +5,19 @@
#
# FIRST AUTHOR Mike Williams <mrw@eandem.co.uk>, 2003.
#
+# Style Guide:
+# o English spelling!
+# o -ise, not -ize.
+# o No contractions.
+# o Cannot, not can not.
+# o Backward (no s) when used as an adjective.
+# o TBC ...
+#
msgid ""
msgstr ""
"Project-Id-Version: Vim(UK English)\n"
-"POT-Creation-Date: 2003-02-23 10:27+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-04-05 14:54+0100\n"
"PO-Revision-Date: 2003-02-25 11:05+0000\n"
"Last-Translator: Mike Williams <mrw@eandem.co.uk>\n"
"Language-Team: Mike Williams <mrw@eandem.co.uk>\n"
@@ -17,26 +26,248 @@ msgstr ""
"Content-Transfer-Encoding: 7bit\n"
#, c-format
+msgid "E96: Can not diff more than %ld buffers"
+msgstr "E96: Cannot diff more than %ld buffers"
+
+#, c-format
+msgid "E102: Can't find buffer \"%s\""
+msgstr "E102: Cannot find buffer \"%s\""
+
+#, c-format
+msgid "E738: Can't list variables for %s"
+msgstr "E738: Cannot list variables for %s"
+
+#, c-format
+msgid "E138: Can't write viminfo file %s!"
+msgstr "E138: Cannot write viminfo file %s!"
+
+msgid ""
+"# You may edit it if you're careful!\n"
+"\n"
+msgstr ""
+"# You may edit it if you are careful!\n"
+"\n"
+
+msgid "E146: Regular expressions can't be delimited by letters"
+msgstr "E146: Regular expressions cannot be delimited by letters"
+
+msgid "E493: Backwards range given"
+msgstr "E493: Backward range given"
+
+msgid "Backwards range given, OK to swap"
+msgstr "Backward range given, OK to swap"
+
+#, c-format
msgid "E185: Cannot find color scheme %s"
msgstr "E185: Cannot find colour scheme %s"
+msgid "Can't find temp file for conversion"
+msgstr "Cannot find temp file for conversion"
+
+msgid "can't read output of 'charconvert'"
+msgstr "cannot read output of 'charconvert'"
+
+msgid "E506: Can't write to backup file (add ! to override)"
+msgstr "E506: Cannot write to backup file (add ! to override)"
+
+msgid "E508: Can't read file for backup (add ! to override)"
+msgstr "E508: Cannot read file for backup (add ! to override)"
+
+msgid "E510: Can't make backup file (add ! to override)"
+msgstr "E510: Cannot make backup file (add ! to override)"
+
+msgid "E214: Can't find temp file for writing"
+msgstr "E214: Cannot find temp file for writing"
+
+msgid "E166: Can't open linked file for writing"
+msgstr "E166: Cannot open linked file for writing"
+
+msgid "E212: Can't open file for writing"
+msgstr "E212: Cannot open file for writing"
+
+msgid "E205: Patchmode: can't save original file"
+msgstr "E205: Patchmode: cannot save original file"
+
+msgid "E206: patchmode: can't touch empty original file"
+msgstr "E206: patchmode: cannot touch empty original file"
+
+msgid "E207: Can't delete backup file"
+msgstr "E207: Cannot delete backup file"
+
+msgid "E217: Can't execute autocommands for ALL events"
+msgstr "E217: Cannot execute autocommands for ALL events"
+
+#, c-format
+msgid "E482: Can't create file %s"
+msgstr "E482: Cannot create file %s"
+
+msgid "E483: Can't get temp file name"
+msgstr "E483: Cannot get temp file name"
+
+#, c-format
+msgid "E484: Can't open file %s"
+msgstr "E484: Cannot open file %s"
+
+#, c-format
+msgid "E485: Can't read file %s"
+msgstr "E485: Cannot read file %s"
+
+#, c-format
+msgid "E40: Can't open errorfile %s"
+msgstr "E40: Cannot open errorfile %s"
+
+msgid "E255: Couldn't read in sign data!"
+msgstr "E255: Could not read in sign data!"
+
#, c-format
msgid "E254: Cannot allocate color %s"
msgstr "E254: Cannot allocate colour %s"
+#, c-format
+msgid "E616: vim_SelFile: can't get font %s"
+msgstr "E616: vim_SelFile: cannot get font %s"
+
+msgid "E614: vim_SelFile: can't return to current directory"
+msgstr "E614: vim_SelFile: cannot return to current directory"
+
+msgid "E615: vim_SelFile: can't get current directory"
+msgstr "E615: vim_SelFile: cannot get current directory"
+
+#, c-format
+msgid "E610: Can't load Zap font '%s'"
+msgstr "E610: Cannot load Zap font '%s'"
+
+#, c-format
+msgid "E611: Can't use font %s"
+msgstr "E611: Cannot use font %s"
+
msgid "Vim E458: Cannot allocate colormap entry, some colors may be incorrect"
msgstr ""
"Vim E458: Cannot allocate colourmap entry, some colours may be incorrect"
+#, c-format
+msgid "E624: Can't open file \"%s\""
+msgstr "E624: Cannot open file \"%s\""
+
+#, c-format
+msgid "E457: Can't read PostScript resource file \"%s\""
+msgstr "E457: Cannot read PostScript resource file \"%s\""
+
+msgid "E324: Can't open PostScript output file"
+msgstr "E324: Cannot open PostScript output file"
+
+#, c-format
+msgid "E456: Can't open file \"%s\""
+msgstr "E456: Cannot open file \"%s\""
+
+msgid "E456: Can't find PostScript resource file \"prolog.ps\""
+msgstr "E456: Cannot find PostScript resource file \"prolog.ps\""
+
+msgid "E456: Can't find PostScript resource file \"cidfont.ps\""
+msgstr "E456: Cannot find PostScript resource file \"cidfont.ps\""
+
+#, c-format
+msgid "E456: Can't find PostScript resource file \"%s.ps\""
+msgstr "E456: Cannot find PostScript resource file \"%s.ps\""
+
+msgid "couldn't open buffer"
+msgstr "could not open buffer"
+
+msgid "can't delete OutputObject attributes"
+msgstr "cannot delete OutputObject attributes"
+
+msgid "--literal\t\tDon't expand wildcards"
+msgstr "--literal\t\tDo not expand wildcards"
+
+msgid "-f or --nofork\tForeground: Don't fork when starting GUI"
+msgstr "-f or --nofork\tForeground: Do not fork when starting GUI"
+
+msgid "-f\t\t\tDon't use newcli to open window"
+msgstr "-f\t\t\tDo not use newcli to open window"
+
+msgid "--noplugin\t\tDon't load plugin scripts"
+msgstr "--noplugin\t\tDo not load plugin scripts"
+
+msgid "--remote-silent <files> Same, don't complain if there is no server"
+msgstr "--remote-silent <files> Same, do not complain if there is no server"
+
+msgid ""
+"--remote-wait-silent <files> Same, don't complain if there is no server"
+msgstr ""
+"--remote-wait-silent <files> Same, do not complain if there is no server"
+
msgid "-background <color>\tUse <color> for the background (also: -bg)"
msgstr "-background <colour>\tUse <colour> for the background (also: -bg)"
msgid "-foreground <color>\tUse <color> for normal text (also: -fg)"
msgstr "-foreground <colour>\tUse <colour> for normal text (also: -fg)"
+msgid "+reverse\t\tDon't use reverse video (also: +rv)"
+msgstr "+reverse\t\tDo not use reverse video (also: +rv)"
+
+msgid "E288: input method doesn't support any style"
+msgstr "E288: input method does not support any style"
+
+msgid "E289: input method doesn't support my preedit type"
+msgstr "E289: input method does not support my preedit type"
+
+msgid "E298: Didn't get block nr 0?"
+msgstr "E298: Did not get block nr 0?"
+
+msgid "E298: Didn't get block nr 1?"
+msgstr "E298: Did not get block nr 1?"
+
+msgid "E298: Didn't get block nr 2?"
+msgstr "E298: Did not get block nr 2?"
+
+msgid "E304: ml_upd_block0(): Didn't get block 0??"
+msgstr "E304: ml_upd_block0(): Did not get block 0??"
+
msgid "Messages maintainer: Bram Moolenaar <Bram@vim.org>"
msgstr "Messages maintainer: Mike Williams <mrw@eandem.co.uk>"
+msgid "Keys don't match!"
+msgstr "Keys do not match!"
+
+#, c-format
+msgid "E344: Can't find directory \"%s\" in cdpath"
+msgstr "E344: Cannot find directory \"%s\" in cdpath"
+
+#, c-format
+msgid "E345: Can't find file \"%s\" in path"
+msgstr "E345: Cannot find file \"%s\" in path"
+
+msgid "E597: can't select fontset"
+msgstr "E597: cannot select fontset"
+
+msgid "E533: can't select wide font"
+msgstr "E533: cannot select wide font"
+
+msgid "VIM: Can't open window!\n"
+msgstr "VIM: Cannot open window!\n"
+
+msgid "E388: Couldn't find definition"
+msgstr "E388: Could not find definition"
+
+msgid "E389: Couldn't find pattern"
+msgstr "E389: Could not find pattern"
+
+#, c-format
+msgid "Unrecognized or duplicate item in %s line %d: %s"
+msgstr "Unrecognised or duplicate item in %s line %d: %s"
+
+#, c-format
+msgid "Unrecognized flags in %s line %d: %s"
+msgstr "Unrecognised flags in %s line %d: %s"
+
+#, c-format
+msgid "E781: .sug file doesn't match .spl file: %s"
+msgstr "E781: .sug file does not match .spl file: %s"
+
+#, c-format
+msgid "E394: Didn't find region item for %s"
+msgstr "E394: Did not find region item for %s"
+
msgid "E419: FG color unknown"
msgstr "E419: FG colour unknown"
@@ -46,3 +277,16 @@ msgstr "E420: BG colour unknown"
#, c-format
msgid "E421: Color name or number not recognized: %s"
msgstr "E421: Colour name or number not recognised: %s"
+
+msgid "E434: Can't find tag pattern"
+msgstr "E434: Cannot find tag pattern"
+
+msgid "E435: Couldn't find tag, just guessing!"
+msgstr "E435: Could not find tag, just guessing!"
+
+msgid "E442: Can't split topleft and botright at the same time"
+msgstr "E442: Cannot split topleft and botright at the same time"
+
+#, c-format
+msgid "E447: Can't find file \"%s\" in path"
+msgstr "E447: Cannot find file \"%s\" in path"
diff --git a/src/screen.c b/src/screen.c
index 52a6f743..b82bd983 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4296,8 +4296,10 @@ win_line(wp, lnum, startrow, endrow, nochange)
v = wp->w_skipcol;
else
v = wp->w_leftcol;
- if (vcol < v + col) /* line ends before left margin */
- vcol = v + col;
+ /* check if line ends before left margin */
+ if (vcol < v + col - win_col_off(wp))
+
+ vcol = v + col - win_col_off(wp);
if (wp->w_p_cuc
&& (int)wp->w_virtcol >= vcol
&& (int)wp->w_virtcol < W_WIDTH(wp) * (row - startrow + 1)
diff --git a/src/spell.c b/src/spell.c
index a11372ab..f7475700 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -4655,6 +4655,7 @@ typedef struct afffile_S
unsigned af_keepcase; /* KEEPCASE ID for keep-case word */
unsigned af_bad; /* BAD ID for banned word */
unsigned af_needaffix; /* NEEDAFFIX ID */
+ unsigned af_circumfix; /* CIRCUMFIX ID */
unsigned af_needcomp; /* NEEDCOMPOUND ID */
unsigned af_comproot; /* COMPOUNDROOT ID */
unsigned af_compforbid; /* COMPOUNDFORBIDFLAG ID */
@@ -4855,9 +4856,10 @@ static int sal_to_bool __ARGS((char_u *s));
static int has_non_ascii __ARGS((char_u *s));
static void spell_free_aff __ARGS((afffile_T *aff));
static int spell_read_dic __ARGS((spellinfo_T *spin, char_u *fname, afffile_T *affile));
+static int get_affix_flags __ARGS((afffile_T *affile, char_u *afflist));
static int get_pfxlist __ARGS((afffile_T *affile, char_u *afflist, char_u *store_afflist));
static void get_compflags __ARGS((afffile_T *affile, char_u *afflist, char_u *store_afflist));
-static int store_aff_word __ARGS((spellinfo_T *spin, char_u *word, char_u *afflist, afffile_T *affile, hashtab_T *ht, hashtab_T *xht, int comb, int flags, char_u *pfxlist, int pfxlen));
+static int store_aff_word __ARGS((spellinfo_T *spin, char_u *word, char_u *afflist, afffile_T *affile, hashtab_T *ht, hashtab_T *xht, int condit, int flags, char_u *pfxlist, int pfxlen));
static int spell_read_wordfile __ARGS((spellinfo_T *spin, char_u *fname));
static void *getroom __ARGS((spellinfo_T *spin, size_t len, int align));
static char_u *getroom_save __ARGS((spellinfo_T *spin, char_u *s));
@@ -4891,6 +4893,12 @@ static void init_spellfile __ARGS((void));
* Use a negative number with the lower 8 bits zero. */
#define PFX_FLAGS -256
+/* flags for "condit" argument of store_aff_word() */
+#define CONDIT_COMB 1 /* affix must combine */
+#define CONDIT_CFIX 2 /* affix must have CIRCUMFIX flag */
+#define CONDIT_SUF 4 /* add a suffix for matching flags */
+#define CONDIT_AFF 8 /* word already has an affix */
+
/*
* Tunable parameters for when the tree is compressed. See 'mkspellmem'.
*/
@@ -5170,6 +5178,7 @@ spell_read_aff(spin, fname)
|| aff->af_keepcase != 0
|| aff->af_bad != 0
|| aff->af_needaffix != 0
+ || aff->af_circumfix != 0
|| aff->af_needcomp != 0
|| aff->af_comproot != 0
|| aff->af_nosuggest != 0
@@ -5235,6 +5244,12 @@ spell_read_aff(spin, fname)
aff->af_needaffix = affitem2flag(aff->af_flagtype, items[1],
fname, lnum);
}
+ else if (STRCMP(items[0], "CIRCUMFIX") == 0 && itemcnt == 2
+ && aff->af_circumfix == 0)
+ {
+ aff->af_circumfix = affitem2flag(aff->af_flagtype, items[1],
+ fname, lnum);
+ }
else if (STRCMP(items[0], "NOSUGGEST") == 0 && itemcnt == 2
&& aff->af_nosuggest == 0)
{
@@ -5430,6 +5445,7 @@ spell_read_aff(spin, fname)
|| cur_aff->ah_flag == aff->af_rare
|| cur_aff->ah_flag == aff->af_keepcase
|| cur_aff->ah_flag == aff->af_needaffix
+ || cur_aff->ah_flag == aff->af_circumfix
|| cur_aff->ah_flag == aff->af_nosuggest
|| cur_aff->ah_flag == aff->af_needcomp
|| cur_aff->ah_flag == aff->af_comproot)
@@ -6449,29 +6465,12 @@ spell_read_dic(spin, fname, affile)
need_affix = FALSE;
if (afflist != NULL)
{
- /* Check for affix name that stands for keep-case word and stands
- * for rare word (if defined). */
- if (affile->af_keepcase != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_keepcase))
- flags |= WF_KEEPCAP | WF_FIXCAP;
- if (affile->af_rare != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_rare))
- flags |= WF_RARE;
- if (affile->af_bad != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_bad))
- flags |= WF_BANNED;
+ /* Extract flags from the affix list. */
+ flags |= get_affix_flags(affile, afflist);
+
if (affile->af_needaffix != 0 && flag_in_afflist(
affile->af_flagtype, afflist, affile->af_needaffix))
need_affix = TRUE;
- if (affile->af_needcomp != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_needcomp))
- flags |= WF_NEEDCOMP;
- if (affile->af_comproot != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_comproot))
- flags |= WF_COMPROOT;
- if (affile->af_nosuggest != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_nosuggest))
- flags |= WF_NOSUGGEST;
if (affile->af_pfxpostpone)
/* Need to store the list of prefix IDs with the word. */
@@ -6494,13 +6493,13 @@ spell_read_dic(spin, fname, affile)
* Additionally do matching prefixes that combine. */
if (store_aff_word(spin, dw, afflist, affile,
&affile->af_suff, &affile->af_pref,
- FALSE, flags, store_afflist, pfxlen) == FAIL)
+ CONDIT_SUF, flags, store_afflist, pfxlen) == FAIL)
retval = FAIL;
/* Find all matching prefixes and add the resulting words. */
if (store_aff_word(spin, dw, afflist, affile,
&affile->af_pref, NULL,
- FALSE, flags, store_afflist, pfxlen) == FAIL)
+ CONDIT_SUF, flags, store_afflist, pfxlen) == FAIL)
retval = FAIL;
}
}
@@ -6517,6 +6516,38 @@ spell_read_dic(spin, fname, affile)
}
/*
+ * Check for affix flags in "afflist" that are turned into word flags.
+ * Return WF_ flags.
+ */
+ static int
+get_affix_flags(affile, afflist)
+ afffile_T *affile;
+ char_u *afflist;
+{
+ int flags = 0;
+
+ if (affile->af_keepcase != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_keepcase))
+ flags |= WF_KEEPCAP | WF_FIXCAP;
+ if (affile->af_rare != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_rare))
+ flags |= WF_RARE;
+ if (affile->af_bad != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_bad))
+ flags |= WF_BANNED;
+ if (affile->af_needcomp != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_needcomp))
+ flags |= WF_NEEDCOMP;
+ if (affile->af_comproot != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_comproot))
+ flags |= WF_COMPROOT;
+ if (affile->af_nosuggest != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_nosuggest))
+ flags |= WF_NOSUGGEST;
+ return flags;
+}
+
+/*
* Get the list of prefix IDs from the affix list "afflist".
* Used for PFXPOSTPONE.
* Put the resulting flags in "store_afflist[MAXWLEN]" with a terminating NUL
@@ -6604,7 +6635,7 @@ get_compflags(affile, afflist, store_afflist)
* Returns FAIL when out of memory.
*/
static int
-store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
+store_aff_word(spin, word, afflist, affile, ht, xht, condit, flags,
pfxlist, pfxlen)
spellinfo_T *spin; /* spell info */
char_u *word; /* basic word start */
@@ -6612,7 +6643,7 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
afffile_T *affile;
hashtab_T *ht;
hashtab_T *xht;
- int comb; /* only use affixes that combine */
+ int condit; /* CONDIT_SUF et al. */
int flags; /* flags for the word */
char_u *pfxlist; /* list of prefix IDs */
int pfxlen; /* nr of flags in "pfxlist" for prefixes, rest
@@ -6625,12 +6656,16 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
regmatch_T regmatch;
char_u newword[MAXWLEN];
int retval = OK;
- int i;
+ int i, j;
char_u *p;
int use_flags;
char_u *use_pfxlist;
+ int use_pfxlen;
+ int need_affix;
+ char_u store_afflist[MAXWLEN];
char_u pfx_pfxlist[MAXWLEN];
size_t wordlen = STRLEN(word);
+ int use_condit;
todo = ht->ht_used;
for (hi = ht->ht_array; todo > 0 && retval == OK; ++hi)
@@ -6642,8 +6677,9 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
/* Check that the affix combines, if required, and that the word
* supports this affix. */
- if ((!comb || ah->ah_combine) && flag_in_afflist(
- affile->af_flagtype, afflist, ah->ah_flag))
+ if (((condit & CONDIT_COMB) == 0 || ah->ah_combine)
+ && flag_in_afflist(affile->af_flagtype, afflist,
+ ah->ah_flag))
{
/* Loop over all affix entries with this name. */
for (ae = ah->ah_first; ae != NULL; ae = ae->ae_next)
@@ -6654,7 +6690,10 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
* Another requirement from Myspell is that the chop
* string is shorter than the word itself.
* For prefixes, when "PFXPOSTPONE" was used, only do
- * prefixes with a chop string and/or flags. */
+ * prefixes with a chop string and/or flags.
+ * When a previously added affix had CIRCUMFIX this one
+ * must have it too, if it had not then this one must not
+ * have one either. */
regmatch.regprog = ae->ae_prog;
regmatch.rm_ic = FALSE;
if ((xht != NULL || !affile->af_pfxpostpone
@@ -6663,7 +6702,12 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
&& (ae->ae_chop == NULL
|| STRLEN(ae->ae_chop) < wordlen)
&& (ae->ae_prog == NULL
- || vim_regexec(&regmatch, word, (colnr_T)0)))
+ || vim_regexec(&regmatch, word, (colnr_T)0))
+ && (((condit & CONDIT_CFIX) == 0)
+ == ((condit & CONDIT_AFF) == 0
+ || ae->ae_flags == NULL
+ || !flag_in_afflist(affile->af_flagtype,
+ ae->ae_flags, affile->af_circumfix))))
{
/* Match. Remove the chop and add the affix. */
if (xht == NULL)
@@ -6707,27 +6751,88 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
STRCAT(newword, ae->ae_add);
}
- /* Obey the "rare" flag of the affix. */
- if (affile->af_rare != 0
- && ae->ae_flags != NULL
- && flag_in_afflist(
- affile->af_flagtype, ae->ae_flags,
- affile->af_rare))
- use_flags = flags | WF_RARE;
- else
- use_flags = flags;
+ use_flags = flags;
+ use_pfxlist = pfxlist;
+ use_pfxlen = pfxlen;
+ need_affix = FALSE;
+ use_condit = condit | CONDIT_COMB | CONDIT_AFF;
+ if (ae->ae_flags != NULL)
+ {
+ /* Extract flags from the affix list. */
+ use_flags |= get_affix_flags(affile, ae->ae_flags);
+
+ if (affile->af_needaffix != 0 && flag_in_afflist(
+ affile->af_flagtype, ae->ae_flags,
+ affile->af_needaffix))
+ need_affix = TRUE;
+
+ /* When there is a CIRCUMFIX flag the other affix
+ * must also have it and we don't add the word
+ * with one affix. */
+ if (affile->af_circumfix != 0 && flag_in_afflist(
+ affile->af_flagtype, ae->ae_flags,
+ affile->af_circumfix))
+ {
+ use_condit |= CONDIT_CFIX;
+ if ((condit & CONDIT_CFIX) == 0)
+ need_affix = TRUE;
+ }
+
+ if (affile->af_pfxpostpone
+ || spin->si_compflags != NULL)
+ {
+ if (affile->af_pfxpostpone)
+ /* Get prefix IDS from the affix list. */
+ use_pfxlen = get_pfxlist(affile,
+ ae->ae_flags, store_afflist);
+ else
+ use_pfxlen = 0;
+ use_pfxlist = store_afflist;
+
+ /* Combine the prefix IDs. Avoid adding the
+ * same ID twice. */
+ for (i = 0; i < pfxlen; ++i)
+ {
+ for (j = 0; j < use_pfxlen; ++j)
+ if (pfxlist[i] == use_pfxlist[j])
+ break;
+ if (j == use_pfxlen)
+ use_pfxlist[use_pfxlen++] = pfxlist[i];
+ }
+
+ if (spin->si_compflags != NULL)
+ /* Get compound IDS from the affix list. */
+ get_compflags(affile, ae->ae_flags,
+ use_pfxlist + use_pfxlen);
+
+ /* Combine the list of compound flags.
+ * Concatenate them to the prefix IDs list.
+ * Avoid adding the same ID twice. */
+ for (i = pfxlen; pfxlist[i] != NUL; ++i)
+ {
+ for (j = use_pfxlen;
+ use_pfxlist[j] != NUL; ++j)
+ if (pfxlist[i] == use_pfxlist[j])
+ break;
+ if (use_pfxlist[j] == NUL)
+ {
+ use_pfxlist[j++] = pfxlist[i];
+ use_pfxlist[j] = NUL;
+ }
+ }
+ }
+ }
/* Obey a "COMPOUNDFORBIDFLAG" of the affix: don't
* use the compound flags. */
- use_pfxlist = pfxlist;
- if (pfxlist != NULL
+ if (use_pfxlist != NULL
&& affile->af_compforbid != 0
&& ae->ae_flags != NULL
&& flag_in_afflist(
affile->af_flagtype, ae->ae_flags,
affile->af_compforbid))
{
- vim_strncpy(pfx_pfxlist, pfxlist, pfxlen);
+ vim_strncpy(pfx_pfxlist, use_pfxlist, use_pfxlen);
use_pfxlist = pfx_pfxlist;
}
@@ -6741,8 +6846,9 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
/* ... don't use a prefix list if combining
* affixes is not allowed. But do use the
* compound flags after them. */
- if ((!ah->ah_combine || comb) && pfxlist != NULL)
- use_pfxlist += pfxlen;
+ if ((!ah->ah_combine || (condit & CONDIT_COMB))
+ && use_pfxlist != NULL)
+ use_pfxlist += use_pfxlen;
}
/* When compounding is supported and there is no
@@ -6763,16 +6869,38 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
/* Store the modified word. */
if (store_word(spin, newword, use_flags,
- spin->si_region, use_pfxlist, FALSE) == FAIL)
+ spin->si_region, use_pfxlist,
+ need_affix) == FAIL)
retval = FAIL;
+ /* When added a prefix or a first suffix and the affix
+ * has flags may add a(nother) suffix. RECURSIVE! */
+ if ((condit & CONDIT_SUF) && ae->ae_flags != NULL)
+ if (store_aff_word(spin, newword, ae->ae_flags,
+ affile, &affile->af_suff, xht,
+ use_condit & (xht == NULL
+ ? ~0 : ~CONDIT_SUF),
+ use_flags, use_pfxlist, pfxlen) == FAIL)
+ retval = FAIL;
+
/* When added a suffix and combining is allowed also
- * try adding prefixes additionally. RECURSIVE! */
+ * try adding a prefix additionally. Both for the
+ * word flags and for the affix flags. RECURSIVE! */
if (xht != NULL && ah->ah_combine)
- if (store_aff_word(spin, newword, afflist, affile,
- xht, NULL, TRUE,
- use_flags, use_pfxlist, pfxlen) == FAIL)
+ {
+ if (store_aff_word(spin, newword,
+ afflist, affile,
+ xht, NULL, use_condit,
+ use_flags, use_pfxlist,
+ pfxlen) == FAIL
+ || (ae->ae_flags != NULL
+ && store_aff_word(spin, newword,
+ ae->ae_flags, affile,
+ xht, NULL, use_condit,
+ use_flags, use_pfxlist,
+ pfxlen) == FAIL))
retval = FAIL;
+ }
}
}
}
diff --git a/src/version.h b/src/version.h
index 7cd5ea49..e3bccb55 100644
--- a/src/version.h
+++ b/src/version.h
@@ -35,6 +35,6 @@
*/
#define VIM_VERSION_NODOT "vim70c"
#define VIM_VERSION_SHORT "7.0c"
-#define VIM_VERSION_MEDIUM "7.0c10 BETA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c10 BETA (2006 Apr 5)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c10 BETA (2006 Apr 5, compiled "
+#define VIM_VERSION_MEDIUM "7.0c11 BETA"
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c11 BETA (2006 Apr 6)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c11 BETA (2006 Apr 6, compiled "
diff --git a/src/window.c b/src/window.c
index 677dcbec..26003f37 100644
--- a/src/window.c
+++ b/src/window.c
@@ -482,14 +482,15 @@ newwindow:
case 'f':
case 'F':
case Ctrl_F:
+wingotofile:
CHECK_CMDWIN
ptr = grab_file_name(Prenum1, &lnum);
if (ptr != NULL)
{
-#ifdef FEAT_GUI
+# ifdef FEAT_GUI
need_mouse_correct = TRUE;
-#endif
+# endif
setpcmark();
if (win_split(0, 0) == OK)
{
@@ -592,6 +593,11 @@ newwindow:
do_nv_ident('g', xchar);
break;
+#ifdef FEAT_SEARCHPATH
+ case 'f': /* CTRL-W gf: "gf" in a new tab page */
+ cmdmod.tab = TRUE;
+ goto wingotofile;
+#endif
default:
beep_flush();
break;
@@ -3879,8 +3885,8 @@ win_enter_ext(wp, undo_sync, curwin_invalid)
setmouse(); /* in case jumped to/from help buffer */
#endif
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
- /* Change directories when the acd option is set on and after
+#ifdef FEAT_AUTOCHDIR
+ /* Change directories when the 'acd' option is set on and after
* switching windows. */
if (p_acd && curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)