forked from aniani/vim
updated for version 7.0055
This commit is contained in:
parent
7383034c0a
commit
19a09a1893
2
Filelist
2
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 \
|
||||
|
@ -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>".
|
||||
|
@ -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 ~
|
||||
|
@ -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
|
||||
|
@ -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*
|
||||
|
@ -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
|
||||
|
@ -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?
|
||||
|
@ -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'|
|
||||
|
@ -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:
|
||||
|
91
runtime/keymap/canfr-win.vim
Normal file
91
runtime/keymap/canfr-win.vim
Normal file
@ -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 ß
|
||||
ÝÝ ~
|
||||
à |
|
||||
· {
|
||||
¸ }
|
||||
¹ [
|
||||
° ]
|
||||
½ ¬
|
@ -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
|
||||
|
69
runtime/syntax/prescribe.vim
Normal file
69
runtime/syntax/prescribe.vim
Normal file
@ -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
|
@ -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
|
||||
|
BIN
src/VisVim/Res/ToolbarL.bmp
Normal file
BIN
src/VisVim/Res/ToolbarL.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
src/VisVim/Res/ToolbarM.bmp
Normal file
BIN
src/VisVim/Res/ToolbarM.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 758 B |
47
src/eval.c
47
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},
|
||||
@ -13133,6 +13137,35 @@ done:
|
||||
rettv->vval.v_string = res;
|
||||
}
|
||||
|
||||
/*
|
||||
* "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
|
||||
*/
|
||||
@ -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.
|
||||
*/
|
||||
|
60
src/fileio.c
60
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))
|
||||
EMSG(_("E246: FileChangedShell autocommand deleted buffer"));
|
||||
return 2;
|
||||
s = get_vim_var_str(VV_FCS_CHOICE);
|
||||
if (STRCMP(s, "reload") == 0 && *reason != 'd')
|
||||
reload = TRUE;
|
||||
else if (STRCMP(s, "ask") == 0)
|
||||
n = FALSE;
|
||||
else
|
||||
return 2;
|
||||
}
|
||||
else
|
||||
if (!n)
|
||||
#endif
|
||||
{
|
||||
if (stat_res < 0)
|
||||
mesg = _("E211: Warning: File \"%s\" no longer available");
|
||||
if (*reason == 'd')
|
||||
mesg = _("E211: File \"%s\" no longer available");
|
||||
else
|
||||
{
|
||||
helpmesg = TRUE;
|
||||
@ -6010,13 +6031,22 @@ buf_check_timestamp(buf, focus)
|
||||
* checked out of CVS). Always warn when the buffer was
|
||||
* changed.
|
||||
*/
|
||||
if (bufIsChanged(buf))
|
||||
if (reason[2] == 'n')
|
||||
{
|
||||
mesg = _("W12: Warning: File \"%s\" has changed and the buffer was changed in Vim as well");
|
||||
else if (orig_size != buf->b_orig_size
|
||||
|| buf_contents_changed(buf))
|
||||
mesg2 = _("See \":help W12\" for more info.");
|
||||
}
|
||||
else if (reason[1] == 'h')
|
||||
{
|
||||
mesg = _("W11: Warning: File \"%s\" has changed since editing started");
|
||||
else if (orig_mode != buf->b_orig_mode)
|
||||
mesg2 = _("See \":help W11\" for more info.");
|
||||
}
|
||||
else if (*reason == 'm')
|
||||
{
|
||||
mesg = _("W16: Warning: Mode of file \"%s\" has changed since editing started");
|
||||
mesg2 = _("See \":help W16\" for more info.");
|
||||
}
|
||||
/* Else: only timestamp changed, ignored */
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6038,9 +6068,7 @@ buf_check_timestamp(buf, focus)
|
||||
path = home_replace_save(buf, buf->b_fname);
|
||||
if (path != NULL)
|
||||
{
|
||||
if (helpmesg)
|
||||
mesg2 = _("See \":help W11\" for more info.");
|
||||
else
|
||||
if (!helpmesg)
|
||||
mesg2 = "";
|
||||
tbuf = alloc((unsigned)(STRLEN(path) + STRLEN(mesg)
|
||||
+ STRLEN(mesg2) + 2));
|
||||
|
@ -1483,10 +1483,14 @@ vgetc()
|
||||
#endif
|
||||
)
|
||||
{
|
||||
int save_allow_keys = allow_keys;
|
||||
|
||||
++no_mapping;
|
||||
allow_keys = 0; /* make sure BS is not found */
|
||||
c2 = vgetorpeek(TRUE); /* no mapping for these chars */
|
||||
c = vgetorpeek(TRUE);
|
||||
--no_mapping;
|
||||
allow_keys = save_allow_keys;
|
||||
if (c2 == KS_MODIFIER)
|
||||
{
|
||||
mod_mask = c;
|
||||
|
@ -896,6 +896,38 @@ keyval_to_string(unsigned int keyval, unsigned int state, char_u *string)
|
||||
}
|
||||
#endif /* HAVE_GTK2 */
|
||||
|
||||
static int
|
||||
modifiers_gdk2vim(guint state)
|
||||
{
|
||||
int modifiers = 0;
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
modifiers |= MOD_MASK_SHIFT;
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
modifiers |= MOD_MASK_CTRL;
|
||||
if (state & GDK_MOD1_MASK)
|
||||
modifiers |= MOD_MASK_ALT;
|
||||
if (state & GDK_MOD4_MASK)
|
||||
modifiers |= MOD_MASK_META;
|
||||
|
||||
return modifiers;
|
||||
}
|
||||
|
||||
static int
|
||||
modifiers_gdk2mouse(guint state)
|
||||
{
|
||||
int modifiers = 0;
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
modifiers |= MOUSE_SHIFT;
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
modifiers |= MOUSE_CTRL;
|
||||
if (state & GDK_MOD1_MASK)
|
||||
modifiers |= MOUSE_ALT;
|
||||
|
||||
return modifiers;
|
||||
}
|
||||
|
||||
/*
|
||||
* Main keyboard handler:
|
||||
*/
|
||||
@ -1112,13 +1144,7 @@ key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
modifiers = 0;
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
modifiers |= MOD_MASK_SHIFT;
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
modifiers |= MOD_MASK_CTRL;
|
||||
if (state & GDK_MOD1_MASK)
|
||||
modifiers |= MOD_MASK_ALT;
|
||||
modifiers = modifiers_gdk2vim(state);
|
||||
|
||||
/*
|
||||
* For some keys a shift modifier is translated into another key
|
||||
@ -1598,13 +1624,7 @@ process_motion_notify(int x, int y, GdkModifierType state)
|
||||
}
|
||||
|
||||
/* translate modifier coding between the main engine and GTK */
|
||||
vim_modifiers = 0x0;
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
vim_modifiers |= MOUSE_SHIFT;
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
vim_modifiers |= MOUSE_CTRL;
|
||||
if (state & GDK_MOD1_MASK)
|
||||
vim_modifiers |= MOUSE_ALT;
|
||||
vim_modifiers = modifiers_gdk2mouse(state);
|
||||
|
||||
/* inform the editor engine about the occurence of this event */
|
||||
gui_send_mouse_event(button, x, y, FALSE, vim_modifiers);
|
||||
@ -1796,13 +1816,7 @@ button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
|
||||
xim_reset();
|
||||
#endif
|
||||
|
||||
vim_modifiers = 0x0;
|
||||
if (event->state & GDK_SHIFT_MASK)
|
||||
vim_modifiers |= MOUSE_SHIFT;
|
||||
if (event->state & GDK_CONTROL_MASK)
|
||||
vim_modifiers |= MOUSE_CTRL;
|
||||
if (event->state & GDK_MOD1_MASK)
|
||||
vim_modifiers |= MOUSE_ALT;
|
||||
vim_modifiers = modifiers_gdk2mouse(event->state);
|
||||
|
||||
gui_send_mouse_event(button, x, y, repeated_click, vim_modifiers);
|
||||
if (gtk_main_level() > 0)
|
||||
@ -1821,7 +1835,7 @@ button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
|
||||
scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
|
||||
{
|
||||
int button;
|
||||
int_u vim_modifiers = 0;
|
||||
int_u vim_modifiers;
|
||||
|
||||
if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
|
||||
gtk_widget_grab_focus(widget);
|
||||
@ -1844,12 +1858,7 @@ scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
|
||||
xim_reset();
|
||||
# endif
|
||||
|
||||
if (event->state & GDK_SHIFT_MASK)
|
||||
vim_modifiers |= MOUSE_SHIFT;
|
||||
if (event->state & GDK_CONTROL_MASK)
|
||||
vim_modifiers |= MOUSE_CTRL;
|
||||
if (event->state & GDK_MOD1_MASK)
|
||||
vim_modifiers |= MOUSE_ALT;
|
||||
vim_modifiers = modifiers_gdk2mouse(event->state);
|
||||
|
||||
gui_send_mouse_event(button, (int)event->x, (int)event->y,
|
||||
FALSE, vim_modifiers);
|
||||
@ -1881,13 +1890,7 @@ button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
|
||||
x = event->x;
|
||||
y = event->y;
|
||||
|
||||
vim_modifiers = 0x0;
|
||||
if (event->state & GDK_SHIFT_MASK)
|
||||
vim_modifiers |= MOUSE_SHIFT;
|
||||
if (event->state & GDK_CONTROL_MASK)
|
||||
vim_modifiers |= MOUSE_CTRL;
|
||||
if (event->state & GDK_MOD1_MASK)
|
||||
vim_modifiers |= MOUSE_ALT;
|
||||
vim_modifiers = modifiers_gdk2mouse(event->state);
|
||||
|
||||
gui_send_mouse_event(MOUSE_RELEASE, x, y, FALSE, vim_modifiers);
|
||||
if (gtk_main_level() > 0)
|
||||
@ -2001,16 +2004,11 @@ drag_handle_uri_list(GdkDragContext *context,
|
||||
|
||||
if (fnames != NULL && nfiles > 0)
|
||||
{
|
||||
int_u modifiers = 0;
|
||||
int_u modifiers;
|
||||
|
||||
gtk_drag_finish(context, TRUE, FALSE, time_); /* accept */
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
modifiers |= MOUSE_SHIFT;
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
modifiers |= MOUSE_CTRL;
|
||||
if (state & GDK_MOD1_MASK)
|
||||
modifiers |= MOUSE_ALT;
|
||||
modifiers = modifiers_gdk2mouse(state);
|
||||
|
||||
gui_handle_drop(x, y, modifiers, fnames, nfiles);
|
||||
}
|
||||
@ -2061,12 +2059,7 @@ drag_handle_text(GdkDragContext *context,
|
||||
vim_free(tmpbuf);
|
||||
# endif
|
||||
|
||||
if (state & GDK_SHIFT_MASK)
|
||||
dropkey[2] |= MOD_MASK_SHIFT;
|
||||
if (state & GDK_CONTROL_MASK)
|
||||
dropkey[2] |= MOD_MASK_CTRL;
|
||||
if (state & GDK_MOD1_MASK)
|
||||
dropkey[2] |= MOD_MASK_ALT;
|
||||
dropkey[2] = modifiers_gdk2vim(state);
|
||||
|
||||
if (dropkey[2] != 0)
|
||||
add_to_input_buf(dropkey, (int)sizeof(dropkey));
|
||||
|
@ -1958,7 +1958,7 @@ gui_mch_draw_string(
|
||||
++clen;
|
||||
}
|
||||
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
|
||||
foptions, pcliprect, unicodebuf, clen, unicodepdy);
|
||||
foptions, pcliprect, unicodebuf, clen, unicodepdy);
|
||||
len = cells; /* used for underlining */
|
||||
}
|
||||
else if ((enc_codepage > 0 && (int)GetACP() != enc_codepage) || enc_latin9)
|
||||
@ -1975,8 +1975,26 @@ gui_mch_draw_string(
|
||||
(char *)text, len,
|
||||
(LPWSTR)unicodebuf, unibuflen);
|
||||
if (len != 0)
|
||||
{
|
||||
/* Use unicodepdy to make characters fit as we expect, even
|
||||
* when the font uses different widths (e.g., bold character
|
||||
* is wider). */
|
||||
if (unicodepdy != NULL)
|
||||
{
|
||||
int i;
|
||||
int cw;
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
cw = utf_char2cells(unicodebuf[i]);
|
||||
if (cw > 2)
|
||||
cw = 1;
|
||||
unicodepdy[i] = cw * gui.char_width;
|
||||
}
|
||||
}
|
||||
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
|
||||
foptions, pcliprect, unicodebuf, len, NULL);
|
||||
foptions, pcliprect, unicodebuf, len, unicodepdy);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -998,6 +998,8 @@ gui_x11_key_hit_cb(w, dud, event, dum)
|
||||
modifiers |= MOD_MASK_CTRL;
|
||||
if (ev_press->state & Mod1Mask)
|
||||
modifiers |= MOD_MASK_ALT;
|
||||
if (ev_press->state & Mod4Mask)
|
||||
modifiers |= MOD_MASK_META;
|
||||
|
||||
/*
|
||||
* For some keys a shift modifier is translated into another key
|
||||
|
15
src/keymap.h
15
src/keymap.h
@ -458,23 +458,24 @@ enum key_extra
|
||||
#define MOD_MASK_SHIFT 0x02
|
||||
#define MOD_MASK_CTRL 0x04
|
||||
#define MOD_MASK_ALT 0x08 /* aka META */
|
||||
#define MOD_MASK_2CLICK 0x10 /* use MOD_MASK_MULTI_CLICK */
|
||||
#define MOD_MASK_3CLICK 0x20 /* use MOD_MASK_MULTI_CLICK */
|
||||
#define MOD_MASK_4CLICK 0x30 /* use MOD_MASK_MULTI_CLICK */
|
||||
#define MOD_MASK_META 0x10 /* META when it's different from ALT */
|
||||
#define MOD_MASK_2CLICK 0x20 /* use MOD_MASK_MULTI_CLICK */
|
||||
#define MOD_MASK_3CLICK 0x40 /* use MOD_MASK_MULTI_CLICK */
|
||||
#define MOD_MASK_4CLICK 0x60 /* use MOD_MASK_MULTI_CLICK */
|
||||
#ifdef MACOS
|
||||
# define MOD_MASK_CMD 0x80
|
||||
# define MOD_MASK_CMD 0x80
|
||||
#endif
|
||||
|
||||
#define MOD_MASK_MULTI_CLICK (MOD_MASK_2CLICK|MOD_MASK_3CLICK|MOD_MASK_4CLICK)
|
||||
|
||||
/*
|
||||
* The length of the longest special key name, including modifiers.
|
||||
* Current longest is <M-C-S-4-MiddleRelease> (length includes '<' and '>').
|
||||
* Current longest is <M-C-S-T-4-MiddleRelease> (length includes '<' and '>').
|
||||
*/
|
||||
#define MAX_KEY_NAME_LEN 23
|
||||
#define MAX_KEY_NAME_LEN 25
|
||||
|
||||
/* Maximum length of a special key event as tokens. This includes modifiers.
|
||||
* The longest event is something like <M-C-S-4-LeftDrag> which would be the
|
||||
* The longest event is something like <M-C-S-T-4-LeftDrag> which would be the
|
||||
* following string of tokens:
|
||||
*
|
||||
* <K_SPECIAL> <KS_MODIFIER> bitmask <K_SPECIAL> <KS_EXTRA> <KT_LEFTDRAG>.
|
||||
|
@ -1644,6 +1644,7 @@ static struct modmasktable
|
||||
} mod_mask_table[] =
|
||||
{
|
||||
{MOD_MASK_ALT, MOD_MASK_ALT, (char_u)'M'},
|
||||
{MOD_MASK_META, MOD_MASK_META, (char_u)'T'},
|
||||
{MOD_MASK_CTRL, MOD_MASK_CTRL, (char_u)'C'},
|
||||
{MOD_MASK_SHIFT, MOD_MASK_SHIFT, (char_u)'S'},
|
||||
{MOD_MASK_MULTI_CLICK, MOD_MASK_2CLICK, (char_u)'2'},
|
||||
|
@ -2257,7 +2257,8 @@ do_mouse(oap, c, dir, count, fixindent)
|
||||
* multiple clicks and the middle mouse button.
|
||||
* Accept shift-leftmouse drags when 'mousemodel' is "popup.*".
|
||||
*/
|
||||
if ((mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL | MOD_MASK_ALT))
|
||||
if ((mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL | MOD_MASK_ALT
|
||||
| MOD_MASK_META))
|
||||
&& (!is_click
|
||||
|| (mod_mask & MOD_MASK_MULTI_CLICK)
|
||||
|| which_button == MOUSE_MIDDLE)
|
||||
|
@ -3149,11 +3149,13 @@ set_init_2()
|
||||
* with a dark background, that can handle color. Recognized are:
|
||||
* "linux" Linux console
|
||||
* "screen.linux" Linux console with screen
|
||||
* "cygwin" Cygwin shell
|
||||
*/
|
||||
idx = findoption((char_u *)"bg");
|
||||
if (!(options[idx].flags & P_WAS_SET)
|
||||
&& (STRCMP(T_NAME, "linux") == 0
|
||||
|| STRCMP(T_NAME, "screen.linux") == 0))
|
||||
|| STRCMP(T_NAME, "screen.linux") == 0
|
||||
|| STRCMP(T_NAME, "cygwin") == 0))
|
||||
{
|
||||
set_string_option_direct(NULL, idx, (char_u *)"dark", OPT_FREE);
|
||||
/* don't mark it as set, when starting the GUI it may be changed
|
||||
|
@ -292,7 +292,13 @@ mac_conv_init()
|
||||
|
||||
if (TECCreateConverter(&gUTF16ToUTF8Converter, utf16_encoding,
|
||||
utf8_canon_encoding) != noErr)
|
||||
gUTF16ToUTF8Converter = NULL;
|
||||
{
|
||||
/* On pre-10.3, Unicode normalization is not available so
|
||||
* fall back to non-normalizing converter */
|
||||
if (TECCreateConverter(&gUTF16ToUTF8Converter, utf16_encoding,
|
||||
utf8_encoding) != noErr)
|
||||
gUTF16ToUTF8Converter = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -385,6 +385,7 @@ mch_FullName(
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#ifdef FEAT_MBYTE
|
||||
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage
|
||||
# ifdef __BORLANDC__
|
||||
/* Wide functions of Borland C 5.5 do not work on Windows 98. */
|
||||
@ -415,7 +416,6 @@ mch_FullName(
|
||||
vim_free(wname);
|
||||
vim_free(cname);
|
||||
}
|
||||
#ifdef FEAT_MBYTE
|
||||
if (nResult == FAIL) /* fall back to non-wide function */
|
||||
#endif
|
||||
{
|
||||
@ -2487,8 +2487,13 @@ serverSendEnc(HWND target)
|
||||
COPYDATASTRUCT data;
|
||||
|
||||
data.dwData = COPYDATA_ENCODING;
|
||||
#ifdef FEAT_MBYTE
|
||||
data.cbData = STRLEN(p_enc) + 1;
|
||||
data.lpData = p_enc;
|
||||
#else
|
||||
data.cbData = STRLEN("latin1") + 1;
|
||||
data.lpData = "latin1";
|
||||
#endif
|
||||
(void)SendMessage(target, WM_COPYDATA, (WPARAM)message_window,
|
||||
(LPARAM)(&data));
|
||||
}
|
||||
|
3798
src/po/ja.po
3798
src/po/ja.po
File diff suppressed because it is too large
Load Diff
3798
src/po/ja.sjis.po
3798
src/po/ja.sjis.po
File diff suppressed because it is too large
Load Diff
@ -43,6 +43,7 @@ char_u *get_function_name __ARGS((expand_T *xp, int idx));
|
||||
char_u *get_expr_name __ARGS((expand_T *xp, int idx));
|
||||
void set_vim_var_nr __ARGS((int idx, long val));
|
||||
long get_vim_var_nr __ARGS((int idx));
|
||||
char_u *get_vim_var_str __ARGS((int idx));
|
||||
void set_vcount __ARGS((long count, long count1));
|
||||
void set_vim_var_string __ARGS((int idx, char_u *val, int len));
|
||||
void set_reg_var __ARGS((int c));
|
||||
|
@ -5,4 +5,5 @@ void do_tags __ARGS((exarg_T *eap));
|
||||
int find_tags __ARGS((char_u *pat, int *num_matches, char_u ***matchesp, int flags, int mincount, char_u *buf_ffname));
|
||||
void simplify_filename __ARGS((char_u *filename));
|
||||
int expand_tags __ARGS((int tagnames, char_u *pat, int *num_file, char_u ***file));
|
||||
int get_tags __ARGS((list_T *list, char_u *pat));
|
||||
/* vim: set ft=c : */
|
||||
|
28
src/regexp.c
28
src/regexp.c
@ -100,10 +100,10 @@
|
||||
*
|
||||
* +----------------------+
|
||||
* V |
|
||||
* <aa>\+ BRANCH <aa> --> BRANCH --> BACK BRANCH --> NOTHING --> END
|
||||
* | | ^ ^
|
||||
* | +----------+ |
|
||||
* +-------------------------------------------------+
|
||||
* <aa>\+ BRANCH <aa> --> BRANCH --> BACKP BRANCH --> NOTHING --> END
|
||||
* | | ^ ^
|
||||
* | +-----------+ |
|
||||
* +--------------------------------------------------+
|
||||
*
|
||||
*
|
||||
* +-------------------------+
|
||||
@ -229,6 +229,8 @@
|
||||
#define RE_COL 205 /* nr cmp Match column number */
|
||||
#define RE_VCOL 206 /* nr cmp Match virtual column number */
|
||||
|
||||
#define BACKP 207 /* Like BACK but for \+ */
|
||||
|
||||
/*
|
||||
* Magic characters have a special meaning, they don't match literally.
|
||||
* Magic characters are negative. This separates them from literal characters
|
||||
@ -281,6 +283,8 @@ toggle_Magic(x)
|
||||
* BACK Normal "next" pointers all implicitly point forward; BACK
|
||||
* exists to make loop structures possible.
|
||||
*
|
||||
* BACKP Like BACK, but used for \+. Doesn't check for an empty match.
|
||||
*
|
||||
* STAR,PLUS '=', and complex '*' and '+', are implemented as circular
|
||||
* BRANCH structures using BACK. Simple cases (one character
|
||||
* per match) are implemented with STAR and PLUS for speed
|
||||
@ -1448,7 +1452,7 @@ regpiece(flagp)
|
||||
/* Emit x+ as x(&|), where & means "self". */
|
||||
next = regnode(BRANCH); /* Either */
|
||||
regtail(ret, next);
|
||||
regtail(regnode(BACK), ret); /* loop back */
|
||||
regtail(regnode(BACKP), ret); /* loop back */
|
||||
regtail(next, regnode(BRANCH)); /* or */
|
||||
regtail(ret, regnode(NOTHING)); /* null. */
|
||||
}
|
||||
@ -2483,7 +2487,7 @@ regtail(p, val)
|
||||
scan = temp;
|
||||
}
|
||||
|
||||
if (OP(scan) == BACK)
|
||||
if (OP(scan) == BACK || OP(scan) == BACKP)
|
||||
offset = (int)(scan - val);
|
||||
else
|
||||
offset = (int)(val - scan);
|
||||
@ -4092,6 +4096,9 @@ regmatch(scan, startp)
|
||||
return FALSE;
|
||||
break;
|
||||
|
||||
case BACKP:
|
||||
break;
|
||||
|
||||
case MOPEN + 0: /* Match start: \zs */
|
||||
case MOPEN + 1: /* \( */
|
||||
case MOPEN + 2:
|
||||
@ -4356,6 +4363,10 @@ regmatch(scan, startp)
|
||||
{
|
||||
if (OP(next) != BRANCH) /* No choice. */
|
||||
next = OPERAND(scan); /* Avoid recursion. */
|
||||
else if (startp != NULL && OP(OPERAND(scan)) == BACKP
|
||||
&& reg_save_equal(startp))
|
||||
/* \+ with something empty before it */
|
||||
return FALSE;
|
||||
else
|
||||
{
|
||||
regsave_T save;
|
||||
@ -5134,7 +5145,7 @@ regnext(p)
|
||||
if (offset == 0)
|
||||
return NULL;
|
||||
|
||||
if (OP(p) == BACK)
|
||||
if (OP(p) == BACK || OP(p) == BACKP)
|
||||
return p - offset;
|
||||
else
|
||||
return p + offset;
|
||||
@ -5604,6 +5615,9 @@ regprop(op)
|
||||
case BACK:
|
||||
p = "BACK";
|
||||
break;
|
||||
case BACKP:
|
||||
p = "BACKP";
|
||||
break;
|
||||
case END:
|
||||
p = "END";
|
||||
break;
|
||||
|
125
src/tag.c
125
src/tag.c
@ -3536,3 +3536,128 @@ expand_tags(tagnames, pat, num_file, file)
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(FEAT_EVAL) || defined(PROTO)
|
||||
static int add_tag_field __ARGS((dict_T *dict, char *field_name, char_u *start, char_u *end));
|
||||
|
||||
/*
|
||||
* Add a tag field to the dictionary "dict"
|
||||
*/
|
||||
static int
|
||||
add_tag_field(dict, field_name, start, end)
|
||||
dict_T *dict;
|
||||
char *field_name;
|
||||
char_u *start;
|
||||
char_u *end;
|
||||
{
|
||||
char_u buf[MAXPATHL];
|
||||
int len;
|
||||
|
||||
len = end - start;
|
||||
if (len > sizeof(buf) - 1)
|
||||
len = sizeof(buf) - 1;
|
||||
STRNCPY(buf, start, len);
|
||||
buf[len] = NUL;
|
||||
return dict_add_nr_str(dict, field_name, 0L, buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the tags matching the specified pattern to the list "list"
|
||||
* as a dictionary
|
||||
*/
|
||||
int
|
||||
get_tags(list, pat)
|
||||
list_T *list;
|
||||
char_u *pat;
|
||||
{
|
||||
int num_matches, i, ret;
|
||||
char_u **matches, *p;
|
||||
dict_T *dict;
|
||||
tagptrs_T tp;
|
||||
long is_static;
|
||||
char_u buf[200];
|
||||
char_u *bp;
|
||||
|
||||
ret = find_tags(pat, &num_matches, &matches,
|
||||
TAG_REGEXP | TAG_NOIC, (int)MAXCOL, NULL);
|
||||
if (ret == OK && num_matches > 0)
|
||||
{
|
||||
for (i = 0; i < num_matches; ++i)
|
||||
{
|
||||
if ((dict = dict_alloc()) == NULL)
|
||||
ret = FAIL;
|
||||
if (list_append_dict(list, dict) == FAIL)
|
||||
ret = FAIL;
|
||||
|
||||
parse_match(matches[i], &tp);
|
||||
is_static = test_for_static(&tp);
|
||||
|
||||
if (add_tag_field(dict, "name", tp.tagname, tp.tagname_end) == FAIL
|
||||
|| add_tag_field(dict, "filename", tp.fname,
|
||||
tp.fname_end) == FAIL
|
||||
|| add_tag_field(dict, "cmd", tp.command,
|
||||
tp.command_end) == FAIL
|
||||
|| add_tag_field(dict, "kind", tp.tagkind,
|
||||
tp.tagkind_end) == FAIL
|
||||
|| dict_add_nr_str(dict, "static", is_static, NULL) == FAIL)
|
||||
ret = FAIL;
|
||||
|
||||
bp = buf;
|
||||
|
||||
if (tp.command_end != NULL)
|
||||
{
|
||||
for (p = tp.command_end + 3;
|
||||
*p != NUL && *p != '\n' && *p != '\r'; ++p)
|
||||
{
|
||||
if (p == tp.tagkind || (p + 5 == tp.tagkind
|
||||
&& STRNCMP(p, "kind:", 5) == 0))
|
||||
/* skip "kind:<kind>" and "<kind>" */
|
||||
p = tp.tagkind_end - 1;
|
||||
else if (STRNCMP(p, "file:", 5) == 0)
|
||||
/* skip "file:" (static tag) */
|
||||
p += 4;
|
||||
else if (STRNCMP(p, "struct:", 7) == 0
|
||||
|| STRNCMP(p, "enum:", 5) == 0
|
||||
|| STRNCMP(p, "class:", 6) == 0)
|
||||
{
|
||||
char_u *s, *n;
|
||||
|
||||
/* Field we recognize, add as a dict entry. */
|
||||
n = p;
|
||||
if (*n == 's')
|
||||
p += 7;
|
||||
else if (*n == 'e')
|
||||
p += 5;
|
||||
else
|
||||
p += 6;
|
||||
s = p;
|
||||
while (*p != NUL && *p != '\n' && *p != '\r')
|
||||
++p;
|
||||
if (add_tag_field(dict,
|
||||
*n == 's' ? "struct"
|
||||
: *n == 'e' ? "enum" : "class",
|
||||
s, p) == FAIL)
|
||||
ret = FAIL;
|
||||
--p;
|
||||
}
|
||||
else if ((bp - buf) < sizeof(buf) - 1
|
||||
&& (bp > buf || !vim_iswhite(*p)))
|
||||
/* Field not recognized, add to "extra" dict entry. */
|
||||
*bp++ = *p;
|
||||
}
|
||||
|
||||
if (bp > buf)
|
||||
{
|
||||
*bp = NUL;
|
||||
if (dict_add_nr_str(dict, "extra", 0L, buf) == FAIL)
|
||||
ret = FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
vim_free(matches[i]);
|
||||
}
|
||||
vim_free(matches);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
198
src/term.c
198
src/term.c
@ -931,10 +931,6 @@ struct builtin_term builtin_termcaps[] =
|
||||
# endif
|
||||
|
||||
# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS) || defined(SOME_BUILTIN_TCAPS) || defined(__EMX__)
|
||||
/*
|
||||
* The xterm termcap is missing F14 and F15, because they send the same
|
||||
* codes as the undo and help key, although they don't work on all keyboards.
|
||||
*/
|
||||
{(int)KS_NAME, "xterm"},
|
||||
{(int)KS_CE, IF_EB("\033[K", ESC_STR "[K")},
|
||||
{(int)KS_AL, IF_EB("\033[L", ESC_STR "[L")},
|
||||
@ -1013,65 +1009,75 @@ struct builtin_term builtin_termcaps[] =
|
||||
{K_XF2, IF_EB("\033OQ", ESC_STR "OQ")},
|
||||
{K_XF3, IF_EB("\033OR", ESC_STR "OR")},
|
||||
{K_XF4, IF_EB("\033OS", ESC_STR "OS")},
|
||||
{K_F1, IF_EB("\033[11~", ESC_STR "[11~")},
|
||||
{K_F2, IF_EB("\033[12~", ESC_STR "[12~")},
|
||||
{K_F3, IF_EB("\033[13~", ESC_STR "[13~")},
|
||||
{K_F4, IF_EB("\033[14~", ESC_STR "[14~")},
|
||||
{K_F5, IF_EB("\033[15~", ESC_STR "[15~")},
|
||||
{K_F6, IF_EB("\033[17~", ESC_STR "[17~")},
|
||||
{K_F7, IF_EB("\033[18~", ESC_STR "[18~")},
|
||||
{K_F8, IF_EB("\033[19~", ESC_STR "[19~")},
|
||||
{K_F9, IF_EB("\033[20~", ESC_STR "[20~")},
|
||||
{K_F10, IF_EB("\033[21~", ESC_STR "[21~")},
|
||||
{K_F11, IF_EB("\033[23~", ESC_STR "[23~")},
|
||||
{K_F12, IF_EB("\033[24~", ESC_STR "[24~")},
|
||||
{K_F1, IF_EB("\033[11;*~", ESC_STR "[11;*~")},
|
||||
{K_F2, IF_EB("\033[12;*~", ESC_STR "[12;*~")},
|
||||
{K_F3, IF_EB("\033[13;*~", ESC_STR "[13;*~")},
|
||||
{K_F4, IF_EB("\033[14;*~", ESC_STR "[14;*~")},
|
||||
{K_F5, IF_EB("\033[15;*~", ESC_STR "[15;*~")},
|
||||
{K_F6, IF_EB("\033[17;*~", ESC_STR "[17;*~")},
|
||||
{K_F7, IF_EB("\033[18;*~", ESC_STR "[18;*~")},
|
||||
{K_F8, IF_EB("\033[19;*~", ESC_STR "[19;*~")},
|
||||
{K_F9, IF_EB("\033[20;*~", ESC_STR "[20;*~")},
|
||||
{K_F10, IF_EB("\033[21;*~", ESC_STR "[21;*~")},
|
||||
{K_F11, IF_EB("\033[23;*~", ESC_STR "[23;*~")},
|
||||
{K_F12, IF_EB("\033[24;*~", ESC_STR "[24;*~")},
|
||||
{K_S_XF1, IF_EB("\033O2P", ESC_STR "O2P")},
|
||||
{K_S_XF2, IF_EB("\033O2Q", ESC_STR "O2Q")},
|
||||
{K_S_XF3, IF_EB("\033O2R", ESC_STR "O2R")},
|
||||
{K_S_XF4, IF_EB("\033O2S", ESC_STR "O2S")},
|
||||
{K_S_F1, IF_EB("\033[11;2~", ESC_STR "[11;2~")},
|
||||
{K_S_F2, IF_EB("\033[12;2~", ESC_STR "[12;2~")},
|
||||
{K_S_F3, IF_EB("\033[13;2~", ESC_STR "[13;2~")},
|
||||
{K_S_F4, IF_EB("\033[14;2~", ESC_STR "[14;2~")},
|
||||
{K_S_F5, IF_EB("\033[15;2~", ESC_STR "[15;2~")},
|
||||
{K_S_F6, IF_EB("\033[17;2~", ESC_STR "[17;2~")},
|
||||
{K_S_F7, IF_EB("\033[18;2~", ESC_STR "[18;2~")},
|
||||
{K_S_F8, IF_EB("\033[19;2~", ESC_STR "[19;2~")},
|
||||
{K_S_F9, IF_EB("\033[20;2~", ESC_STR "[20;2~")},
|
||||
{K_S_F10, IF_EB("\033[21;2~", ESC_STR "[21;2~")},
|
||||
{K_S_F11, IF_EB("\033[23;2~", ESC_STR "[23;2~")},
|
||||
{K_S_F12, IF_EB("\033[24;2~", ESC_STR "[24;2~")},
|
||||
{K_S_TAB, IF_EB("\033[Z", ESC_STR "[Z")},
|
||||
{K_HELP, IF_EB("\033[28~", ESC_STR "[28~")},
|
||||
{K_UNDO, IF_EB("\033[26~", ESC_STR "[26~")},
|
||||
{K_INS, IF_EB("\033[2~", ESC_STR "[2~")},
|
||||
{K_HOME, IF_EB("\033[7~", ESC_STR "[7~")},
|
||||
{K_HELP, IF_EB("\033[28;*~", ESC_STR "[28;*~")},
|
||||
{K_UNDO, IF_EB("\033[26;*~", ESC_STR "[26;*~")},
|
||||
{K_INS, IF_EB("\033[2;*~", ESC_STR "[2;*~")},
|
||||
{K_HOME, IF_EB("\033[1;*H", ESC_STR "[1;*H")},
|
||||
{K_S_HOME, IF_EB("\033O2H", ESC_STR "O2H")},
|
||||
{K_C_HOME, IF_EB("\033O5H", ESC_STR "O5H")},
|
||||
{K_KHOME, IF_EB("\033[1~", ESC_STR "[1~")},
|
||||
{K_KHOME, IF_EB("\033[7;*~", ESC_STR "[7;*~")},
|
||||
{K_XHOME, IF_EB("\033OH", ESC_STR "OH")}, /* alternate Home */
|
||||
{K_END, IF_EB("\033[8~", ESC_STR "[8~")},
|
||||
{K_END, IF_EB("\033[1;*F", ESC_STR "[1;*F")},
|
||||
{K_S_END, IF_EB("\033O2F", ESC_STR "O2F")},
|
||||
{K_C_END, IF_EB("\033O5F", ESC_STR "O5F")},
|
||||
{K_KEND, IF_EB("\033[4~", ESC_STR "[4~")},
|
||||
{K_KEND, IF_EB("\033[4;*~", ESC_STR "[4;*~")},
|
||||
{K_XEND, IF_EB("\033OF", ESC_STR "OF")}, /* alternate End */
|
||||
{K_PAGEUP, IF_EB("\033[5~", ESC_STR "[5~")},
|
||||
{K_PAGEDOWN, IF_EB("\033[6~", ESC_STR "[6~")},
|
||||
{K_PAGEUP, IF_EB("\033[5;*~", ESC_STR "[5;*~")},
|
||||
{K_PAGEDOWN, IF_EB("\033[6;*~", ESC_STR "[6;*~")},
|
||||
{K_KPLUS, IF_EB("\033Ok", ESC_STR "Ok")}, /* keypad plus */
|
||||
{K_KMINUS, IF_EB("\033Om", ESC_STR "Om")}, /* keypad minus */
|
||||
{K_KDIVIDE, IF_EB("\033Oo", ESC_STR "Oo")}, /* keypad / */
|
||||
{K_KMULTIPLY, IF_EB("\033Oj", ESC_STR "Oj")}, /* keypad * */
|
||||
{K_KENTER, IF_EB("\033OM", ESC_STR "OM")}, /* keypad Enter */
|
||||
{K_KDEL, IF_EB("\033[3~", ESC_STR "[3~")}, /* keypad Del */
|
||||
{K_KPOINT, IF_EB("\033On", ESC_STR "On")}, /* keypad . */
|
||||
{K_KDEL, IF_EB("\033[3;*~", ESC_STR "[3;*~")}, /* keypad Del */
|
||||
|
||||
{BT_EXTRA_KEYS, ""},
|
||||
{TERMCAP2KEY('k', '0'), IF_EB("\033[10~", ESC_STR "[10~")}, /* F0 */
|
||||
{TERMCAP2KEY('F', '3'), IF_EB("\033[25~", ESC_STR "[25~")}, /* F13 */
|
||||
{TERMCAP2KEY('F', '6'), IF_EB("\033[29~", ESC_STR "[29~")}, /* F16 */
|
||||
{TERMCAP2KEY('F', '7'), IF_EB("\033[31~", ESC_STR "[31~")}, /* F17 */
|
||||
{TERMCAP2KEY('F', '8'), IF_EB("\033[32~", ESC_STR "[32~")}, /* F18 */
|
||||
{TERMCAP2KEY('F', '9'), IF_EB("\033[33~", ESC_STR "[33~")}, /* F19 */
|
||||
{TERMCAP2KEY('F', 'A'), IF_EB("\033[34~", ESC_STR "[34~")}, /* F20 */
|
||||
{TERMCAP2KEY('k', '0'), IF_EB("\033[10;*~", ESC_STR "[10;*~")}, /* F0 */
|
||||
{TERMCAP2KEY('F', '3'), IF_EB("\033[25;*~", ESC_STR "[25;*~")}, /* F13 */
|
||||
/* F14 and F15 are missing, because they send the same codes as the undo
|
||||
* and help key, although they don't work on all keyboards. */
|
||||
{TERMCAP2KEY('F', '6'), IF_EB("\033[29;*~", ESC_STR "[29;*~")}, /* F16 */
|
||||
{TERMCAP2KEY('F', '7'), IF_EB("\033[31;*~", ESC_STR "[31;*~")}, /* F17 */
|
||||
{TERMCAP2KEY('F', '8'), IF_EB("\033[32;*~", ESC_STR "[32;*~")}, /* F18 */
|
||||
{TERMCAP2KEY('F', '9'), IF_EB("\033[33;*~", ESC_STR "[33;*~")}, /* F19 */
|
||||
{TERMCAP2KEY('F', 'A'), IF_EB("\033[34;*~", ESC_STR "[34;*~")}, /* F20 */
|
||||
|
||||
{TERMCAP2KEY('F', 'B'), IF_EB("\033[42;*~", ESC_STR "[42;*~")}, /* F21 */
|
||||
{TERMCAP2KEY('F', 'C'), IF_EB("\033[43;*~", ESC_STR "[43;*~")}, /* F22 */
|
||||
{TERMCAP2KEY('F', 'D'), IF_EB("\033[44;*~", ESC_STR "[44;*~")}, /* F23 */
|
||||
{TERMCAP2KEY('F', 'E'), IF_EB("\033[45;*~", ESC_STR "[45;*~")}, /* F24 */
|
||||
{TERMCAP2KEY('F', 'F'), IF_EB("\033[46;*~", ESC_STR "[46;*~")}, /* F25 */
|
||||
{TERMCAP2KEY('F', 'G'), IF_EB("\033[47;*~", ESC_STR "[47;*~")}, /* F26 */
|
||||
{TERMCAP2KEY('F', 'H'), IF_EB("\033[48;*~", ESC_STR "[48;*~")}, /* F27 */
|
||||
{TERMCAP2KEY('F', 'I'), IF_EB("\033[49;*~", ESC_STR "[49;*~")}, /* F28 */
|
||||
{TERMCAP2KEY('F', 'J'), IF_EB("\033[50;*~", ESC_STR "[50;*~")}, /* F29 */
|
||||
{TERMCAP2KEY('F', 'K'), IF_EB("\033[51;*~", ESC_STR "[51;*~")}, /* F30 */
|
||||
|
||||
{TERMCAP2KEY('F', 'L'), IF_EB("\033[52;*~", ESC_STR "[52;*~")}, /* F31 */
|
||||
{TERMCAP2KEY('F', 'M'), IF_EB("\033[53;*~", ESC_STR "[53;*~")}, /* F32 */
|
||||
{TERMCAP2KEY('F', 'N'), IF_EB("\033[54;*~", ESC_STR "[54;*~")}, /* F33 */
|
||||
{TERMCAP2KEY('F', 'O'), IF_EB("\033[55;*~", ESC_STR "[55;*~")}, /* F34 */
|
||||
{TERMCAP2KEY('F', 'P'), IF_EB("\033[56;*~", ESC_STR "[56;*~")}, /* F35 */
|
||||
{TERMCAP2KEY('F', 'Q'), IF_EB("\033[57;*~", ESC_STR "[57;*~")}, /* F36 */
|
||||
{TERMCAP2KEY('F', 'R'), IF_EB("\033[58;*~", ESC_STR "[58;*~")}, /* F37 */
|
||||
# endif
|
||||
|
||||
# if defined(UNIX) || defined(ALL_BUILTIN_TCAPS)
|
||||
@ -1564,6 +1570,10 @@ static char *(key_names[]) =
|
||||
"#2", "#4", "%i", "*7",
|
||||
"k1", "k2", "k3", "k4", "k5", "k6",
|
||||
"k7", "k8", "k9", "k;", "F1", "F2",
|
||||
"F3", "F4", "F5", "F6", "F7", "F8",
|
||||
"F9", "FA", "FB", "FC", "FD", "FE",
|
||||
"FF", "FG", "FH", "FI", "FJ", "FK",
|
||||
"FL", "FM", "FN", "FO", "FP", "FQ", "FR",
|
||||
"%1", "&8", "kb", "kI", "kD", "kh",
|
||||
"@7", "kP", "kN", "K1", "K3", "K4", "K5", "kB",
|
||||
NULL
|
||||
@ -2996,7 +3006,7 @@ win_new_shellsize()
|
||||
if (old_Rows != Rows)
|
||||
{
|
||||
/* if 'window' uses the whole screen, keep it using that */
|
||||
if (p_window == old_Rows - 1)
|
||||
if (p_window == old_Rows - 1 || old_Rows == 0)
|
||||
p_window = Rows - 1;
|
||||
old_Rows = Rows;
|
||||
shell_new_rows(); /* update window sizes */
|
||||
@ -3481,6 +3491,7 @@ struct termcode
|
||||
char_u name[2]; /* termcap name of entry */
|
||||
char_u *code; /* terminal code (in allocated memory) */
|
||||
int len; /* STRLEN(code) */
|
||||
int modlen; /* length of part before ";*~". */
|
||||
} *termcodes = NULL;
|
||||
|
||||
static int tc_max_len = 0; /* number of entries that termcodes[] can hold */
|
||||
@ -3518,6 +3529,7 @@ add_termcode(name, string, use_8bit)
|
||||
struct termcode *new_tc;
|
||||
int i, j;
|
||||
char_u *s;
|
||||
int len;
|
||||
|
||||
if (string == NULL || *string == NUL)
|
||||
{
|
||||
@ -3535,6 +3547,7 @@ add_termcode(name, string, use_8bit)
|
||||
mch_memmove(s, s + 1, STRLEN(s));
|
||||
s[0] = term_7to8bit(string);
|
||||
}
|
||||
len = (int)STRLEN(s);
|
||||
|
||||
need_gather = TRUE; /* need to fill termleader[] */
|
||||
|
||||
@ -3572,12 +3585,29 @@ add_termcode(name, string, use_8bit)
|
||||
continue;
|
||||
/*
|
||||
* Exact match: Replace old code.
|
||||
* But don't replace ESC[123;*X with another.
|
||||
*/
|
||||
if (termcodes[i].name[1] == name[1])
|
||||
{
|
||||
vim_free(termcodes[i].code);
|
||||
--tc_len;
|
||||
break;
|
||||
if (termcodes[i].len >= 4
|
||||
&& STRNCMP(termcodes[i].code + termcodes[i].len - 3,
|
||||
";*", 2) == 0)
|
||||
{
|
||||
/* if they are equal but for the ";*" don't add it */
|
||||
if (len == termcodes[i].len - 2
|
||||
&& STRNCMP(s, termcodes[i].code, len - 1) == 0
|
||||
&& s[len - 1] == termcodes[i].code[len + 1])
|
||||
{
|
||||
vim_free(s);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vim_free(termcodes[i].code);
|
||||
--tc_len;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
@ -3591,7 +3621,12 @@ add_termcode(name, string, use_8bit)
|
||||
termcodes[i].name[0] = name[0];
|
||||
termcodes[i].name[1] = name[1];
|
||||
termcodes[i].code = s;
|
||||
termcodes[i].len = (int)STRLEN(s);
|
||||
termcodes[i].len = len;
|
||||
/* recognize special code like "ESC[42;*X" that accepts modifiers */
|
||||
if (len >= 5 && STRNCMP(s + len - 3, ";*", 2) == 0)
|
||||
termcodes[i].modlen = len - 3;
|
||||
else
|
||||
termcodes[i].modlen = 0;
|
||||
++tc_len;
|
||||
}
|
||||
|
||||
@ -3886,6 +3921,69 @@ check_termcode(max_offset, buf, buflen)
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for code with modifier, like xterm uses:
|
||||
* ESC[123;2X (shift) ESC[123;3X (alt), etc.
|
||||
*/
|
||||
if (termcodes[idx].modlen > 0)
|
||||
{
|
||||
slen = termcodes[idx].modlen;
|
||||
if (cpo_koffset && offset && len < slen)
|
||||
continue;
|
||||
if (STRNCMP(termcodes[idx].code, tp,
|
||||
(size_t)(slen > len ? len : slen)) == 0)
|
||||
{
|
||||
int n;
|
||||
int mod;
|
||||
|
||||
if (len <= slen) /* got a partial sequence */
|
||||
return -1; /* need to get more chars */
|
||||
|
||||
if (tp[slen] == termcodes[idx].code[slen + 2])
|
||||
++slen; /* no modifiers */
|
||||
else if (tp[slen] != ';')
|
||||
continue; /* no match */
|
||||
else
|
||||
{
|
||||
/* Skip over the digits, the final char must
|
||||
* follow. */
|
||||
for (j = slen + 1; j < len && isdigit(tp[j]); ++j)
|
||||
;
|
||||
++j;
|
||||
if (len < j) /* got a partial sequence */
|
||||
return -1; /* need to get more chars */
|
||||
if (tp[j - 1] != termcodes[idx].code[slen + 2])
|
||||
continue;
|
||||
|
||||
/* Match! Convert modifier bits. */
|
||||
n = atoi((char *)tp + slen + 1) - 1;
|
||||
mod = 0x0;
|
||||
if (n & 1)
|
||||
mod |= MOD_MASK_SHIFT;
|
||||
if (n & 2)
|
||||
mod |= MOD_MASK_ALT;
|
||||
if (n & 4)
|
||||
mod |= MOD_MASK_CTRL;
|
||||
if (n & 8)
|
||||
mod |= MOD_MASK_META;
|
||||
|
||||
/* Add the modifier codes to our string */
|
||||
if (mod != 0)
|
||||
{
|
||||
string[new_slen++] = K_SPECIAL;
|
||||
string[new_slen++] = (int)KS_MODIFIER;
|
||||
string[new_slen++] = mod;
|
||||
}
|
||||
|
||||
slen = j;
|
||||
}
|
||||
key_name[0] = termcodes[idx].name[0];
|
||||
key_name[1] = termcodes[idx].name[1];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
@ -17,3 +17,6 @@ test text test text [\x00]
|
||||
test text test text [\x00-\x10]
|
||||
test text test text [\x-z]
|
||||
test text test text [\u-z]
|
||||
xx xx a
|
||||
xx aaaaa xx a
|
||||
xx aaaaa xx a
|
||||
|
@ -492,6 +492,8 @@ u_doit(count)
|
||||
|
||||
u_newcount = 0;
|
||||
u_oldcount = 0;
|
||||
if (curbuf->b_ml.ml_flags & ML_EMPTY)
|
||||
u_oldcount = -1;
|
||||
while (count--)
|
||||
{
|
||||
if (undo_undoes)
|
||||
@ -525,6 +527,8 @@ u_doit(count)
|
||||
curbuf->b_u_curhead = curbuf->b_u_curhead->uh_prev;
|
||||
}
|
||||
}
|
||||
if (curbuf->b_ml.ml_flags & ML_EMPTY)
|
||||
--u_newcount;
|
||||
u_undo_end();
|
||||
}
|
||||
|
||||
|
@ -36,5 +36,5 @@
|
||||
#define VIM_VERSION_NODOT "vim70aa"
|
||||
#define VIM_VERSION_SHORT "7.0aa"
|
||||
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Feb 28)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Feb 28, compiled "
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 4)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 4, compiled "
|
||||
|
@ -1534,7 +1534,9 @@ int vim_memcmp __ARGS((void *, void *, size_t));
|
||||
#define VV_VAL 34
|
||||
#define VV_KEY 35
|
||||
#define VV_PROFILING 36
|
||||
#define VV_LEN 37 /* number of v: vars */
|
||||
#define VV_FCS_REASON 37
|
||||
#define VV_FCS_CHOICE 38
|
||||
#define VV_LEN 39 /* number of v: vars */
|
||||
|
||||
#ifdef FEAT_CLIPBOARD
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user