summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-03-04 23:39:37 +0000
committerBram Moolenaar <Bram@vim.org>2005-03-04 23:39:37 +0000
commit19a09a189379659b917cf5ccff78f3e5ec061015 (patch)
tree806d594bf7af04ef956c0c96ad64adfcd96325dc
parent7383034c0ab657158c4c69146254beffdea4859e (diff)
updated for version 7.0055v7.0055
-rw-r--r--Filelist2
-rw-r--r--runtime/doc/autocmd.txt7
-rw-r--r--runtime/doc/eval.txt28
-rw-r--r--runtime/doc/options.txt8
-rw-r--r--runtime/doc/tags7
-rw-r--r--runtime/doc/term.txt16
-rw-r--r--runtime/doc/todo.txt36
-rw-r--r--runtime/doc/various.txt3
-rw-r--r--runtime/doc/version7.txt16
-rw-r--r--runtime/keymap/canfr-win.vim91
-rw-r--r--runtime/scripts.vim6
-rw-r--r--runtime/syntax/prescribe.vim69
-rw-r--r--runtime/syntax/vim.vim4
-rw-r--r--src/VisVim/Res/ToolbarL.bmpbin0 -> 2678 bytes
-rw-r--r--src/VisVim/Res/ToolbarM.bmpbin0 -> 758 bytes
-rw-r--r--src/eval.c47
-rw-r--r--src/fileio.c60
-rw-r--r--src/getchar.c4
-rw-r--r--src/gui_gtk_x11.c89
-rw-r--r--src/gui_w32.c22
-rw-r--r--src/gui_x11.c2
-rw-r--r--src/keymap.h15
-rw-r--r--src/misc2.c1
-rw-r--r--src/normal.c3
-rw-r--r--src/option.c4
-rw-r--r--src/os_mac_conv.c8
-rw-r--r--src/os_mswin.c7
-rw-r--r--src/po/ja.po3778
-rw-r--r--src/po/ja.sjis.po3778
-rw-r--r--src/proto/eval.pro1
-rw-r--r--src/proto/tag.pro1
-rw-r--r--src/regexp.c28
-rw-r--r--src/tag.c125
-rw-r--r--src/term.c198
-rw-r--r--src/testdir/test24.inbin890 -> 975 bytes
-rw-r--r--src/testdir/test24.ok3
-rw-r--r--src/undo.c4
-rw-r--r--src/version.h4
-rw-r--r--src/vim.h4
39 files changed, 5024 insertions, 3455 deletions
diff --git a/Filelist b/Filelist
index bdd33c1624..57edbe9819 100644
--- a/Filelist
+++ b/Filelist
@@ -325,7 +325,7 @@ SRC_DOS = \
# source files for DOS without CR/LF translation (also in the extra archive)
SRC_DOS_BIN = \
- src/VisVim/Res \
+ src/VisVim/Res/*.bmp \
src/tearoff.bmp \
src/tools.bmp \
src/tools16.bmp \
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index e994df8867..44608a0bff 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Feb 21
+*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -286,7 +286,7 @@ FileChangedShell When Vim notices that the modification time of
change. |timestamp|
Mostly triggered after executing a shell
command, but also with a |:checktime| command
- or when Vim regains input focus.
+ or when Gvim regains input focus.
This autocommand is triggered for each changed
file. It is not used when 'autoread' is set
and the buffer was not changed. If a
@@ -294,6 +294,9 @@ FileChangedShell When Vim notices that the modification time of
warning message and prompt is not given.
This is useful for reloading related buffers
which are affected by a single command.
+ The |v:fcs_reason| variable is set to indicate
+ what happened and |v:fcs_choice| can be used
+ to tell Vim what to do next.
NOTE: When this autocommand is executed, the
current buffer "%" may be different from the
buffer that was changed "<afile>".
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 1838a82258..1cfa7b0fc3 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.0aa. Last change: 2005 Feb 26
+*eval.txt* For Vim version 7.0aa. Last change: 2005 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1183,6 +1183,32 @@ v:exception The value of the exception most recently caught and not
:endtry
< Output: "caught oops".
+ *v:fcs_reason* *fcs_reason-variable*
+v:fcs_reason The reason why the |FileChangedShell| event was triggered.
+ Can be used in an autocommand to decide what to do and/or what
+ to set v:fcs_choice to. Possible values:
+ deleted file no longer exists
+ conflict file contents, mode or timestamp was
+ changed and buffer is modified
+ changed file contents has changed
+ mode mode of file changed
+ time only file timestamp changed
+
+ *v:fcs_choice* *fcs_choice-variable*
+v:fcs_choice What should happen after a |FileChangedShell| event was
+ triggered. Can be used in an autocommand to tell Vim what to
+ do with the affected buffer:
+ reload Reload the buffer (does not work if
+ the file was deleted).
+ ask Ask the user what to do, as if there
+ was no autocommand. Except that when
+ only the timestamp changed nothing
+ will happen.
+ <empty> Nothing, the autocommand should do
+ everything that needs to be done.
+ The default is empty. If another (invalid) value is used then
+ Vim behaves like it is empty, there is no warning message.
+
*v:fname_in* *fname_in-variable*
v:fname_in The name of the input file. Only valid while evaluating:
option used for ~
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 4bf27f66df..d0b5abf745 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2005 Feb 23
+*options.txt* For Vim version 7.0aa. Last change: 2005 Mar 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6833,9 +6833,9 @@ A jump table for the options with a short description can be found at |Q_op|.
global
Window height. Do not confuse this with the height of the Vim window,
use 'lines' for that.
- Used for |CTRL-F| and |CTRL-B| when the value is smaller than 'lines'
- minus one. The screen will scroll 'window' minus two lines, with a
- minimum of one.
+ Used for |CTRL-F| and |CTRL-B| when there is only one window and the
+ value is smaller than 'lines' minus one. The screen will scroll
+ 'window' minus two lines, with a minimum of one.
When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll
in a much smarter way, taking care of wrapping lines.
When resizing the Vim window, the value is smaller than 1 or more than
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 4f73e69b22..c4cdbbb92f 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -4782,6 +4782,8 @@ faq intro.txt /*faq*
farsi farsi.txt /*farsi*
farsi.txt farsi.txt /*farsi.txt*
fasm.vim syntax.txt /*fasm.vim*
+fcs_choice-variable eval.txt /*fcs_choice-variable*
+fcs_reason-variable eval.txt /*fcs_reason-variable*
feature-list eval.txt /*feature-list*
fetch pi_netrw.txt /*fetch*
file-browser-5.2 version5.txt /*file-browser-5.2*
@@ -5078,6 +5080,7 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help*
help-context help.txt /*help-context*
+help-tags tags 1
help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt*
@@ -5901,6 +5904,7 @@ printing print.txt /*printing*
printing-formfeed print.txt /*printing-formfeed*
profile repeat.txt /*profile*
profiling repeat.txt /*profiling*
+profiling-variable eval.txt /*profiling-variable*
progname-variable eval.txt /*progname-variable*
progress-syntax syntax.txt /*progress-syntax*
progress.vim syntax.txt /*progress.vim*
@@ -6620,6 +6624,8 @@ v:ctype eval.txt /*v:ctype*
v:dying eval.txt /*v:dying*
v:errmsg eval.txt /*v:errmsg*
v:exception eval.txt /*v:exception*
+v:fcs_choice eval.txt /*v:fcs_choice*
+v:fcs_reason eval.txt /*v:fcs_reason*
v:fname_diff eval.txt /*v:fname_diff*
v:fname_in eval.txt /*v:fname_in*
v:fname_new eval.txt /*v:fname_new*
@@ -6634,6 +6640,7 @@ v:lang eval.txt /*v:lang*
v:lc_time eval.txt /*v:lc_time*
v:lnum eval.txt /*v:lnum*
v:prevcount eval.txt /*v:prevcount*
+v:profiling eval.txt /*v:profiling*
v:progname eval.txt /*v:progname*
v:register eval.txt /*v:register*
v:servername eval.txt /*v:servername*
diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt
index b9252a93d6..fba493c707 100644
--- a/runtime/doc/term.txt
+++ b/runtime/doc/term.txt
@@ -1,4 +1,4 @@
-*term.txt* For Vim version 7.0aa. Last change: 2004 Dec 07
+*term.txt* For Vim version 7.0aa. Last change: 2005 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -146,7 +146,7 @@ sequence of bytes.
*vt100-function-keys* *xterm-function-keys*
An xterm can send function keys F1 to F4 in two modes: vt100 compatible or
-not. Because Vim cannot know what the xterm is sending, both types of keys
+not. Because Vim may not know what the xterm is sending, both types of keys
are recognized. The same happens for the <Home> and <End> keys.
normal vt100 ~
<F1> t_k1 <Esc>[11~ <xF1> <Esc>OP *<xF1>-xterm*
@@ -167,6 +167,18 @@ recognizes most of them. Use ":set termcap" to check which are supported and
what the codes are. Mostly these are not in a termcap, they are only
supported by the builtin_xterm termcap.
+ *xterm-modifier-keys*
+Newer versions of xterm support Alt and Ctrl for most function keys. To avoid
+having to add all combinations of Alt, Ctrl and Shift for every key a special
+sequence is recognized at the end of a termcap entry: ";*X". The "X" can be
+any character, often '~' is used. The ";*" stands for an optional modifier
+argument. ";2" is Shift, ";3" is Alt, ";5" is Ctrl and ";9" is Meta (when
+it's different from Alt). They can be combined. Examples: >
+ :set <F8>=^[[19;*~
+ :set <Home>=^[[1;*H
+Another speciality about these codes is that they are not overwritten by
+another code. That is to avoid that the codes obtained from xterm directly
+|t_RV| overwrite them.
*xterm-scroll-region*
The default termcap entry for xterm on Sun and other platforms does not
contain the entry for scroll regions. Add ":cs=\E[%i%d;%dr:" to the xterm
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index a1c487de2e..833b6aa715 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Feb 28
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,17 +30,25 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+- Steve Wall has a patch (2005 Mar 3) for adding function keys up to 37,
+ with modifiers.
+ Still need to recognize modifiers in "ESC O 5 F". "ESC O * F"?
+":map <C-S-End> lll" has no effect.
+
Mingw code to catch out-of-stack error doesn't work. See MINGW_TRY in
regexp.c. Try with example from Michaelis.
-Russian helpfile doesn't show up correctly when 'encoding' is koi8-r.
-(Vassily Ragosin 2005 Feb 16)
-
Mac unicode patch (Da Woon Jung):
-- typing doesn't work
- selecting proportional font breaks display
+- UTF-8 text causes display problems. Character width wrong?
Patch for gettags(). Yegappan Lakshmanan Feb 27
+- docs: use of ^ and $ in pattern, refer to |tag-regexp|
+ explain what the fields mean.
+ use of 'tags' option
+
+- Patch from Steve Wall (2005 Mar 3) for xterm mouse positioning above
+ column 223.
autoload:
- Add a Vim script in $VIMRUNTIME/tools that takes a file with a list of
@@ -55,6 +63,8 @@ autoload:
Patch for 'balloonexpr' option. Sergey Khorev, Feb 26. Addition Feb 27.
+Patch for "paranoid mode" by Kevin Collins, March 3.
+
Awaiting response:
- Patch for mch_FullName() also in Vim 6.3? os_mswin.c
- Win32: tearoff menu window should have a scrollbar when it's taller than
@@ -181,10 +191,6 @@ PLANNED FOR VERSION 7.0:
screen has not yet been allocated with the new size.
- Running a shell command from the GUI still has limitations. Look into how
the Vim shell project can help: http://vimshell.wana.at
-8 When a file is change outside of Vim and unmodified in Vim there is no
- simple way to automatically reload the file. Either add an option for
- this or make it simple to have the FileChangedShell invoke the normal
- action, telling it what to do.
- Displaying size of Visual area: use 24-33 column display.
When selecting multiple lines, up to about a screenfull, also count the
characters.
@@ -258,12 +264,6 @@ Updated Ruby interface. (Ryan Paul)
Awaiting updated patches:
--- awaiting updated patch ---
- 7 Add patch from Wall for this one ( ~/Mail/oldmail/wall/in.00019 ):
- 'flipcase' variable: upper/lowercase pairs.
- Insert comma's between pairs and allow a range, make it look like
- 'isfname'. E.g. ":set flipcase=a-zA-Z,xX,23-33:143-153". The colon to
- separate the from and to part is optional.
- Resp: no time now.
8 Add GTK 2.3 file dialog support. Patch by Grahame Bowland, 2004 Mar
15, but it doesn't use "initdir" or "dflt". (will update patch)
8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
@@ -323,12 +323,6 @@ Awaiting updated patches:
done for filetype detection. Patch from Walter Briscoe, 2003 Jul 1.
7 Add a "-@ filelist" argument: read file names from a file. (David
Kotchan has a patch for it)
- 8 Add term entries for function keys on xterm with alt and ctrl (new in
- pl 94). E.g., Control adds ";5" in "<Esc>[20;5~". Find a generic way
- to prepend a modifier in console mode, to avoid having to specify each
- individual modified key.
- Steve Wall has a patch (2002 Mar 12) for adding function keys up to 37,
- with modifiers.
8 Include a connection to an external program through a pipe? See
patches from Felbinger for a mathematica interface.
Or use emacs server kind of thing?
diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt
index 31aa8af34d..7c0e74d04c 100644
--- a/runtime/doc/various.txt
+++ b/runtime/doc/various.txt
@@ -1,4 +1,4 @@
-*various.txt* For Vim version 7.0aa. Last change: 2005 Feb 21
+*various.txt* For Vim version 7.0aa. Last change: 2005 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -324,6 +324,7 @@ N *+path_extra* Up/downwards search in 'path' and 'tags'
m *+perl* Perl interface |perl|, may have |/dyn|
*+postscript* |:hardcopy| writes a PostScript file
N *+printer* |:hardcopy| command
+H *+profile* |:profile| command
m *+python* Python interface |python|, may have |/dyn|
N *+quickfix* |:make| and |quickfix| commands
B *+rightleft* Right to left typing |'rightleft'|
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 2ac2ceac2c..5fb35644ed 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2005 Feb 27
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -412,6 +412,9 @@ Autocommands can be defined local to a buffer. This means they will also work
when the buffer does not have a name or no specific name. See
|autocmd-buflocal|. (Yakov Lerner)
+For xterm most combinations of modifiers with function keys are recognized.
+|xterm-modifier-keys|
+
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -539,7 +542,11 @@ To count items (pattern matches) without changing the buffer the 'n' flag has
been added to |:substitute|. See |count-items|.
The "screen.linux" $TERM name is recognized to set the default for
-'background' to "dark". (Ciaran McCreesh)
+'background' to "dark". (Ciaran McCreesh) Also for "cygwin".
+
+The |FileChangedShell| autocommand event can now use the |v:fcs_reason|
+variable that specifies what triggered the event. |v:fcs_choice| can be used
+to reload the buffer or ask the user what to do.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
@@ -897,4 +904,9 @@ from the terminal we actually get 3 lines for the cmdline in gvim.
When setting $HOME allocated memory would leak.
+Win32: bold characters may sometimes write in another character cell. Use
+unicodepdy[] as for UTF-8. (Taro Muraoka)
+
+":w fname" didn't work for files with 'buftype' set to "nofile".
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/keymap/canfr-win.vim b/runtime/keymap/canfr-win.vim
new file mode 100644
index 0000000000..7a405bf0be
--- /dev/null
+++ b/runtime/keymap/canfr-win.vim
@@ -0,0 +1,91 @@
+" Vim Keymap file for the normalized Canadian multilingual keyboard
+" CAN/CSA Z243.200-92 using the latin1 encoding.
+" This mapping is limited in scope, as it assumes that the AltGr
+" key works as it typically does in a Windows system with a multilingual
+" English keyboard. It probably won't work with the US keyboard on US
+" English versions of Windows, because those don't provide the AltGr keys.
+" The mapping was tested with Win2k and WinXP.
+
+" Maintainer: Eric Joanis <joanis@cs.toronto.edu>
+" Last Change: 2004 Jan 13
+
+" 2003 Dec 04
+" Initial Revision
+
+" 2004 Jan 13
+" Added the upper case accented characters, forgotten in the initial version.
+
+" All characters are given literally, conversion to another encoding (e.g.,
+" UTF-8) should work.
+scriptencoding latin1
+
+" Use this short name in the status line.
+let b:keymap_name = "canfr"
+
+loadkeymap
+< '
+> "
+/ é
+? É
+' è
+\" È
+\\ à
+| À
+[a â
+[e ê
+[i î
+[o ô
+[u û
+[A Â
+[E Ê
+[I Î
+[O Ô
+[U Û
+[[ ^
+{a ä
+{e ë
+{i ï
+{o ö
+{u ü
+{y ÿ
+{A Ä
+{E Ë
+{I Ï
+{O Ö
+{U Ü
+] ç
+} Ç
+` /
+~ \\
+^ ?
+ú «
+ø »
+¬ <
+® >
+» °
+Ûa à
+Ûe è
+Ûi ì
+Ûo ò
+Ûu ù
+ÛA À
+ÛE È
+ÛI Ì
+ÛO Ò
+ÛU Ù
+ÛÛ `
+Ýa ã
+Ýo õ
+Ýn ñ
+Ýs ß
+ÝA Ã
+ÝO Õ
+ÝN Ñ
+ÝS ß
+ÝÝ ~
+à |
+· {
+¸ }
+¹ [
+° ]
+½ ¬
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index 69bee3aaf7..e25da8717d 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types in scripts
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2004 Oct 02
+" Last change: 2005 Mar 04
" This file is called by an autocommand for every file that has just been
" loaded into a buffer. It checks if the type of file can be recognized by
@@ -222,6 +222,10 @@ else
elseif s:line2 =~ '^CVS:' || getline("$") =~ '^CVS: '
set ft=cvs
+ " Prescribe
+ elseif s:line1 =~ '^!R!'
+ set ft=prescribe
+
" Send-pr
elseif s:line1 =~ '^SEND-PR:'
set ft=sendpr
diff --git a/runtime/syntax/prescribe.vim b/runtime/syntax/prescribe.vim
new file mode 100644
index 0000000000..d89ee35253
--- /dev/null
+++ b/runtime/syntax/prescribe.vim
@@ -0,0 +1,69 @@
+" Vim syntax file
+" Language: Kyocera PreScribe2e
+" Maintainer: Klaus Muth <klaus@hampft.de>
+" URL: http://www.hampft.de/vim/syntax/prescribe.vim
+" Last Change: 2005 Mar 04
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+syn match prescribeSpecial "!R!"
+
+" all prescribe commands
+syn keyword prescribeStatement ALTF AMCR ARC ASFN ASTK BARC BLK BOX CALL
+syn keyword prescribeStatement CASS CIR CLIP CLPR CLSP COPY CPTH CSET CSTK
+syn keyword prescribeStatement CTXT DAF DAM DAP DELF DELM DPAT DRP DRPA DUPX
+syn keyword prescribeStatement DXPG DXSD DZP ENDD ENDM ENDR EPL EPRM EXIT
+syn keyword prescribeStatement FDIR FILL FLAT FLST FONT FPAT FRPO FSET FTMD
+syn keyword prescribeStatement GPAT ICCD INTL JOG LDFC MAP MCRO MDAT MID
+syn keyword prescribeStatement MLST MRP MRPA MSTK MTYP MZP NEWP PAGE PARC PAT
+syn keyword prescribeStatement PCRP PCZP PDIR RDRP PDZP PELP PIE PMRA PMRP PMZP
+syn keyword prescribeStatement PRBX PRRC PSRC PXPL RDMP RES RSL RGST RPCS RPF
+syn keyword prescribeStatement RPG RPP RPU RTTX RTXT RVCD RVRD SBM SCAP SCCS
+syn keyword prescribeStatement SCF SCG SCP SCPI SCRC SCS SCU SDP SEM SETF SFA
+syn keyword prescribeStatement SFNT SIMG SIR SLJN SLM SLPI SLPP SLS SMLT SPD
+syn keyword prescribeStatement SPL SPLT SPO SPSZ SPW SRM SRO SROP SSTK STAT STRK
+syn keyword prescribeStatement SULP SVCP TATR TEXT TPRS UNIT UOM WIDE WRED XPAT
+syn match prescribeStatement "\<ALTB\s\+[ACDEGRST]\>"
+syn match prescribeStatement "\<CPPY\s\+[DE]\>"
+syn match prescribeStatement "\<EMCR\s\+[DE]\>"
+syn match prescribeStatement "\<FRPO\s\+INIT\>"
+syn match prescribeStatement "\<JOB[DLOPST]\>"
+syn match prescribeStatement "\<LDFC\s\+[CFS]\>"
+syn match prescribeStatement "\<RWER\s\+[DFILRSTW]\>"
+
+syn match prescribeCSETArg "[0-9]\{1,3}[A-Z]"
+syn match prescribeFRPOArg "[A-Z][0-9]\{1,2}"
+syn match prescribeNumber "[0-9]\+"
+syn region prescribeString start=+'+ end=+'+ skip=+\\'+
+syn region prescribeComment start=+CMNT+ end=+;+
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_prescribe_syn_inits")
+ if version < 508
+ let did_prescribe_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink prescribeSpecial PreProc
+ HiLink prescribeStatement Statement
+ HiLink prescribeNumber Number
+ HiLink prescribeCSETArg String
+ HiLink prescribeFRPOArg String
+ HiLink prescribeComment Comment
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "prescribe"
+
+" vim: ts=8
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index b9af06416b..29575c7acf 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -2,7 +2,7 @@
" Language: Vim 7.0 script
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
" Last Change: February 22, 2005
-" Version: 7.0-07
+" Version: 7.0-08
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -245,7 +245,7 @@ syn match vimFilter contained "^!.\{-}\(|\|$\)" contains=vimSpecFile
syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile
" Complex repeats (:h complex-repeat) {{{2
-syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]'lc=1
+"syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]'lc=1
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\)'
" Set command and associated set-options (vimOptions) with comment {{{2
diff --git a/src/VisVim/Res/ToolbarL.bmp b/src/VisVim/Res/ToolbarL.bmp
new file mode 100644
index 0000000000..e11c66fc65
--- /dev/null
+++ b/src/VisVim/Res/ToolbarL.bmp
Binary files differ
diff --git a/src/VisVim/Res/ToolbarM.bmp b/src/VisVim/Res/ToolbarM.bmp
new file mode 100644
index 0000000000..22e15f4893
--- /dev/null
+++ b/src/VisVim/Res/ToolbarM.bmp
Binary files differ
diff --git a/src/eval.c b/src/eval.c
index bde12e56e1..c7aba51456 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -316,6 +316,8 @@ static struct vimvar
{VV_NAME("val", VAR_UNKNOWN), VV_RO},
{VV_NAME("key", VAR_UNKNOWN), VV_RO},
{VV_NAME("profiling", VAR_NUMBER), VV_RO},
+ {VV_NAME("fcs_reason", VAR_STRING), VV_RO},
+ {VV_NAME("fcs_choice", VAR_STRING), 0},
};
/* shorthand */
@@ -549,6 +551,7 @@ static void f_synID __ARGS((typval_T *argvars, typval_T *rettv));
static void f_synIDattr __ARGS((typval_T *argvars, typval_T *rettv));
static void f_synIDtrans __ARGS((typval_T *argvars, typval_T *rettv));
static void f_system __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_taglist __ARGS((typval_T *argvars, typval_T *rettv));
static void f_tempname __ARGS((typval_T *argvars, typval_T *rettv));
static void f_tolower __ARGS((typval_T *argvars, typval_T *rettv));
static void f_toupper __ARGS((typval_T *argvars, typval_T *rettv));
@@ -6196,6 +6199,7 @@ static struct fst
{"synIDattr", 2, 3, f_synIDattr},
{"synIDtrans", 1, 1, f_synIDtrans},
{"system", 1, 2, f_system},
+ {"taglist", 1, 1, f_taglist},
{"tempname", 0, 0, f_tempname},
{"tolower", 1, 1, f_tolower},
{"toupper", 1, 1, f_toupper},
@@ -13134,6 +13138,35 @@ done:
}
/*
+ * "gettags()" function
+ */
+ static void
+f_taglist(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+{
+ char_u *tag_pattern;
+ list_T *l;
+
+ tag_pattern = get_tv_string(&argvars[0]);
+
+ rettv->vval.v_number = FALSE;
+
+ l = list_alloc();
+ if (l != NULL)
+ {
+ if (get_tags(l, tag_pattern) != FAIL)
+ {
+ rettv->vval.v_list = l;
+ rettv->v_type = VAR_LIST;
+ ++l->lv_refcount;
+ }
+ else
+ list_free(l);
+ }
+}
+
+/*
* "tempname()" function
*/
/*ARGSUSED*/
@@ -14010,7 +14043,7 @@ set_vim_var_nr(idx, val)
}
/*
- * Get number v: variable value;
+ * Get number v: variable value.
*/
long
get_vim_var_nr(idx)
@@ -14019,6 +14052,18 @@ get_vim_var_nr(idx)
return vimvars[idx].vv_nr;
}
+#if defined(FEAT_AUTOCMD) || defined(PROTO)
+/*
+ * Get string v: variable value. Uses a static buffer, can only be used once.
+ */
+ char_u *
+get_vim_var_str(idx)
+ int idx;
+{
+ return get_tv_string(&vimvars[idx].vv_tv);
+}
+#endif
+
/*
* Set v:count, v:count1 and v:prevcount.
*/
diff --git a/src/fileio.c b/src/fileio.c
index c3aef90a11..1edf0ae79a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1331,7 +1331,8 @@ retry:
/*
* If there is conversion error or not enough room try using
- * another conversion.
+ * another conversion. Except for when there is no
+ * alternative (help files).
*/
while ((iconv(iconv_fd, (void *)&fromp, &from_size,
&top, &to_size)
@@ -2753,7 +2754,7 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
if (!(did_cmd = apply_autocmds_exarg(EVENT_BUFWRITECMD,
sfname, sfname, FALSE, curbuf, eap)))
{
- if (bt_nofile(curbuf))
+ if (overwriting && bt_nofile(curbuf))
nofile_err = TRUE;
else
apply_autocmds_exarg(EVENT_BUFWRITEPRE,
@@ -2765,7 +2766,7 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
if (!(did_cmd = apply_autocmds_exarg(EVENT_FILEWRITECMD,
sfname, sfname, FALSE, curbuf, eap)))
{
- if (bt_nofile(curbuf))
+ if (overwriting && bt_nofile(curbuf))
nofile_err = TRUE;
else
apply_autocmds_exarg(EVENT_FILEWRITEPRE,
@@ -5917,7 +5918,10 @@ buf_check_timestamp(buf, focus)
#endif
#ifdef FEAT_AUTOCMD
static int busy = FALSE;
+ int n;
+ char_u *s;
#endif
+ char *reason;
/* If there is no file name, the buffer is not loaded, 'buftype' is
* set, we are in the middle of a save or being called recursively: ignore
@@ -5975,15 +5979,26 @@ buf_check_timestamp(buf, focus)
reload = TRUE;
else
{
-#ifdef FEAT_AUTOCMD
- int n;
+ if (stat_res < 0)
+ reason = "deleted";
+ else if (bufIsChanged(buf))
+ reason = "conflict";
+ else if (orig_size != buf->b_orig_size || buf_contents_changed(buf))
+ reason = "changed";
+ else if (orig_mode != buf->b_orig_mode)
+ reason = "mode";
+ else
+ reason = "time";
+#ifdef FEAT_AUTOCMD
/*
* Only give the warning if there are no FileChangedShell
* autocommands.
* Avoid being called recursively by setting "busy".
*/
busy = TRUE;
+ set_vim_var_string(VV_FCS_REASON, (char_u *)reason, -1);
+ set_vim_var_string(VV_FCS_CHOICE, (char_u *)"", -1);
n = apply_autocmds(EVENT_FILECHANGEDSHELL,
buf->b_fname, buf->b_fname, FALSE, buf);
busy = FALSE;
@@ -5991,13 +6006,19 @@ buf_check_timestamp(buf, focus)
{
if (!buf_valid(buf))
EM