Merge branch 'vim'

Conflicts:
	src/auto/configure
This commit is contained in:
Bjorn Winckler
2013-11-23 10:23:21 +01:00
106 changed files with 7999 additions and 13891 deletions
+51
View File
@@ -2775,3 +2775,54 @@ c21b2f52f1dd003d860e3b574602ed3fdc2b4f1c v7-4-047
eb33cadafcabfc9cb3fc0741e169e84cafec11f8 v7-4-050
e7a2f217a385e6aebfddc4d29182924ac017d262 v7-4-051
b9c1c1f4cda9b82a2e703feec441d865b4722d56 v7-4-052
733193bf24c3a80883c60964922c7cdc83662eb2 v7-4-053
7b760cda2bbf086ba975fd5a4bdc6190a0f08caf v7-4-054
38a755adc58063894c6695d702cc37f4910bad14 v7-4-055
8d83c219fc7b2ec8685ab9e0dd7d3067b7f9d1e9 v7-4-056
3109053ce4e3d17ca6ecab06c0ea0f38581d2f41 v7-4-057
fa8447ec582378ca8d2c0245bd4ac195876abf2b v7-4-058
2a72805a3038285c35f47dc0327a57cdabbdf09d v7-4-059
46ca8fcee5257cc036ac928d91b2a490cf47a956 v7-4-060
739074bdceb85d16b9e70791d91a59c2b846ed8d v7-4-061
d59a0b8e5584c6e093990abb1b1e640aff7620bd v7-4-062
9cedb4dfd4c830783ac65128dbbb118da2e3c638 v7-4-063
d062239654688774d38e60ac42cec8ae1fd0f14b v7-4-064
7f341db39d5bee0a9259a14a65e19bc9efa65417 v7-4-065
38b948f534e4646bf879cb4d30151474e093d139 v7-4-066
86bf09a1b6d0275131caf7ffc51598608e7242de v7-4-067
efa40be729c2c94c1d8d0bf95000c4a7d2976dbc v7-4-068
878ed73c70706d68bc7175343e4deb24b11963c2 v7-4-069
e6f3f66028d448bb49ee2336cee60b13ced7cea9 v7-4-070
faf7e86203b5d5c98bdd30dd92524e5062b2412a v7-4-071
d563839a9be0be6e85d93e366b4f7ffe705d8e3b v7-4-072
d0595545e98a3b7b6fe1a96ab0106d8afd63c31e v7-4-073
9818311eeca0d76641879e95143f314e7295cc26 v7-4-074
829aa8c8449d85d0de3a29ac8ce647ec706efd02 v7-4-075
8f0c264db1e76a65499f0846d961907d7ecade9e v7-4-076
53bc55e58fefee7a83a7a56fc7f05e0a4d36dd47 v7-4-077
5c3064feddd7c9bfef18d8067172335f101122c5 v7-4-078
6ae816249627b34aee618b49c4169b7ca1f54ff3 v7-4-079
c5166fa1046462d73891f0b395d6619e7ce96c82 v7-4-080
42927712b3d997bdba9d8ff5a1199fe4652c5899 v7-4-081
9c777e2c702487bd0b5c48a22edc17c98b87e070 v7-4-082
6367a766027d3b60caff43c35d8d3597ad90f6c6 v7-4-083
a56f60cf683455bea96daf077458158041e4d6ba v7-4-084
70c3289803b3129f34ffc327b113dcf152222a56 v7-4-085
60a5b7b82016da631dd7acc6121913d02c5677f8 v7-4-086
9334c994be7bb5e16a1f9c6b67e1c4342a6a386c v7-4-087
853a76c7fdedefbc1dfdc2a4896d37a3806500e2 v7-4-088
6707c44cec61d76026d5dcdd6573fb41cb89d0bd v7-4-089
31217cc48e7d8c9aca703688d3d04d8edbc85bba v7-4-090
9502d1caf90bf56f0125c99b7d17ba70944ebd85 v7-4-091
1b4cb2c6b285265da4ffbe242af35a73e1b118e6 v7-4-092
33f3e277ceab43179c74093f68196bd370199dbc v7-4-093
68b5f8abca93dd035ba180aa673a5bbf035b89db v7-4-094
acbe5414cb7f302f548bc1cbdc1ddb029dbf9094 v7-4-095
645358801356c7b1c53a1d3b1543781a669a7733 v7-4-096
93c8296281dd64e513d52db9f745965926df5cab v7-4-097
79a8bac614c0c565617b404764f28675687ad442 v7-4-098
8451f643a13eaf22e35a45e6bdd47c8d5b24c222 v7-4-099
5ad60cd88339c6217fbea8cf4f92dae04ac1c71d v7-4-100
ec5d11403c1952b2ed192f28afb6261d0867bb20 v7-4-101
9417f4de27a2a6acfa6b1660ac6ef2b5692e4554 v7-4-102
4db151014f93b7512919e452e6b3f4184758db7b v7-4-103
+3 -3
View File
@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.4. Last change: 2013 Aug 25
*change.txt* For Vim version 7.4. Last change: 2013 Nov 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -475,8 +475,8 @@ If the 'shiftround' option is on, the indent is rounded to a multiple of
'shiftwidth'.
If the 'smartindent' option is on, or 'cindent' is on and 'cinkeys' contains
'#', shift right does not affect lines starting with '#' (these are supposed
to be C preprocessor lines that must stay in column 1).
'#' with a zero value, shift right does not affect lines starting with '#'
(these are supposed to be C preprocessor lines that must stay in column 1).
When the 'expandtab' option is off (this is the default) Vim uses <Tab>s as
much as possible to make the indent. You can use ">><<" to replace an indent
+4
View File
@@ -356,6 +356,10 @@ terminals)
List the recent five entries from all histories: >
:history all -5,
:keepp[atterns] {command} *:keepp* *:keeppatterns*
Execute {command}, without adding anything to the search
history
==============================================================================
2. Command-line completion *cmdline-completion*
+30 -3
View File
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.4. Last change: 2013 Aug 24
*eval.txt* For Vim version 7.4. Last change: 2013 Nov 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1455,6 +1455,13 @@ v:foldend Used for 'foldtext': last line of closed fold.
v:foldstart Used for 'foldtext': first line of closed fold.
Read-only in the |sandbox|. |fold-foldtext|
*v:hlsearch* *hlsearch-variable*
v:hlsearch Variable that determines whether search highlighting is on.
Makes sense only if 'hlsearch' is enabled which requires
|+extra_search|. Setting this variable to zero acts the like
|:nohlsearch| command, setting it to one acts like >
let &hlsearch = &hlsearch
<
*v:insertmode* *insertmode-variable*
v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand
events. Values:
@@ -1713,6 +1720,7 @@ bufnr( {expr}) Number Number of the buffer {expr}
bufwinnr( {expr}) Number window number of buffer {expr}
byte2line( {byte}) Number line number at byte count {byte}
byteidx( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
byteidxcomp( {expr}, {nr}) Number byte index of {nr}'th char in {expr}
call( {func}, {arglist} [, {dict}])
any call {func} with arguments {arglist}
ceil( {expr}) Float round {expr} up
@@ -2261,7 +2269,10 @@ byteidx({expr}, {nr}) *byteidx()*
{expr}. Use zero for the first character, it returns zero.
This function is only useful when there are multibyte
characters, otherwise the returned value is equal to {nr}.
Composing characters are counted as a separate character.
Composing characters are not counted separately, their byte
length is added to the preceding base character. See
|byteidxcomp()| below for counting composing characters
separately.
Example : >
echo matchstr(str, ".", byteidx(str, 3))
< will display the fourth character. Another way to do the
@@ -2270,7 +2281,20 @@ byteidx({expr}, {nr}) *byteidx()*
echo strpart(s, 0, byteidx(s, 1))
< If there are less than {nr} characters -1 is returned.
If there are exactly {nr} characters the length of the string
is returned.
in bytes is returned.
byteidxcomp({expr}, {nr}) *byteidxcomp()*
Like byteidx(), except that a composing character is counted
as a separate character. Example: >
let s = 'e' . nr2char(0x301)
echo byteidx(s, 1)
echo byteidxcomp(s, 1)
echo byteidxcomp(s, 2)
< The first and third echo result in 3 ('e' plus composing
character is 3 bytes), the second echo results in 1 ('e' is
one byte).
Only works different from byteidx() when 'encoding' is set to
a Unicode encoding.
call({func}, {arglist} [, {dict}]) *call()* *E699*
Call function {func} with the items in |List| {arglist} as
@@ -4211,6 +4235,9 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
"match"). It will be highlighted with {group}. Returns an
identification number (ID), which can be used to delete the
match using |matchdelete()|.
Matching is case sensitive and magic, unless case sensitivity
or magicness are explicitly overridden in {pattern}. The
'magic', 'smartcase' and 'ignorecase' options are not used.
The optional {priority} argument assigns a priority to the
match. A match with a high priority will have its
+8 -6
View File
@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.4. Last change: 2013 Aug 03
*indent.txt* For Vim version 7.4. Last change: 2013 Nov 05
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -545,10 +545,12 @@ The examples below assume a 'shiftwidth' of 4.
(default 70 lines).
*cino-#*
#N When N is non-zero recognize shell/Perl comments, starting with
'#'. Default N is zero: don't recognize '#' comments. Note
that lines starting with # will still be seen as preprocessor
lines.
#N When N is non-zero recognize shell/Perl comments starting with
'#', do not recognize preprocessor lines; allow right-shifting
lines that start with "#".
When N is zero (default): don't recognize '#' comments, do
recognize preprocessor lines; right-shifting lines that start
with "#" does not work.
The defaults, spelled out in full, are:
@@ -556,7 +558,7 @@ The defaults, spelled out in full, are:
c3,C0,/0,(2s,us,U0,w0,W0,k0,m0,j0,J0,)20,*70,#0
Vim puts a line in column 1 if:
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#0'.
- It starts with a label (a keyword followed by ':', other than "case" and
"default") and 'cinoptions' does not contain an 'L' entry with a positive
value.
+2 -1
View File
@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.4. Last change: 2013 Oct 01
*index.txt* For Vim version 7.4. Last change: 2013 Nov 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1275,6 +1275,7 @@ tag command action ~
|:keepalt| :keepa[lt] following command keeps the alternate file
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|:keepjumps| :keepj[umps] following command keeps jumplist and marks
|:keeppatterns| :keepp[atterns] following command keeps search pattern history
|:lNext| :lN[ext] go to previous entry in location list
|:lNfile| :lNf[ile] go to last entry in previous file
|:list| :l[ist] print lines
+8 -4
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.4. Last change: 2013 Aug 22
*options.txt* For Vim version 7.4. Last change: 2013 Nov 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6670,6 +6670,9 @@ A jump table for the options with a short description can be found at |Q_op|.
region by listing them: "en_us,en_ca" supports both US and Canadian
English, but not words specific for Australia, New Zealand or Great
Britain.
If the name "cjk" is included East Asian characters are excluded from
spell checking. This is useful when editing text that also has Asian
words.
*E757*
As a special case the name of a .spl file can be given as-is. The
first "_xx" in the name is removed and used as the region name
@@ -7721,7 +7724,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'undolevels'* *'ul'*
'undolevels' 'ul' number (default 100, 1000 for Unix, VMS,
Win32 and OS/2)
global
global or local to buffer |global-local|
{not in Vi}
Maximum number of changes that can be undone. Since undo information
is kept in memory, higher numbers will cause more memory to be used
@@ -7732,8 +7735,9 @@ A jump table for the options with a short description can be found at |Q_op|.
< But you can also get Vi compatibility by including the 'u' flag in
'cpoptions', and still be able to use CTRL-R to repeat undo.
Also see |undo-two-ways|.
Set to a negative number for no undo at all: >
set ul=-1
Set to -1 for no undo at all. You might want to do this only for the
current buffer: >
setlocal ul=-1
< This helps when you run out of memory for a single change.
Also see |clear-undo|.
+1 -1
View File
@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.4. Last change: 2013 Jul 06
*pattern.txt* For Vim version 7.4. Last change: 2013 Nov 09
VIM REFERENCE MANUAL by Bram Moolenaar
+8 -1
View File
@@ -1,4 +1,4 @@
*spell.txt* For Vim version 7.4. Last change: 2013 Jul 17
*spell.txt* For Vim version 7.4. Last change: 2013 Nov 12
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -269,6 +269,13 @@ In a table:
latin1 yi transliterated Yiddish
utf-8 yi-tr transliterated Yiddish
*spell-cjk*
Chinese, Japanese and other East Asian characters are normally marked as
errors, because spell checking of these characters is not supported. If
'spelllang' includes "cjk", these characters are not marked as errors. This
is useful when editing text with spell checking while some Asian words are
present.
SPELL FILES *spell-load*
+6
View File
@@ -2317,6 +2317,8 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:keepj motion.txt /*:keepj*
:keepjumps motion.txt /*:keepjumps*
:keepmarks motion.txt /*:keepmarks*
:keepp cmdline.txt /*:keepp*
:keeppatterns cmdline.txt /*:keeppatterns*
:l various.txt /*:l*
:lN quickfix.txt /*:lN*
:lNext quickfix.txt /*:lNext*
@@ -4952,6 +4954,7 @@ builtin_terms term.txt /*builtin_terms*
byte-count editing.txt /*byte-count*
byte2line() eval.txt /*byte2line()*
byteidx() eval.txt /*byteidx()*
byteidxcomp() eval.txt /*byteidxcomp()*
bzip2 pi_gzip.txt /*bzip2*
c change.txt /*c*
c.vim syntax.txt /*c.vim*
@@ -6416,6 +6419,7 @@ hl-WarningMsg syntax.txt /*hl-WarningMsg*
hl-WildMenu syntax.txt /*hl-WildMenu*
hlID() eval.txt /*hlID()*
hlexists() eval.txt /*hlexists()*
hlsearch-variable eval.txt /*hlsearch-variable*
holy-grail index.txt /*holy-grail*
home intro.txt /*home*
home-replace editing.txt /*home-replace*
@@ -7880,6 +7884,7 @@ spell-affix-flags spell.txt /*spell-affix-flags*
spell-affix-mbyte spell.txt /*spell-affix-mbyte*
spell-affix-not-supported spell.txt /*spell-affix-not-supported*
spell-affix-vim spell.txt /*spell-affix-vim*
spell-cjk spell.txt /*spell-cjk*
spell-compound spell.txt /*spell-compound*
spell-dic-format spell.txt /*spell-dic-format*
spell-double-scoring spell.txt /*spell-double-scoring*
@@ -8457,6 +8462,7 @@ v:folddashes eval.txt /*v:folddashes*
v:foldend eval.txt /*v:foldend*
v:foldlevel eval.txt /*v:foldlevel*
v:foldstart eval.txt /*v:foldstart*
v:hlsearch eval.txt /*v:hlsearch*
v:insertmode eval.txt /*v:insertmode*
v:key eval.txt /*v:key*
v:lang eval.txt /*v:lang*
+40 -46
View File
@@ -1,4 +1,4 @@
*todo.txt* For Vim version 7.4. Last change: 2013 Oct 05
*todo.txt* For Vim version 7.4. Last change: 2013 Nov 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,16 +34,21 @@ not be repeated below, unless there is extra information.
*known-bugs*
-------------------- Known bugs and current work -----------------------
Problem positioning the cursor after auto-formatting without a comment. (Tor
Perkins, 2013 Sep 1)
Patch From Lech Lorens doesn't quite work:
Problem: When using ":'<,'>del" errors may be given for the visual line
numbers being out of range.
Solution: Reset Visual mode in ":del". (Lech Lorens)
Files: src/ex_docmd.c
Using \1 in pattern goes one line too far. (Bohr Shaw, 2013 Sep 5)
Column is OK. "/\v(^.+\n)\1/e" (John Little, Sep 5)
Also, matches start of 2nd line, not the whole line.
Error for incomplete help argument. (John Beckett, 2013 Sep 12)
NFA regexp doesn't handle backreference correctly. (Ryuichi Hayashida, 2013
Oct 10)
Popup menu: first item is not selected when typing more than one character?
Error for incomplete help argument. (John Beckett, 2013 Sep 12)
Should win_redr_custom() not be allowed to use recursively?
(Yasuhiro Matsumoto, 2013 Aug 15)
@@ -63,22 +68,18 @@ ftplugins.
Python: ":py raw_input('prompt')" doesn't work. (Manu Hack)
Patch to avoid problem with colon in file name. (Yasuhiro Matsumoto, 2013 Sep
5) Only copy file name when needed: Sep 9.
Patch to support slices in Python vim.List. (ZyX, 2013 Oct 20)
Patch to make #N in 'cino' stop not indenting #lines. (Christian Brabandt,
2013 Sep 25)
Patch to support iterator on Python vim.options. (ZyX, 2013 Nov 2)
Patch to make Dictionary.update() work without arguments.
(ZyX, 2013 Oct 19)
Patch for Cobol ftplugin. (ZyX, 2013 Oct 20)
Await response from maintainer.
Include systemverilog file? Two votes yes.
Wrapping around end of file does not work for "." after "cgn". (Dimitar
Dimitrov)
Patch by Christian Brabandt, 2013 Aug 22
Clang error for integer overflow. (Dominique Pelle, 2013 Sep 21)
Patch to add v:hlsearch. (ZyX, 2013 Sep 22)
Problem with 'spellsuggest' file, only works for some words.
(Cesar Romani, 2013 Aug 20) Depends on file name? (Aug 24)
Additional remark by glts: the suggested words are marked bad?
@@ -87,27 +88,26 @@ Syntax highlighting slow (hangs) in SASS file. (Niek Bosch, 2013 Aug 21)
Adding "~" to 'cdpath' doesn't work for completion? (Davido, 2013 Aug 19)
Issue 174: Detect Mason files.
Patch to make has() check for Vim version and patch at the same time.
(Marc Weber, 2013 Jun 7)
Patch to fix Visual-block insert using cursor keys. (Christian Brabandt, 2013
Sep 28) With test Sept 29.
VMS: Select() doesn't work properly, typing ESC may hang Vim. Use sys$qiow
instead. (Samuel Ferencik, 2013 Sep 28)
Series of patches for NL vs NUL handling. (ZyX, 2013 Nov 3, Nov 9)
Perl: support for Activestate perl 5.18: Issue 170.
Several syntax file match "^\s*" which may get underlined if that's in the
highlight group. Add a "\zs" after it?
Win32: When a directory name contains an exclamation mark, completion doesn't
complete the contents of the directory. No escaping for the "!"? (Jan
Stocker, 2012 Jan 5; 2013 Aug 20)
Patch 2013 Sept 10, test: Sept 11.
Go through more coverity reports.
Bug: Does not skip over expression with dict member properly. (ZyX, 2013 Sep
29)
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
Patch to make ColorScheme autocommand match with the colorscheme name instead
of the buffer name. (Christian Brabandt, 2013 Sep 25)
@@ -119,10 +119,17 @@ With "$" in 'cpoptions' the popup menu isn't fully drawn. (Matti Niemenmaa,
"gUgn" cannot be repeated, while "dgn" can. (Dimitar Dimitrov)
Patch by Christian Brabandt (2013 Aug 12)
Also notes by Christian Wellenbrock, Nov 13.
Several Win32 functions are not using Unicode.
Patches to fix this. (Ken Takata, 2013 Aug 9)
Patch to add item in 'listchars' to repeat first character. (Nathaniel Braun,
pragm, 2013 Oct 13)
Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct
3. Doesn't work properly according to Yukihiro Nakadaira.
/[b-a] gives error E16, should probably be E769.
:help gives example for z?, but it does not work. m? and t? do work.
@@ -188,7 +195,7 @@ carried over when using :global. (Christian Brabandt, 2013 Jun 19)
Bug with 'cursorline' in diff mode. Line being scrolled into view gets
highlighted as the cursor line. (Alessandro Ivaldi, 2013 Jun 4)
Two highlighting bugs. (Zyx, 2013 Aug 18)
Two highlighting bugs. (ZyX, 2013 Aug 18)
Patch to add the bufferlist() function. (Yegappan Lakshmanan, 2013 May 5)
May 17: with winlist() and tabpagelist().
@@ -210,10 +217,6 @@ Second one. Update May 22.
Patch to make fold updates much faster. (Christian Brabandt, 2012 Dec)
TCL: With MSVC 2010 doesn't find Tcl_FindExecutable. (tux)
Patch to define it. (Ken Takata, 2013 Aug 12) Is this right?
Probably not: http://code.google.com/p/vim/issues/detail?id=167
MS-Windows: Patch to make tests copy files to avoid changing the fileformat of
the files under version control. (Taro Muraoka, 2013 Jul 5)
@@ -345,10 +348,6 @@ But use "gi" instead of "a". Or use CTRL-\ CTRL-O.
Patch to support user name completion on MS-Windows. (Yasuhiro Matsumoto, 2012
Aug 16)
Have an option for spell checking to not mark any Chinese, Japanese or other
double-width characters as error. Or perhaps all characters above 256.
(Bill Sun) Helps a lot for mixed Asian and latin text.
When there are no command line arguments ":next" and ":argu" give E163, which
is confusing. Should say "the argument list is empty".
@@ -729,10 +728,6 @@ Requires a map mode for Insert mode started from blockwise Visual mode.
Writing nested List and Dict in viminfo gives error message and can't be read
back. (Yukihiro Nakadaira, 2010 Nov 13)
Can 'undolevels' be a buffer-local option? Helps for making big changes in
one file only, set 'ul' to -1 only for that buffer.
Patch by Christian Brabandt, 2010 Dec 17. Needs test.
Problem with cursor in the wrong column. (SungHyun Nam, 2010 Mar 11)
Additional info by Dominique Pelle. (also on 2010 Apr 10)
@@ -957,7 +952,7 @@ Session file generates error upon loading, cause by --remote-silent-tab.
Using ~ works OK on 'a' with composing char, but not on 0x0418 with composing
char 0x0301. (Tony Mechelynck, 2009 Mar 4)
A function on a dictionary is not profiled. (Zyx, 2010 Dec 25)
A function on a dictionary is not profiled. (ZyX, 2010 Dec 25)
Inconsistent: starting with $LANG set to es_ES.utf-8 gives Spanish
messages, even though locale is not supported. But ":lang messages
@@ -1027,7 +1022,7 @@ probably causes this.
2009 Jan 16)
Patch to support strikethrough next to bold and italic. (Christian Brabandt,
2013 Jul 30)
2013 Jul 30) Update from Ken Takata, 2013 Oct 12.
Document that default font in Athena can be set with resources:
XtDefaultFont: "9x15"
@@ -1403,6 +1398,8 @@ Check for this and use iconv? (Edward L. Fox, 2007 Sep 12)
Does the conversion in the other direction work when 'fileencodings' is set
properly?
Add a few features to xxd. (Vadim Vygonets, 2013 Nov 11)
Cursor displayed in the wrong position when using 'numberwidth'. (James Vega,
2007 Jun 21)
@@ -2830,10 +2827,6 @@ Tab pages:
Spell checking:
- have some way not to give spelling errors for a range of characters.
E.g. for Chinese and other languages with specific characters for which we
don't have a spell file. Useful when there is also text in other
languages in the file.
- Support more regions? Caolan McNamara argues it's needed for es_XX.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219777
- Unicode defines another quote character: 0x2019. Use it as an equivalent
@@ -4947,6 +4940,7 @@ Various improvements:
6 Add ":timer" command, to set a command to be executed at a certain
interval, or once after some time has elapsed. (Aaron)
Perhaps an autocommand event like CursorHold is better?
Patch to add async functionality. (Geoff Greer, 2013 Sep 1 and later)
8 Add ":confirm" handling in open_exfile(), for when file already exists.
8 When quitting with changed files, make the dialog list the changed file
and allow "write all", "discard all", "write some". The last one would
+6 -2
View File
@@ -1,4 +1,4 @@
*visual.txt* For Vim version 7.4. Last change: 2012 Aug 15
*visual.txt* For Vim version 7.4. Last change: 2013 Nov 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -75,7 +75,11 @@ position.
*V* *linewise-visual*
[count]V Start Visual mode linewise.
With [count] select that many lines.
With [count] select the same number of lines as used
for the last Visual operation, but at the current
cursor position, multiplied by [count]. When there
was no previous Visual operation [count] lines are
selected.
*CTRL-V* *blockwise-visual*
[count]CTRL-V Start Visual mode blockwise. Note: Under Windows
+8 -4
View File
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2013 Sep 22
" Last Change: 2013 Nov 13
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1172,6 +1172,9 @@ au BufNewFile,BufRead *.mp setf mp
" MGL
au BufNewFile,BufRead *.mgl setf mgl
" MIX - Knuth assembly
au BufNewFile,BufRead *.mix,*.mixal setf mix
" MMIX or VMS makefile
au BufNewFile,BufRead *.mms call s:FTmms()
@@ -2061,14 +2064,15 @@ au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
" SVG (Scalable Vector Graphics)
au BufNewFile,BufRead *.svg setf svg
" If the file has an extension of 't' and is in a directory 't' then it is
" almost certainly a Perl test file.
" If the file has an extension of 't' and is in a directory 't' or 'xt' then
" it is almost certainly a Perl test file.
" If the first line starts with '#' and contains 'perl' it's probably a Perl
" file.
" (Slow test) If a file contains a 'use' statement then it is almost certainly
" a Perl file.
func! s:FTperl()
if expand("%:e") == 't' && expand("%:p:h:t") == 't'
let dirname = expand("%:p:h:t")
if expand("%:e") == 't' && (dirname == 't' || dirname == 'xt')
setf perl
return 1
endif
+4 -3
View File
@@ -1,7 +1,7 @@
" Vim filetype plugin
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" Last Change: 2013-09-21
" Last Change: 2013-10-06
if exists("b:did_ftplugin")
finish
@@ -11,7 +11,8 @@ let b:did_ftplugin = 1
setlocal iskeyword=48-57,65-90,_,97-122
setlocal comments=:NB.
setlocal commentstring=NB.\ %s
setlocal formatoptions-=t formatoptions+=croql
setlocal formatoptions-=t
setlocal shiftwidth=2 softtabstop=2 expandtab
setlocal matchpairs=(:)
let b:undo_ftplugin = "setl et< sts< sw< fo< cms< com< isk<"
let b:undo_ftplugin = "setl mps< et< sts< sw< fo< cms< com< isk<"
+1 -4
View File
@@ -4,7 +4,7 @@
" URL: http://sites.google.com/site/khorser/opensource/vim
" Original author: Dorai Sitaram <ds26@gte.com>
" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
" Last Change: Feb 12, 2013
" Last Change: Oct 23, 2013
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -21,9 +21,6 @@ setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
setl lisp
setl commentstring=;%s
" make comments behaviour like in c.vim
" e.g. insertion of ;;; and ;; on normal "O" or "o" when staying in comment
setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|#
setl formatoptions+=croql
let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<"
+1 -4
View File
@@ -4,7 +4,7 @@
" URL: http://sites.google.com/site/khorser/opensource/vim
" Original author: Dorai Sitaram <ds26@gte.com>
" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
" Last Change: Feb 12, 2013
" Last Change: Oct 23, 2013
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -22,10 +22,7 @@ setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
setl lisp
setl commentstring=;%s
" make comments behaviour like in c.vim
" e.g. insertion of ;;; and ;; on normal "O" or "o" when staying in comment
setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|#
setl formatoptions+=croql
" Scheme-specific settings
if exists("b:is_mzscheme") || exists("is_mzscheme")
+12 -11
View File
@@ -2,7 +2,7 @@
" Language: Clean
" Author: Pieter van Engelen <pietere@sci.kun.nl>
" Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl>
" Last Change: 2013 Jun 19 by Jurriën Stutterheim
" Last Change: 2013 Oct 15 by Jurriën Stutterheim
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -31,11 +31,10 @@ syn keyword cleanIncludeKeyword contained from import as qualified
" To do some Denotation Highlighting
syn keyword cleanBoolDenot True False
syn region cleanStringDenot start=+"+ end=+"+
syn match cleanCharDenot "'.'"
syn match cleanCharsDenot "'[^'\\]*\(\\.[^'\\]\)*'" contained
syn match cleanIntegerDenot "[+-~]\=\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>"
syn match cleanRealDenot "[+-~]\=\<\d\+\.\d+\(E[+-~]\=\d+\)\="
syn region cleanStringDenot start=+"+ skip=+\(\(\\\\\)\+\|\\"\)+ end=+"+ display
syn match cleanCharDenot "'\(\\\\\|\\'\|[^'\\]\)\+'" display
syn match cleanIntegerDenot "[\~+-]\?\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>" display
syn match cleanRealDenot "[\~+-]\?\d\+\.\d\+\(E[\~+-]\?\d\+\)\?" display
" To highlight the use of lists, tuples and arrays
syn region cleanList start="\[" end="\]" contains=ALL
@@ -44,11 +43,13 @@ syn region cleanArray start="{:" end=":}" contains=ALL
syn match cleanTuple "([^=]*,[^=]*)" contains=ALL
" To do some Comment Highlighting
syn region cleanComment start="/\*" end="\*/" contains=cleanComment
syn match cleanComment "//.*"
syn region cleanComment start="/\*" end="\*/" contains=cleanComment,cleanTodo fold
syn region cleanComment start="//.*" end="$" display contains=cleanTodo
syn keyword cleanTodo TODO FIXME XXX contained
" Now for some useful type definition recognition
syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)\s*\(infix[lr]\=\)\=\s*\d\=\s*::.*->.*" contains=cleanSpecial,cleanBasicType,cleanSpecialType,cleanKeyword
" Now for some useful typedefinitionrecognition
syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)[ \t]*\(infix[lr]\=\)\=[ \t]*\d\=[ \t]*::.*->.*" contains=cleanSpecial
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
@@ -64,7 +65,6 @@ if version >= 508 || !exists("did_clean_syntax_init")
" Comments
HiLink cleanComment Comment
" Constants and denotations
HiLink cleanCharsDenot String
HiLink cleanStringDenot String
HiLink cleanCharDenot Character
HiLink cleanIntegerDenot Number
@@ -91,6 +91,7 @@ if version >= 508 || !exists("did_clean_syntax_init")
HiLink cleanTuple Special
" Error
" Todo
HiLink cleanTodo Todo
delcommand HiLink
endif
+2 -2
View File
@@ -2,7 +2,7 @@
" Language: Diff (context or unified)
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Translations by Jakson Alves de Aquino.
" Last Change: 2013 Jul 24
" Last Change: 2013 Oct 06
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -336,7 +336,7 @@ syn match diffLine "^---$"
"Some versions of diff have lines like "#c#" and "#d#" (where # is a number)
syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*"
syn match diffFile "^diff.*"
syn match diffFile "^diff\>.*"
syn match diffFile "^+++ .*"
syn match diffFile "^Index: .*"
syn match diffFile "^==== .*"
+22 -18
View File
@@ -1,26 +1,19 @@
" Vim syntax file
" Maintainer: Thilo Six
" Contact: <vim-dev at vim dot org>
" http://www.vim.org/maillist.php#vim-dev
"
" Contact: vim-foo@xk2c-foo.de
" :3s+-foo++g
" Description: highlight dnsmasq configuration files
" File: runtime/syntax/dnsmasq.vim
" Version: 2.61-1
" Last Change: 2012 May 19
" Version: 2.67
" Last Change: 2013 Nov 03
" Modeline: vim: ts=8:sw=2:sts=2:
"
" Credits: Igor N. Prischepoff
" Doug Kearns
" David Ne\v{c}as
" Christian Brabandt
"
" License: VIM License
" Vim is Charityware, see ":help Uganda"
"
" Options: You might want to add this to your vimrc:
"
" if &background == "dark"
" " dnsmasq.vim
" let dnsmasq_backrgound_light = 0
" else
" let dnsmasq_backrgound_light = 1
@@ -28,8 +21,7 @@
"
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
if v:version < 600
syntax clear
elseif exists("b:current_syntax") || &compatible
finish
@@ -39,11 +31,11 @@ let s:cpo_save = &cpo
set cpo&vim
if !exists("b:dnsmasq_backrgound_light")
if exists("dnsmasq_backrgound_light")
let b:dnsmasq_backrgound_light = dnsmasq_backrgound_light
else
let b:dnsmasq_backrgound_light = 0
endif
if exists("dnsmasq_backrgound_light")
let b:dnsmasq_backrgound_light = dnsmasq_backrgound_light
else
let b:dnsmasq_backrgound_light = 0
endif
endif
@@ -89,10 +81,13 @@ syn match DnsmasqKeywordSpecial ",\<ignore\>"hs=s+1 contains=DnsmasqSpecial
syn match DnsmasqKeywordSpecial "\<id\>:"me=e-1
syn match DnsmasqKeyword "^\s*add-mac\>"
syn match DnsmasqKeyword "^\s*add-subnet\>"
syn match DnsmasqKeyword "^\s*addn-hosts\>"
syn match DnsmasqKeyword "^\s*address\>"
syn match DnsmasqKeyword "^\s*alias\>"
syn match DnsmasqKeyword "^\s*all-servers\>"
syn match DnsmasqKeyword "^\s*auth-zone\>"
syn match DnsmasqKeyword "^\s*bind-dynamic\>"
syn match DnsmasqKeyword "^\s*bind-interfaces\>"
syn match DnsmasqKeyword "^\s*bogus-nxdomain\>"
syn match DnsmasqKeyword "^\s*bogus-priv\>"
@@ -128,6 +123,7 @@ syn match DnsmasqKeyword "^\s*dhcp-option-force\>"
syn match DnsmasqKeyword "^\s*dhcp-optsfile\>"
syn match DnsmasqKeyword "^\s*dhcp-proxy\>"
syn match DnsmasqKeyword "^\s*dhcp-range\>"
syn match DnsmasqKeyword "^\s*dhcp-relay\>"
syn match DnsmasqKeyword "^\s*dhcp-remoteid\>"
syn match DnsmasqKeyword "^\s*dhcp-script\>"
syn match DnsmasqKeyword "^\s*dhcp-scriptuser\>"
@@ -135,6 +131,7 @@ syn match DnsmasqKeyword "^\s*dhcp-sequential-ip\>"
syn match DnsmasqKeyword "^\s*dhcp-subscrid\>"
syn match DnsmasqKeyword "^\s*dhcp-userclass\>"
syn match DnsmasqKeyword "^\s*dhcp-vendorclass\>"
syn match DnsmasqKeyword "^\s*dns-rr\>"
syn match DnsmasqKeyword "^\s*dns-forward-max\>"
syn match DnsmasqKeyword "^\s*domain\>"
syn match DnsmasqKeyword "^\s*domain-needed\>"
@@ -149,6 +146,7 @@ syn match DnsmasqKeyword "^\s*group\>"
syn match DnsmasqKeyword "^\s*host-record\>"
syn match DnsmasqKeyword "^\s*interface\>"
syn match DnsmasqKeyword "^\s*interface-name\>"
syn match DnsmasqKeyword "^\s*ipset\>"
syn match DnsmasqKeyword "^\s*keep-in-foreground\>"
syn match DnsmasqKeyword "^\s*leasefile-ro\>"
syn match DnsmasqKeyword "^\s*listen-address\>"
@@ -161,6 +159,7 @@ syn match DnsmasqKeyword "^\s*log-dhcp\>"
syn match DnsmasqKeyword "^\s*log-facility\>"
syn match DnsmasqKeyword "^\s*log-queries\>"
syn match DnsmasqKeyword "^\s*max-ttl\>"
syn match DnsmasqKeyword "^\s*max-cache-ttl\>"
syn match DnsmasqKeyword "^\s*min-port\>"
syn match DnsmasqKeyword "^\s*mx-host\>"
syn match DnsmasqKeyword "^\s*mx-target\>"
@@ -180,6 +179,10 @@ syn match DnsmasqKeyword "^\s*ptr-record\>"
syn match DnsmasqKeyword "^\s*pxe-prompt\>"
syn match DnsmasqKeyword "^\s*pxe-service\>"
syn match DnsmasqKeyword "^\s*query-port\>"
syn match DnsmasqKeyword "^\s*quiet-ra\>"
syn match DnsmasqKeyword "^\s*quiet-dhcp\>"
syn match DnsmasqKeyword "^\s*quiet-dhcp6\>"
syn match DnsmasqKeyword "^\s*ra-param\>"
syn match DnsmasqKeyword "^\s*read-ethers\>"
syn match DnsmasqKeyword "^\s*rebind-domain-ok\>"
syn match DnsmasqKeyword "^\s*rebind-localhost-ok\>"
@@ -189,6 +192,7 @@ syn match DnsmasqKeyword "^\s*server\>"
syn match DnsmasqKeyword "^\s*srv-host\>"
syn match DnsmasqKeyword "^\s*stop-dns-rebind\>"
syn match DnsmasqKeyword "^\s*strict-order\>"
syn match DnsmasqKeyword "^\s*synth-domain\>"
syn match DnsmasqKeyword "^\s*tag-if\>"
syn match DnsmasqKeyword "^\s*test\>"
syn match DnsmasqKeyword "^\s*tftp-max\>"
+4 -2
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: dts/dtsi (device tree files)
" Maintainer: Daniel Mack <vim@zonque.org>
" Last Change: 2013 Apr 05
" Last Change: 2013 Oct 20
if exists("b:current_syntax")
finish
@@ -11,11 +11,12 @@ syntax region dtsComment start="/\*" end="\*/"
syntax match dtsReference "&[[:alpha:][:digit:]_]\+"
syntax region dtsBinaryProperty start="\[" end="\]"
syntax match dtsStringProperty "\".*\""
syntax match dtsKeyword "/.*/"
syntax match dtsKeyword "/.\{-1,\}/"
syntax match dtsLabel "^[[:space:]]*[[:alpha:][:digit:]_]\+:"
syntax match dtsNode /[[:alpha:][:digit:]-_]\+\(@[0-9a-fA-F]\+\|\)[[:space:]]*{/he=e-1
syntax region dtsCellProperty start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment
syntax region dtsCommentInner start="/\*" end="\*/"
syntax match dtsCommentLine "//.*$"
hi def link dtsCellProperty Number
hi def link dtsBinaryProperty Number
@@ -26,3 +27,4 @@ hi def link dtsNode Structure
hi def link dtsReference Macro
hi def link dtsComment Comment
hi def link dtsCommentInner Comment
hi def link dtsCommentLine Comment
+4 -2
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: J
" Maintainer: David Bürgin <676c7473@gmail.com>
" Last Change: 2013-09-21
" Last Change: 2013-10-06
if exists("b:current_syntax")
finish
@@ -33,11 +33,13 @@ syn match jNumber /\<_\=\d\+\%([eE]\d\+\)\=b_\=[0-9a-z]\+/
syn match jNumber /\<__\=\>/
syn match jNumber /\<_\=\d\+x\>/
syn match jComment /NB\..*$/
syn match jComment /NB\..*$/ contains=jTodo,@Spell
syn keyword jTodo TODO FIXME XXX contained
hi def link jControl Statement
hi def link jString String
hi def link jNumber Number
hi def link jComment Comment
hi def link jTodo Todo
let b:current_syntax = "j"
+62 -42
View File
@@ -2,14 +2,11 @@
" Language: Microsoft Macro Assembler (80x86)
" Orig Author: Rob Brady <robb@datatone.com>
" Maintainer: Wu Yongwei <wuyongwei@gmail.com>
" Last Change: $Date: 2012/02/04 12:45:39 $
" $Revision: 1.46 $
" Last Change: $Date: 2013/11/13 11:49:24 $
" $Revision: 1.48 $
" 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")
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
@@ -194,6 +191,10 @@ syn keyword masmRegister R8D R9D R10D R11D R12D R13D R14D R15D
syn keyword masmRegister R8W R9W R10W R11W R12W R13W R14W R15W
syn keyword masmRegister R8B R9B R10B R11B R12B R13B R14B R15B
" SSE/AVX registers
syn match masmRegister "\(X\|Y\)MM[0-9]\>"
syn match masmRegister "\(X\|Y\)MM1[0-5]\>"
" Instruction prefixes
syn keyword masmOpcode LOCK REP REPE REPNE REPNZ REPZ
@@ -302,50 +303,69 @@ syn keyword masmOpcode FISTTP LDDQU ADDSUBPS ADDSUBPD
syn keyword masmOpcode HADDPS HSUBPS HADDPD HSUBPD
syn keyword masmOpcode MOVSHDUP MOVSLDUP MOVDDUP MONITOR MWAIT
" SSSE3 opcodes (Core and later)
syn keyword masmOpcode PSIGNB PSIGNW PSIGND PABSB PABSW PABSD
syn keyword masmOpcode PALIGNR PSHUFB PMULHRSW PMADDUBSW
syn keyword masmOpcode PHSUBW PHSUBD PHSUBSW PHADDW PHADDD PHADDSW
" SSE 4.1 opcodes (Penryn and later)
syn keyword masmOpcode MPSADBW PHMINPOSUW PMULDQ PMULLD DPPS DPPD
syn keyword masmOpcode BLENDPS BLENDPD BLENDVPS BLENDVPD
syn keyword masmOpcode PBLENDVB PBLENDW
syn keyword masmOpcode PMINSB PMAXSB PMINSD PMAXSD
syn keyword masmOpcode PMINUW PMAXUW PMINUD PMAXUD
syn keyword masmOpcode ROUNDPS ROUNDSS ROUNDPD ROUNDSD
syn keyword masmOpcode INSERTPS PINSRB PINSRD PINSRQ
syn keyword masmOpcode EXTRACTPS PEXTRB PEXTRD PEXTRQ
syn keyword masmOpcode PMOVSXBW PMOVZXBW PMOVSXBD PMOVZXBD
syn keyword masmOpcode PMOVSXBQ PMOVZXBQ PMOVSXWD PMOVZXWD
syn keyword masmOpcode PMOVSXWQ PMOVZXWQ PMOVSXDQ PMOVZXDQ
syn keyword masmOpcode PTEST PCMPEQQ PACKUSDW MOVNTDQA
" SSE 4.2 opcodes (Nehalem and later)
syn keyword masmOpcode PCMPESTRI PCMPESTRM PCMPISTRI PCMPISTRM PCMPGTQ
syn keyword masmOpcode CRC32 POPCNT LZCNT
" AES-NI (Westmere (2010) and later)
syn keyword masmOpcode AESENC AESENCLAST AESDEC AESDECLAST
syn keyword masmOpcode AESKEYGENASSIST AESIMC PCLMULQDQ
" AVX (Sandy Bridge (2011) and later)
syn keyword masmOpcode VBROADCASTSS VBROADCASTSD VBROADCASTF128
syn keyword masmOpcode VINSERTF128 VEXTRACTF128 VMASKMOVPS VMASKMOVPD
syn keyword masmOpcode VPERMILPS VPERMILPD VPERM2F128
syn keyword masmOpcode VZEROALL VZEROUPPER
" Other opcodes in Pentium and later processors
syn keyword masmOpcode CMPXCHG8B CPUID UD2
syn keyword masmOpcode RSM RDMSR WRMSR RDPMC RDTSC SYSENTER SYSEXIT
syn match masmOpcode "CMOV\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>"
" 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_masm_syntax_inits")
if version < 508
let did_masm_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default highlighting
hi def link masmLabel PreProc
hi def link masmComment Comment
hi def link masmDirective Statement
hi def link masmType Type
hi def link masmOperator Type
hi def link masmOption Special
hi def link masmRegister Special
hi def link masmString String
hi def link masmText String
hi def link masmTitle Title
hi def link masmOpcode Statement
hi def link masmOpFloat Statement
" The default methods for highlighting. Can be overridden later
HiLink masmLabel PreProc
HiLink masmComment Comment
HiLink masmDirective Statement
HiLink masmType Type
HiLink masmOperator Type
HiLink masmOption Special
HiLink masmRegister Special
HiLink masmString String
HiLink masmText String
HiLink masmTitle Title
HiLink masmOpcode Statement
HiLink masmOpFloat Statement
hi def link masmHexadecimal Number
hi def link masmDecimal Number
hi def link masmOctal Number
hi def link masmBinary Number
hi def link masmFloatRaw Number
hi def link masmFloat Number
HiLink masmHexadecimal Number
HiLink masmDecimal Number
HiLink masmOctal Number
HiLink masmBinary Number
HiLink masmFloatRaw Number
HiLink masmFloat Number
hi def link masmIdentifier Identifier
HiLink masmIdentifier Identifier
syntax sync minlines=50
delcommand HiLink
endif
syntax sync minlines=50
let b:current_syntax = "masm"
+83
View File
@@ -0,0 +1,83 @@
" Vim syntax file
" Language: MIX (Donald Knuth's assembly language used in TAOCP)
" Maintainer: Wu Yongwei <wuyongwei@gmail.com>
" Filenames: *.mixal *.mix
" Last Change: 2013 Nov 13
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn case ignore
" Special processing of ALF directive: implementations vary whether quotation
" marks are needed
syn match mixAlfParam #\s\{1,2\}"\?[^"]\{,5\}"\?# contains=mixAlfDirective,mixString nextgroup=mixEndComment contained
" Region for parameters
syn match mixParam #[-+*/:=0-9a-z,()"]\+# contains=mixIdentifier,mixSpecial,mixNumber,mixString,mixLabel nextgroup=mixEndComment contained
" Comment at the line end
syn match mixEndComment ".*" contains=mixRegister contained
" Identifier; must go before literals
syn match mixIdentifier "[a-z0-9_]\+" contained
" Literals
syn match mixSpecial "[-+*/:=]" contained
syn match mixNumber "[0-9]\+\>" contained
syn region mixString start=+"+ skip=+\\"+ end=+"+ contained
" Labels
syn match mixLabel "^[a-z0-9_]\{,10\}\s\+" nextgroup=mixAlfSpecial,mixOpcode,mixDirective
syn match mixLabel "[0-9][BF]" contained
" Comments
syn match mixComment "^\*.*" contains=mixRegister
" Directives
syn keyword mixDirective ORIG EQU CON END nextgroup=mixParam contained skipwhite
syn keyword mixDirective ALF nextgroup=mixAlfParam contained
" Opcodes
syn keyword mixOpcode NOP HLT NUM CHAR FLOT FIX nextgroup=mixEndComment contained
syn keyword mixOpcode FADD FSUB FMUL FDIV FCMP MOVE ADD SUB MUL DIV IOC IN OUT JRED JBUS JMP JSJ JOV JNOV JL JE JG JLE JNE JGE SLA SRA SLAX SRAX SLC SRC nextgroup=mixParam contained skipwhite
syn match mixOpcode "LD[AX1-6]N\?\>" nextgroup=mixParam contained skipwhite
syn match mixOpcode "ST[AX1-6JZ]\>" nextgroup=mixParam contained skipwhite
syn match mixOpcode "EN[TN][AX1-6]\>" nextgroup=mixParam contained skipwhite
syn match mixOpcode "INC[AX1-6]\>" nextgroup=mixParam contained skipwhite
syn match mixOpcode "DEC[AX1-6]\>" nextgroup=mixParam contained skipwhite
syn match mixOpcode "CMP[AX1-6]\>" nextgroup=mixParam contained skipwhite
syn match mixOpcode "J[AX1-6]N\?[NZP]\>" nextgroup=mixParam contained skipwhite
" Switch back to being case sensitive
syn case match
" Registers (only to used in comments now)
syn keyword mixRegister rA rX rI1 rI2 rI3 rI4 rI5 rI6 rJ contained
" The default highlighting
hi def link mixRegister Special
hi def link mixLabel Define
hi def link mixComment Comment
hi def link mixEndComment Comment
hi def link mixDirective Keyword
hi def link mixOpcode Keyword
hi def link mixSpecial Special
hi def link mixNumber Number
hi def link mixString String
hi def link mixAlfParam String
hi def link mixIdentifier Identifier
let b:current_syntax = "mix"
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: ts=8
+23 -11
View File
@@ -2,15 +2,18 @@
" Language: Subversion (svn) commit file
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
" URL: https://github.com/hdima/vim-scripts/blob/master/syntax/svn.vim
" Last Change: 2012-07-21
" Last Change: 2013-11-08
" Filenames: svn-commit*.tmp
" Version: 1.9
" Version: 1.10
" Contributors:
" Stefano Zacchiroli
"
" List of the contributors in alphabetical order:
"
" A. S. Budden
" Myk Taylor
" Ingo Karkat
" Myk Taylor
" Stefano Zacchiroli
" For version 5.x: Clear all syntax items.
" For version 6.x: Quit when a syntax file was already loaded.
@@ -20,14 +23,19 @@ elseif exists("b:current_syntax")
finish
endif
syn region svnText start="\%^" end="^--.*--$"me=s-1 contains=@Spell
syn spell toplevel
syn region svnRegion start="^--.*--$" end="\%$" contains=ALL
syn match svnRemoved "^D .*$" contained
syn match svnRenamed "^R[ M][ U][ +] .*$" contained
syn match svnAdded "^A[ M][ U][ +] .*$" contained
syn match svnModified "^M[ M][ U] .*$" contained
syn match svnProperty "^_M[ U] .*$" contained
syn match svnFirstLine "\%^.*" nextgroup=svnRegion,svnBlank skipnl
syn match svnSummary "^.\{0,50\}" contained containedin=svnFirstLine nextgroup=svnOverflow contains=@Spell
syn match svnOverflow ".*" contained contains=@Spell
syn match svnBlank "^.*" contained contains=@Spell
syn region svnRegion end="\%$" matchgroup=svnDelimiter start="^--.*--$" contains=svnRemoved,svnRenamed,svnAdded,svnModified,svnProperty,@NoSpell
syn match svnRemoved "^D .*$" contained contains=@NoSpell
syn match svnRenamed "^R[ M][ U][ +] .*$" contained contains=@NoSpell
syn match svnAdded "^A[ M][ U][ +] .*$" contained contains=@NoSpell
syn match svnModified "^M[ M][ U] .*$" contained contains=@NoSpell
syn match svnProperty "^_M[ U] .*$" contained contains=@NoSpell
" Synchronization.
syn sync clear
@@ -44,7 +52,11 @@ if version >= 508 || !exists("did_svn_syn_inits")
command -nargs=+ HiLink hi def link <args>
endif
HiLink svnSummary Keyword
HiLink svnBlank Error
HiLink svnRegion Comment
HiLink svnDelimiter NonText
HiLink svnRemoved Constant
HiLink svnAdded Identifier
HiLink svnModified Special
+4 -3
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Innovation Data Processing upstream.log file
" Maintainer: Rob Owens <rowens@fdrinnovation.com>
" Latest Revision: 2013-07-26
" Latest Revision: 2013-09-19
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -31,13 +31,14 @@ syn match upstreamlog_Profile / Profile: \zs\S\{1,8}/
syn match upstreamlog_Profile / Profile: \zs\S\{1,8}\ze, /
syn match upstreamlog_Profile /, profile: \zs\S\{1,8}\ze,/
syn match upstreamlog_Profile /found Profile: \zs\S\{1,8}\ze,/
syn match upstreamlog_Profile /Backup Profile: \zs\ze Version date/
syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/
syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/
syn match upstreamlog_Profile /Full of \zs\S\{1,8}\ze$/
syn match upstreamlog_Profile /Incr. of \zs\S\{1,8}\ze$/
syn match upstreamlog_Profile /Profile=\zs\S\{1,8}\ze,/
" Target:
syn region upstreamlog_Target start="Computer: \zs" end="\ze[\]\)]"
syn region upstreamlog_Target start="Computer name \zs" end="\ze,"
syn region upstreamlog_Target start="Computer name \zs\"" end="\"\ze"
syn region upstreamlog_Target start="request to registered name \zs" end=" "
+4 -3
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Innovation Data Processing usserver.log file
" Maintainer: Rob Owens <rowens@fdrinnovation.com>
" Latest Revision: 2013-07-26
" Latest Revision: 2013-09-19
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -36,13 +36,14 @@ syn match usserverlog_Profile /, profile: \zs\S\{1,8}\ze,/
syn match usserverlog_Profile /Expecting Profile: \zs\S\{1,8}\ze,/
syn match usserverlog_Profile /found Profile: \zs\S\{1,8}\ze,/
syn match usserverlog_Profile /Profile \zs\S\{1,8} \zeis a member of group: /
syn match usserverlog_Profile /Backup Profile: \zs\ze Version date/
syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/
syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/
syn match usserverlog_Profile /Full of \zs\S\{1,8}\ze$/
syn match usserverlog_Profile /Incr. of \zs\S\{1,8}\ze$/
syn match usserverlog_Profile /Profile=\zs\S\{1,8}\ze,/
" Target:
syn region usserverlog_Target start="Computer: \zs" end="\ze[\]\)]"
syn region usserverlog_Target start="Computer name \zs" end="\ze,"
syn region usserverlog_Target start="Computer name \zs\"" end="\"\ze"
syn region usserverlog_Target start="Registration add request successful \zs" end="$"
syn region usserverlog_Target start="request to registered name \zs" end=" "
syn region usserverlog_Target start=", sending to \zs" end="$"
+4 -3
View File
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Innovation Data Processing USW2KAgt.log file
" Maintainer: Rob Owens <rowens@fdrinnovation.com>
" Latest Revision: 2013-07-26
" Latest Revision: 2013-09-19
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -26,13 +26,14 @@ syn match usw2kagtlog_IPaddr / \d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/
syn match usw2kagtlog_Profile /Profile name \zs\"\S\{1,8}\"/
syn match usw2kagtlog_Profile / Profile: \zs\S\{1,8}/
syn match usw2kagtlog_Profile / Profile: \zs\S\{1,8}\ze, /
syn match usw2kagtlog_Profile /Backup Profile: \zs\ze Version date/
syn match upstreamlog_Profile /Backup Profile: \zs\S\{1,8}\ze Version date/
syn match upstreamlog_Profile /Backup profile: \zs\S\{1,8}\ze Version date/
syn match usw2kagtlog_Profile /Full of \zs\S\{1,8}\ze$/
syn match usw2kagtlog_Profile /Incr. of \zs\S\{1,8}\ze$/
syn match usw2kagtlog_Profile /profile name "\zs\S\{1,8}\ze"/
" Target:
syn region usw2kagtlog_Target start="Computer: \zs" end="\ze[\]\)]"
syn region usw2kagtlog_Target start="Computer name \zs" end="\ze,"
syn region usw2kagtlog_Target start="Computer name \zs\"" end="\"\ze"
" Agent Keywords:
syn keyword usw2kagtlog_Agentword opened closed
+1 -1
View File
@@ -638,7 +638,7 @@ NOTA: Tutti i comandi : devono essere terminati premendo <INVIO>
NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto
sarà una copia esatta di "tutor.it" al momento del salvataggio.
5. Ora cancella il file battendo (MR-DOS): :!del TEST
5. Ora cancella il file battendo (MS-DOS): :!del TEST
o (Unix): :!rm TEST
+1 -1
View File
@@ -638,7 +638,7 @@ NOTA: Tutti i comandi : devono essere terminati premendo <INVIO>
NOTA: Se esci da Vim e riesegui Vim battendo vim TEST , il file aperto
sarà una copia esatta di "tutor.it" al momento del salvataggio.
5. Ora cancella il file battendo (MR-DOS): :!del TEST
5. Ora cancella il file battendo (MS-DOS): :!del TEST
o (Unix): :!rm TEST
+802 -790
View File
File diff suppressed because it is too large Load Diff
+7 -4
View File
@@ -424,6 +424,9 @@ MSVCVER = 11.0
!if "$(_NMAKE_VER)" == "11.00.60610.1"
MSVCVER = 11.0
!endif
!if "$(_NMAKE_VER)" == "12.00.21005.1"
MSVCVER = 12.0
!endif
!endif
# Abort building VIM if version of VC is unrecognised.
@@ -438,7 +441,7 @@ MSVCVER = 11.0
!endif
# Convert processor ID to MVC-compatible number
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0")
!if ("$(MSVCVER)" != "8.0") && ("$(MSVCVER)" != "9.0") && ("$(MSVCVER)" != "10.0") && ("$(MSVCVER)" != "11.0") && ("$(MSVCVER)" != "12.0")
!if "$(CPUNR)" == "i386"
CPUARG = /G3
!elseif "$(CPUNR)" == "i486"
@@ -472,7 +475,7 @@ OPTFLAG = /O2
OPTFLAG = /Ox
!endif
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")
# Use link time code generation if not worried about size
!if "$(OPTIMIZE)" != "SPACE"
OPTFLAG = $(OPTFLAG) /GL
@@ -485,7 +488,7 @@ CFLAGS=$(CFLAGS) $(WP64CHECK)
!endif
# Static code analysis generally available starting with VS2012
!if ("$(ANALYZE)" == "yes") && ("$(MSVCVER)" == "11.0")
!if ("$(ANALYZE)" == "yes") && (("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0"))
CFLAGS=$(CFLAGS) /analyze
!endif
@@ -943,7 +946,7 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(LIBC) $(OLE_LIB) user32.lib $(SNIFF_LIB) \
# Report link time code generation progress if used.
!ifdef NODEBUG
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0")
!if ("$(MSVCVER)" == "8.0") || ("$(MSVCVER)" == "9.0") || ("$(MSVCVER)" == "10.0") || ("$(MSVCVER)" == "11.0") || ("$(MSVCVER)" == "12.0")
!if "$(OPTIMIZE)" != "SPACE"
LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
!endif
+2 -1
View File
@@ -1898,7 +1898,8 @@ test1 test2 test3 test4 test5 test6 test7 test8 test9 \
test60 test61 test62 test63 test64 test65 test66 test67 test68 test69 \
test70 test71 test72 test73 test74 test75 test76 test77 test78 test79 \
test80 test81 test82 test83 test84 test85 test86 test87 test88 test89 \
test90 test91 test92 test93 test94 test95 test96 test97 test98 test99:
test90 test91 test92 test93 test94 test95 test96 test97 test98 test99 \
test100 test101 test102 test103 test104 test105 test106 test107:
cd testdir; rm $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET)
testclean:
+5309 -12236
View File
File diff suppressed because it is too large Load Diff
+8 -1
View File
@@ -211,7 +211,12 @@ open_buffer(read_stdin, eap, flags)
/* if first time loading this buffer, init b_chartab[] */
if (curbuf->b_flags & BF_NEVERLOADED)
{
(void)buf_init_chartab(curbuf, FALSE);
#ifdef FEAT_CINDENT
parse_cino(curbuf);
#endif
}
/*
* Set/reset the Changed flag first, autocmds may change the buffer.
@@ -1948,6 +1953,7 @@ free_buf_options(buf, free_p_ff)
clear_string_option(&buf->b_p_qe);
#endif
buf->b_p_ar = -1;
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
}
/*
@@ -4072,7 +4078,8 @@ build_stl_str_hl(wp, out, outlen, fmt, use_sandbox, fillchar,
item[curitem].minwid = -syn_namen2id(t, (int)(s - t));
curitem++;
}
++s;
if (*s != NUL)
++s;
continue;
}
+3
View File
@@ -442,3 +442,6 @@
/* Define if you want Cygwin to use the WIN32 clipboard, not compatible with X11*/
#undef FEAT_CYGWIN_WIN32_CLIPBOARD
/* Define if we have AvailabilityMacros.h on Mac OS X */
#undef HAVE_AVAILABILITYMACROS_H
+18 -8
View File
@@ -217,7 +217,8 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
OS_EXTRA_SRC="os_macosx.m os_mac_conv.c";
OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o"
dnl TODO: use -arch i386 on Intel machines
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
dnl Removed -no-cpp-precomp, only for very old compilers.
CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX"
dnl If Carbon or Cocoa is found, assume we don't want
dnl X11 unless it was specifically asked for (--with-x)
@@ -242,6 +243,10 @@ else
AC_MSG_RESULT(no)
fi
dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
dnl so we need to include it to have access to version macros.
AC_CHECK_HEADERS(AvailabilityMacros.h)
AC_SUBST(OS_EXTRA_SRC)
AC_SUBST(OS_EXTRA_OBJ)
@@ -272,8 +277,8 @@ if test "$cross_compiling" = no; then
])
if test "$GCC" = yes -a "$local_dir" != no; then
echo 'void f(){}' > conftest.c
dnl -no-cpp-precomp is needed for OS X 10.2 (Ben Fowler)
have_local_include=`${CC-cc} -no-cpp-precomp -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
dnl Removed -no-cpp-precomp, only needed for OS X 10.2 (Ben Fowler)
have_local_include=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/include"`
have_local_lib=`${CC-cc} -c -v conftest.c 2>&1 | grep "${local_dir}/lib"`
rm -f conftest.c conftest.o
fi
@@ -505,7 +510,7 @@ if test "$enable_luainterp" = "yes" -o "$enable_luainterp" = "dynamic"; then
if test "X$vi_cv_path_luajit" != "X"; then
dnl -- find LuaJIT version
AC_CACHE_CHECK(LuaJIT version, vi_cv_version_luajit,
[ vi_cv_version_luajit=`${vi_cv_path_luajit} -v | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]] .*/\1/'` ])
[ vi_cv_version_luajit=`${vi_cv_path_luajit} -v 2>&1 | sed 's/LuaJIT \([[0-9.]]*\)\.[[0-9]]\(-[[a-z0-9]]*\)* .*/\1/'` ])
AC_CACHE_CHECK(Lua version of LuaJIT, vi_cv_version_lua_luajit,
[ vi_cv_version_lua_luajit=`${vi_cv_path_luajit} -e "print(_VERSION)" | sed 's/.* //'` ])
vi_cv_path_lua="$vi_cv_path_luajit"
@@ -3780,6 +3785,9 @@ if test "$MANDEF" = "man -s"; then
fi
dnl Check if gettext() is working and if it needs -lintl
dnl We take care to base this on an empty LIBS: on some systems libelf would be
dnl in LIBS and implicitly take along libintl. The final LIBS would then not
dnl contain libintl, and the link step would fail due to -Wl,--as-needed.
AC_MSG_CHECKING(--disable-nls argument)
AC_ARG_ENABLE(nls,
[ --disable-nls Don't support NLS (gettext()).], ,
@@ -3798,16 +3806,18 @@ if test "$enable_nls" = "yes"; then
if test -f po/Makefile; then
have_gettext="no"
if test -n "$MSGFMT"; then
olibs=$LIBS
LIBS=""
AC_TRY_LINK(
[#include <libintl.h>],
[gettext("Test");],
AC_MSG_RESULT([gettext() works]); have_gettext="yes",
olibs=$LIBS
LIBS="$LIBS -lintl"
AC_MSG_RESULT([gettext() works]); have_gettext="yes"; LIBS=$olibs,
LIBS="-lintl"
AC_TRY_LINK(
[#include <libintl.h>],
[gettext("Test");],
AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes",
AC_MSG_RESULT([gettext() works with -lintl]); have_gettext="yes";
LIBS="$olibs -lintl",
AC_MSG_RESULT([gettext() doesn't work]);
LIBS=$olibs))
else
+16 -8
View File
@@ -1192,23 +1192,29 @@ install_vimrc(int idx)
fprintf(fd, " if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
/* If the path has a space: When using cmd.exe (Win NT/2000/XP) put
* quotes around the whole command and around the diff command.
* quotes around the diff command and rely on the default value of
* shellxquote to solve the quoting problem for the whole command.
*
* Otherwise put a double quote just before the space and at the
* end of the command. Putting quotes around the whole thing
* doesn't work on Win 95/98/ME. This is mostly guessed! */
fprintf(fd, " let eq = ''\n");
fprintf(fd, " if $VIMRUNTIME =~ ' '\n");
fprintf(fd, " if &sh =~ '\\<cmd'\n");
fprintf(fd, " let cmd = '\"\"' . $VIMRUNTIME . '\\diff\"'\n");
fprintf(fd, " let eq = '\"'\n");
fprintf(fd, " if empty(&shellxquote)\n");
fprintf(fd, " let l:shxq_sav = ''\n");
fprintf(fd, " set shellxquote&\n");
fprintf(fd, " endif\n");
fprintf(fd, " let cmd = '\"' . $VIMRUNTIME . '\\diff\"'\n");
fprintf(fd, " else\n");
fprintf(fd, " let cmd = substitute($VIMRUNTIME, ' ', '\" ', '') . '\\diff\"'\n");
fprintf(fd, " endif\n");
fprintf(fd, " else\n");
fprintf(fd, " let cmd = $VIMRUNTIME . '\\diff'\n");
fprintf(fd, " endif\n");
fprintf(fd, " silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq\n");
fprintf(fd, " silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3\n");
fprintf(fd, " if exists('l:shxq_sav')\n");
fprintf(fd, " let &shellxquote=l:shxq_sav\n");
fprintf(fd, " endif\n");
fprintf(fd, "endfunction\n");
fprintf(fd, "\n");
}
@@ -1773,9 +1779,11 @@ build_shortcut(
/*
* We used to use "homedir" as the working directory, but that is a bad choice
* on multi-user systems. Not specifying a directory appears to work best.
* on multi-user systems. However, not specifying a directory results in the
* current directory to be c:\Windows\system32 on Windows 7. Use environment
* variables instead.
*/
#define WORKDIR ""
#define WORKDIR "%HOMEDRIVE%%HOMEPATH%"
/*
* Create shortcut(s) in the Start Menu\Programs\Vim folder.
+11 -11
View File
@@ -199,7 +199,7 @@ static void check_spell_redraw __ARGS((void));
static void spell_back_to_badword __ARGS((void));
static int spell_bad_len = 0; /* length of located bad word */
#endif
static void stop_insert __ARGS((pos_T *end_insert_pos, int esc));
static void stop_insert __ARGS((pos_T *end_insert_pos, int esc, int nomove));
static int echeck_abbr __ARGS((int));
static int replace_pop __ARGS((void));
static void replace_join __ARGS((int off));
@@ -6713,7 +6713,7 @@ start_arrow(end_insert_pos)
if (!arrow_used) /* something has been inserted */
{
AppendToRedobuff(ESC_STR);
stop_insert(end_insert_pos, FALSE);
stop_insert(end_insert_pos, FALSE, FALSE);
arrow_used = TRUE; /* this means we stopped the current insert */
}
#ifdef FEAT_SPELL
@@ -6802,9 +6802,10 @@ stop_arrow()
* to another window/buffer.
*/
static void
stop_insert(end_insert_pos, esc)
stop_insert(end_insert_pos, esc, nomove)
pos_T *end_insert_pos;
int esc; /* called by ins_esc() */
int nomove; /* <c-\><c-o>, don't move cursor */
{
int cc;
char_u *ptr;
@@ -6875,7 +6876,7 @@ stop_insert(end_insert_pos, esc)
* Do this when ESC was used or moving the cursor up/down.
* Check for the old position still being valid, just in case the text
* got changed unexpectedly. */
if (did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
if (!nomove && did_ai && (esc || (vim_strchr(p_cpo, CPO_INDENT) == NULL
&& curwin->w_cursor.lnum != end_insert_pos->lnum))
&& end_insert_pos->lnum <= curbuf->b_ml.ml_line_count)
{
@@ -7871,8 +7872,7 @@ in_cinkeys(keytyped, when, line_is_empty)
if (try_match && keytyped == ':')
{
p = ml_get_curline();
if (cin_iscase(p, FALSE) || cin_isscopedecl(p)
|| cin_islabel(30))
if (cin_iscase(p, FALSE) || cin_isscopedecl(p) || cin_islabel())
return TRUE;
/* Need to get the line again after cin_islabel(). */
p = ml_get_curline();
@@ -7882,7 +7882,7 @@ in_cinkeys(keytyped, when, line_is_empty)
{
p[curwin->w_cursor.col - 1] = ' ';
i = (cin_iscase(p, FALSE) || cin_isscopedecl(p)
|| cin_islabel(30));
|| cin_islabel());
p = ml_get_curline();
p[curwin->w_cursor.col - 1] = ':';
if (i)
@@ -8392,7 +8392,7 @@ ins_esc(count, cmdchar, nomove)
disabled_redraw = TRUE;
return FALSE; /* repeat the insert */
}
stop_insert(&curwin->w_cursor, TRUE);
stop_insert(&curwin->w_cursor, TRUE, nomove);
undisplay_dollar();
}
@@ -8972,7 +8972,7 @@ ins_bs(c, mode, inserted_space_p)
*inserted_space_p = FALSE;
if (p_sta && in_indent)
ts = (int)get_sw_value();
ts = (int)get_sw_value(curbuf);
else
ts = (int)get_sts_value();
/* Compute the virtual column where we want to be. Since
@@ -9680,7 +9680,7 @@ ins_tab()
* When nothing special, insert TAB like a normal character
*/
if (!curbuf->b_p_et
&& !(p_sta && ind && curbuf->b_p_ts != get_sw_value())
&& !(p_sta && ind && curbuf->b_p_ts != get_sw_value(curbuf))
&& get_sts_value() == 0)
return TRUE;
@@ -9696,7 +9696,7 @@ ins_tab()
AppendToRedobuff((char_u *)"\t");
if (p_sta && ind) /* insert tab in indent, use 'shiftwidth' */
temp = (int)get_sw_value();
temp = (int)get_sw_value(curbuf);
else if (curbuf->b_p_sts != 0) /* use 'softtabstop' when set */
temp = (int)get_sts_value();
else /* otherwise use 'tabstop' */
+53 -12
View File
@@ -356,6 +356,7 @@ static struct vimvar
{VV_NAME("mouse_col", VAR_NUMBER), 0},
{VV_NAME("operator", VAR_STRING), VV_RO},
{VV_NAME("searchforward", VAR_NUMBER), 0},
{VV_NAME("hlsearch", VAR_NUMBER), 0},
{VV_NAME("oldfiles", VAR_LIST), 0},
{VV_NAME("windowid", VAR_NUMBER), VV_RO},
};
@@ -474,7 +475,9 @@ static void f_bufname __ARGS((typval_T *argvars, typval_T *rettv));
static void f_bufnr __ARGS((typval_T *argvars, typval_T *rettv));
static void f_bufwinnr __ARGS((typval_T *argvars, typval_T *rettv));
static void f_byte2line __ARGS((typval_T *argvars, typval_T *rettv));
static void byteidx __ARGS((typval_T *argvars, typval_T *rettv, int comp));
static void f_byteidx __ARGS((typval_T *argvars, typval_T *rettv));
static void f_byteidxcomp __ARGS((typval_T *argvars, typval_T *rettv));
static void f_call __ARGS((typval_T *argvars, typval_T *rettv));
#ifdef FEAT_FLOAT
static void f_ceil __ARGS((typval_T *argvars, typval_T *rettv));
@@ -869,6 +872,7 @@ eval_init()
hash_add(&compat_hashtab, p->vv_di.di_key);
}
set_vim_var_nr(VV_SEARCHFORWARD, 1L);
set_vim_var_nr(VV_HLSEARCH, 1L);
set_reg_var(0); /* default for v:register is not 0 but '"' */
#ifdef EBCDIC
@@ -7862,6 +7866,7 @@ static struct fst
{"bufwinnr", 1, 1, f_bufwinnr},
{"byte2line", 1, 1, f_byte2line},
{"byteidx", 2, 2, f_byteidx},
{"byteidxcomp", 2, 2, f_byteidxcomp},
{"call", 2, 3, f_call},
#ifdef FEAT_FLOAT
{"ceil", 1, 1, f_ceil},
@@ -9178,13 +9183,11 @@ f_byte2line(argvars, rettv)
#endif
}
/*
* "byteidx()" function
*/
static void
f_byteidx(argvars, rettv)
byteidx(argvars, rettv, comp)
typval_T *argvars;
typval_T *rettv;
int comp;
{
#ifdef FEAT_MBYTE
char_u *t;
@@ -9204,7 +9207,10 @@ f_byteidx(argvars, rettv)
{
if (*t == NUL) /* EOL reached */
return;
t += (*mb_ptr2len)(t);
if (enc_utf8 && comp)
t += utf_ptr2len(t);
else
t += (*mb_ptr2len)(t);
}
rettv->vval.v_number = (varnumber_T)(t - str);
#else
@@ -9213,6 +9219,28 @@ f_byteidx(argvars, rettv)
#endif
}
/*
* "byteidx()" function
*/
static void
f_byteidx(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
byteidx(argvars, rettv, FALSE);
}
/*
* "byteidxcomp()" function
*/
static void
f_byteidxcomp(argvars, rettv)
typval_T *argvars;
typval_T *rettv;
{
byteidx(argvars, rettv, TRUE);
}
int
func_call(name, args, selfdict, rettv)
char_u *name;
@@ -16936,7 +16964,7 @@ f_shiftwidth(argvars, rettv)
typval_T *argvars UNUSED;
typval_T *rettv;
{
rettv->vval.v_number = get_sw_value();
rettv->vval.v_number = get_sw_value(curbuf);
}
/*
@@ -19845,24 +19873,30 @@ handle_subscript(arg, rettv, evaluate, verbose)
while (ret == OK
&& (**arg == '['
|| (**arg == '.' && rettv->v_type == VAR_DICT)
|| (**arg == '(' && rettv->v_type == VAR_FUNC))
|| (**arg == '(' && (!evaluate || rettv->v_type == VAR_FUNC)))
&& !vim_iswhite(*(*arg - 1)))
{
if (**arg == '(')
{
/* need to copy the funcref so that we can clear rettv */
functv = *rettv;
rettv->v_type = VAR_UNKNOWN;
if (evaluate)
{
functv = *rettv;
rettv->v_type = VAR_UNKNOWN;
/* Invoke the function. Recursive! */
s = functv.vval.v_string;
/* Invoke the function. Recursive! */
s = functv.vval.v_string;
}
else
s = (char_u *)"";
ret = get_func_tv(s, (int)STRLEN(s), rettv, arg,
curwin->w_cursor.lnum, curwin->w_cursor.lnum,
&len, evaluate, selfdict);
/* Clear the funcref afterwards, so that deleting it while
* evaluating the arguments is possible (see test55). */
clear_tv(&functv);
if (evaluate)
clear_tv(&functv);
/* Stop the expression evaluation when immediately aborting on
* error, or when an interrupt occurred or an exception was thrown
@@ -20615,6 +20649,13 @@ set_var(name, tv, copy)
v->di_tv.vval.v_number = get_tv_number(tv);
if (STRCMP(varname, "searchforward") == 0)
set_search_direction(v->di_tv.vval.v_number ? '/' : '?');
#ifdef FEAT_SEARCH_EXTRA
else if (STRCMP(varname, "hlsearch") == 0)
{
no_hlsearch = !v->di_tv.vval.v_number;
redraw_all_later(SOME_VALID);
}
#endif
}
return;
}
+5 -3
View File
@@ -3253,8 +3253,10 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
if ( ((!other_file && !(flags & ECMD_OLDBUF))
|| (curbuf->b_nwindows == 1
&& !(flags & (ECMD_HIDE | ECMD_ADDBUF))))
&& check_changed(curbuf, p_awa, !other_file,
(flags & ECMD_FORCEIT), FALSE))
&& check_changed(curbuf, (p_awa ? CCGD_AW : 0)
| (other_file ? 0 : CCGD_MULTWIN)
| ((flags & ECMD_FORCEIT) ? CCGD_FORCEIT : 0)
| (eap == NULL ? 0 : CCGD_EXCMD)))
{
if (fnum == 0 && other_file && ffname != NULL)
(void)setaltfname(ffname, sfname, newlnum < 0 ? 0 : newlnum);
@@ -7664,7 +7666,7 @@ ex_drop(eap)
# ifdef FEAT_WINDOWS
++emsg_off;
# endif
split = check_changed(curbuf, TRUE, FALSE, FALSE, FALSE);
split = check_changed(curbuf, CCGD_AW | CCGD_EXCMD);
# ifdef FEAT_WINDOWS
--emsg_off;
# else
+2
View File
@@ -477,6 +477,8 @@ EX(CMD_keepmarks, "keepmarks", ex_wrongmodifier,
NEEDARG|EXTRA|NOTRLCOM),
EX(CMD_keepjumps, "keepjumps", ex_wrongmodifier,
NEEDARG|EXTRA|NOTRLCOM),
EX(CMD_keeppatterns, "keeppatterns", ex_wrongmodifier,
NEEDARG|EXTRA|NOTRLCOM),
EX(CMD_keepalt, "keepalt", ex_wrongmodifier,
NEEDARG|EXTRA|NOTRLCOM),
EX(CMD_list, "list", ex_print,
+26 -14
View File
@@ -1436,20 +1436,20 @@ autowrite_all()
}
/*
* return TRUE if buffer was changed and cannot be abandoned.
* Return TRUE if buffer was changed and cannot be abandoned.
* For flags use the CCGD_ values.
*/
int
check_changed(buf, checkaw, mult_win, forceit, allbuf)
check_changed(buf, flags)
buf_T *buf;
int checkaw; /* do autowrite if buffer was changed */
int mult_win; /* check also when several wins for the buf */
int forceit;
int allbuf UNUSED; /* may write all buffers */
int flags;
{
int forceit = (flags & CCGD_FORCEIT);
if ( !forceit
&& bufIsChanged(buf)
&& (mult_win || buf->b_nwindows <= 1)
&& (!checkaw || autowrite(buf, forceit) == FAIL))
&& ((flags & CCGD_MULTWIN) || buf->b_nwindows <= 1)
&& (!(flags & CCGD_AW) || autowrite(buf, forceit) == FAIL))
{
#if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
if ((p_confirm || cmdmod.confirm) && p_write)
@@ -1457,7 +1457,7 @@ check_changed(buf, checkaw, mult_win, forceit, allbuf)
buf_T *buf2;
int count = 0;
if (allbuf)
if (flags & CCGD_ALLBUF)
for (buf2 = firstbuf; buf2 != NULL; buf2 = buf2->b_next)
if (bufIsChanged(buf2)
&& (buf2->b_ffname != NULL
@@ -1480,7 +1480,10 @@ check_changed(buf, checkaw, mult_win, forceit, allbuf)
return bufIsChanged(buf);
}
#endif
EMSG(_(e_nowrtmsg));
if (flags & CCGD_EXCMD)
EMSG(_(e_nowrtmsg));
else
EMSG(_(e_nowrtmsg_nobang));
return TRUE;
}
return FALSE;
@@ -1763,7 +1766,9 @@ check_changed_any(hidden)
{
/* Try auto-writing the buffer. If this fails but the buffer no
* longer exists it's not changed, that's OK. */
if (check_changed(buf, p_awa, TRUE, FALSE, TRUE) && buf_valid(buf))
if (check_changed(buf, (p_awa ? CCGD_AW : 0)
| CCGD_MULTWIN
| CCGD_ALLBUF) && buf_valid(buf))
break; /* didn't save - still changes */
}
}
@@ -2347,7 +2352,10 @@ do_argfile(eap, argn)
vim_free(p);
}
if ((!P_HID(curbuf) || !other)
&& check_changed(curbuf, TRUE, !other, eap->forceit, FALSE))
&& check_changed(curbuf, CCGD_AW
| (other ? 0 : CCGD_MULTWIN)
| (eap->forceit ? CCGD_FORCEIT : 0)
| CCGD_EXCMD))
return;
}
@@ -2388,7 +2396,9 @@ ex_next(eap)
*/
if ( P_HID(curbuf)
|| eap->cmdidx == CMD_snext
|| !check_changed(curbuf, TRUE, FALSE, eap->forceit, FALSE))
|| !check_changed(curbuf, CCGD_AW
| (eap->forceit ? CCGD_FORCEIT : 0)
| CCGD_EXCMD))
{
if (*eap->arg != NUL) /* redefine file list */
{
@@ -2531,7 +2541,9 @@ ex_listdo(eap)
if (eap->cmdidx == CMD_windo
|| eap->cmdidx == CMD_tabdo
|| P_HID(curbuf)
|| !check_changed(curbuf, TRUE, FALSE, eap->forceit, FALSE))
|| !check_changed(curbuf, CCGD_AW
| (eap->forceit ? CCGD_FORCEIT : 0)
| CCGD_EXCMD))
{
/* start at the first argument/window/buffer */
i = 0;
+23 -4
View File
@@ -1850,6 +1850,11 @@ do_one_cmd(cmdlinep, sourcing,
cmdmod.keepalt = TRUE;
continue;
}
if (checkforcmd(&ea.cmd, "keeppatterns", 5))
{
cmdmod.keeppatterns = TRUE;
continue;
}
if (!checkforcmd(&ea.cmd, "keepjumps", 5))
break;
cmdmod.keepjumps = TRUE;
@@ -2591,6 +2596,7 @@ do_one_cmd(cmdlinep, sourcing,
case CMD_keepalt:
case CMD_keepjumps:
case CMD_keepmarks:
case CMD_keeppatterns:
case CMD_leftabove:
case CMD_let:
case CMD_lockmarks:
@@ -3096,6 +3102,7 @@ static struct cmdmod
{"keepalt", 5, FALSE},
{"keepjumps", 5, FALSE},
{"keepmarks", 3, FALSE},
{"keeppatterns", 5, FALSE},
{"leftabove", 5, FALSE},
{"lockmarks", 3, FALSE},
{"noautocmd", 3, FALSE},
@@ -3604,6 +3611,7 @@ set_one_cmd_context(xp, buff)
case CMD_keepalt:
case CMD_keepjumps:
case CMD_keepmarks:
case CMD_keeppatterns:
case CMD_leftabove:
case CMD_lockmarks:
case CMD_rightbelow:
@@ -6582,7 +6590,9 @@ ex_quit(eap)
if (check_more(FALSE, eap->forceit) == OK && only_one_window())
exiting = TRUE;
if ((!P_HID(curbuf)
&& check_changed(curbuf, p_awa, FALSE, eap->forceit, FALSE))
&& check_changed(curbuf, (p_awa ? CCGD_AW : 0)
| (eap->forceit ? CCGD_FORCEIT : 0)
| CCGD_EXCMD))
|| check_more(TRUE, eap->forceit) == FAIL
|| (only_one_window() && check_changed_any(eap->forceit)))
{
@@ -7117,7 +7127,7 @@ handle_drop(filec, filev, split)
if (!P_HID(curbuf) && !split)
{
++emsg_off;
split = check_changed(curbuf, TRUE, FALSE, FALSE, FALSE);
split = check_changed(curbuf, CCGD_AW);
--emsg_off;
}
if (split)
@@ -7379,7 +7389,11 @@ ex_recover(eap)
{
/* Set recoverymode right away to avoid the ATTENTION prompt. */
recoverymode = TRUE;
if (!check_changed(curbuf, p_awa, TRUE, eap->forceit, FALSE)
if (!check_changed(curbuf, (p_awa ? CCGD_AW : 0)
| CCGD_MULTWIN
| (eap->forceit ? CCGD_FORCEIT : 0)
| CCGD_EXCMD)
&& (*eap->arg == NUL
|| setfname(curbuf, eap->arg, NULL, TRUE) == OK))
ml_recover();
@@ -8575,6 +8589,11 @@ ex_operators(eap)
beginline(BL_SOL | BL_FIX);
}
#if defined(FEAT_VISUAL)
if (VIsual_active)
end_visual_mode();
#endif
switch (eap->cmdidx)
{
case CMD_delete:
@@ -11416,7 +11435,7 @@ ex_set(eap)
ex_nohlsearch(eap)
exarg_T *eap UNUSED;
{
no_hlsearch = TRUE;
SET_NO_HLSEARCH(TRUE);
redraw_all_later(SOME_VALID);
}
+8 -5
View File
@@ -2288,7 +2288,7 @@ getexmodeline(promptc, cookie, indent)
if (c1 == Ctrl_T)
{
long sw = get_sw_value();
long sw = get_sw_value(curbuf);
p = (char_u *)line_ga.ga_data;
p[line_ga.ga_len] = NUL;
@@ -2345,7 +2345,7 @@ redraw:
p[line_ga.ga_len] = NUL;
indent = get_indent_str(p, 8);
--indent;
indent -= indent % get_sw_value();
indent -= indent % get_sw_value(curbuf);
}
while (get_indent_str(p, 8) > indent)
{
@@ -3863,9 +3863,9 @@ vim_strsave_fnameescape(fname, shell)
char_u buf[20];
int j = 0;
/* Don't escape '[' and '{' if they are in 'isfname'. */
/* Don't escape '[', '{' and '!' if they are in 'isfname'. */
for (p = PATH_ESC_CHARS; *p != NUL; ++p)
if ((*p != '[' && *p != '{') || !vim_isfilec(*p))
if ((*p != '[' && *p != '{' && *p != '!') || !vim_isfilec(*p))
buf[j++] = *p;
buf[j] = NUL;
p = vim_strsave_escaped(fname, buf);
@@ -4189,7 +4189,7 @@ expand_showtail(xp)
/*
* Prepare a string for expansion.
* When expanding file names: The string will be used with expand_wildcards().
* Copy the file name into allocated memory and add a '*' at the end.
* Copy "fname[len]" into allocated memory and add a '*' at the end.
* When expanding other names: The string will be used with regcomp(). Copy
* the name into allocated memory and prepend "^".
*/
@@ -5512,6 +5512,9 @@ add_to_history(histype, new_entry, in_map, sep)
if (hislen == 0) /* no history */
return;
if (cmdmod.keeppatterns && histype == HIST_SEARCH)
return;
/*
* Searches inside the same mapping overwrite each other, so that only
* the last line is kept. Be careful not to remove a line that was moved
+3
View File
@@ -6711,6 +6711,9 @@ vim_rename(from, to)
#ifdef HAVE_ACL
mch_set_acl(to, acl);
mch_free_acl(acl);
#endif
#ifdef HAVE_SELINUX
mch_copy_sec(from, to);
#endif
if (errmsg != NULL)
{
+1 -1
View File
@@ -3052,7 +3052,7 @@ foldlevelIndent(flp)
flp->lvl = -1;
}
else
flp->lvl = get_indent_buf(buf, lnum) / get_sw_value();
flp->lvl = get_indent_buf(buf, lnum) / get_sw_value(curbuf);
if (flp->lvl > flp->wp->w_p_fdn)
{
flp->lvl = flp->wp->w_p_fdn;
+1
View File
@@ -1494,6 +1494,7 @@ EXTERN char_u e_notmp[] INIT(= N_("E483: Can't get temp file name"));
EXTERN char_u e_notopen[] INIT(= N_("E484: Can't open file %s"));
EXTERN char_u e_notread[] INIT(= N_("E485: Can't read file %s"));
EXTERN char_u e_nowrtmsg[] INIT(= N_("E37: No write since last change (add ! to override)"));
EXTERN char_u e_nowrtmsg_nobang[] INIT(= N_("E37: No write since last change"));
EXTERN char_u e_null[] INIT(= N_("E38: Null argument"));
#ifdef FEAT_DIGRAPHS
EXTERN char_u e_number_exp[] INIT(= N_("E39: Number expected"));
+12 -2
View File
@@ -558,7 +558,11 @@ VimTryEnd(void)
/* Keyboard interrupt should be preferred over anything else */
if (got_int)
{
did_throw = got_int = FALSE;
if (current_exception != NULL)
discard_current_exception();
else
need_rethrow = did_throw = FALSE;
got_int = FALSE;
PyErr_SetNone(PyExc_KeyboardInterrupt);
return -1;
}
@@ -567,7 +571,10 @@ VimTryEnd(void)
/* Python exception is preferred over vim one; unlikely to occur though */
else if (PyErr_Occurred())
{
did_throw = FALSE;
if (current_exception != NULL)
discard_current_exception();
else
need_rethrow = did_throw = FALSE;
return -1;
}
/* Finally transform VimL exception to python one */
@@ -1624,6 +1631,9 @@ DictionaryContains(DictionaryObject *self, PyObject *keyObject)
PyObject *rObj = _DictionaryItem(self, keyObject, DICT_FLAG_RETURN_BOOL);
int ret;
if (rObj == NULL)
return -1;
ret = (rObj == Py_True);
Py_DECREF(rObj);
+1 -1
View File
@@ -363,7 +363,7 @@ static int(*dll_PyRun_SimpleString)(char *);
static PyObject *(*dll_PyRun_String)(char *, int, PyObject *, PyObject *);
static PyObject* (*dll_PyObject_GetAttrString)(PyObject *, const char *);
static int (*dll_PyObject_HasAttrString)(PyObject *, const char *);
static PyObject* (*dll_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
static int (*dll_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
static PyObject* (*dll_PyObject_CallFunctionObjArgs)(PyObject *, ...);
static PyObject* (*dll_PyObject_CallFunction)(PyObject *, char *, ...);
static PyObject* (*dll_PyObject_Call)(PyObject *, PyObject *, PyObject *);
+1 -1
View File
@@ -302,7 +302,7 @@ static int (*py3_PyRun_SimpleString)(char *);
static PyObject* (*py3_PyRun_String)(char *, int, PyObject *, PyObject *);
static PyObject* (*py3_PyObject_GetAttrString)(PyObject *, const char *);
static int (*py3_PyObject_HasAttrString)(PyObject *, const char *);
static PyObject* (*py3_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
static int (*py3_PyObject_SetAttrString)(PyObject *, const char *, PyObject *);
static PyObject* (*py3_PyObject_CallFunctionObjArgs)(PyObject *, ...);
static PyObject* (*py3__PyObject_CallFunction_SizeT)(PyObject *, char *, ...);
static PyObject* (*py3_PyObject_Call)(PyObject *, PyObject *, PyObject *);
+2 -1
View File
@@ -1374,7 +1374,8 @@ free_jumplist(wp)
set_last_cursor(win)
win_T *win;
{
win->w_buffer->b_last_cursor = win->w_cursor;
if (win->w_buffer != NULL)
win->w_buffer->b_last_cursor = win->w_cursor;
}
#if defined(EXITFREE) || defined(PROTO)
+11 -7
View File
@@ -947,8 +947,8 @@ dbcs_class(lead, trail)
{
case 0x2121: /* ZENKAKU space */
return 0;
case 0x2122: /* KU-TEN (Japanese comma) */
case 0x2123: /* TOU-TEN (Japanese period) */
case 0x2122: /* TOU-TEN (Japanese comma) */
case 0x2123: /* KU-TEN (Japanese period) */
case 0x2124: /* ZENKAKU comma */
case 0x2125: /* ZENKAKU period */
return 1;
@@ -2477,9 +2477,9 @@ utf_class(c)
/* sorted list of non-overlapping intervals */
static struct clinterval
{
unsigned short first;
unsigned short last;
unsigned short class;
unsigned int first;
unsigned int last;
unsigned int class;
} classes[] =
{
{0x037e, 0x037e, 1}, /* Greek question mark */
@@ -2544,6 +2544,10 @@ utf_class(c)
{0xff1a, 0xff20, 1}, /* half/fullwidth ASCII */
{0xff3b, 0xff40, 1}, /* half/fullwidth ASCII */
{0xff5b, 0xff65, 1}, /* half/fullwidth ASCII */
{0x20000, 0x2a6df, 0x4e00}, /* CJK Ideographs */
{0x2a700, 0x2b73f, 0x4e00}, /* CJK Ideographs */
{0x2b740, 0x2b81f, 0x4e00}, /* CJK Ideographs */
{0x2f800, 0x2fa1f, 0x4e00}, /* CJK Ideographs */
};
int bot = 0;
int top = sizeof(classes) / sizeof(struct clinterval) - 1;
@@ -2563,9 +2567,9 @@ utf_class(c)
while (top >= bot)
{
mid = (bot + top) / 2;
if (classes[mid].last < c)
if (classes[mid].last < (unsigned int)c)
bot = mid + 1;
else if (classes[mid].first > c)
else if (classes[mid].first > (unsigned int)c)
top = mid - 1;
else
return (int)classes[mid].class;
+41 -13
View File
@@ -4014,6 +4014,13 @@ get_file_in_dir(fname, dname)
else
retval = concat_fnames(dname, tail, TRUE);
#ifdef WIN3264
if (retval != NULL)
for (t = gettail(retval); *t != NUL; mb_ptr_adv(t))
if (*t == ':')
*t = '%';
#endif
return retval;
}
@@ -4137,12 +4144,29 @@ findswapname(buf, dirp, old_fname)
#ifndef SHORT_FNAME
int r;
#endif
char_u *buf_fname = buf->b_fname;
#if !defined(SHORT_FNAME) \
&& ((!defined(UNIX) && !defined(OS2)) || defined(ARCHIE))
&& ((!defined(UNIX) && !defined(OS2)) || defined(ARCHIE))
# define CREATE_DUMMY_FILE
FILE *dummyfd = NULL;
# ifdef WIN3264
if (buf_fname != NULL && !mch_isFullName(buf_fname)
&& vim_strchr(gettail(buf_fname), ':'))
{
char_u *t;
buf_fname = vim_strsave(buf_fname);
if (buf_fname == NULL)
buf_fname = buf->b_fname;
else
for (t = gettail(buf_fname); *t != NUL; mb_ptr_adv(t))
if (*t == ':')
*t = '%';
}
# endif
/*
* If we start editing a new file, e.g. "test.doc", which resides on an
* MSDOS compatible filesystem, it is possible that the file
@@ -4150,9 +4174,9 @@ findswapname(buf, dirp, old_fname)
* this problem we temporarily create "test.doc". Don't do this when the
* check below for a 8.3 file name is used.
*/
if (!(buf->b_p_sn || buf->b_shortname) && buf->b_fname != NULL
&& mch_getperm(buf->b_fname) < 0)
dummyfd = mch_fopen((char *)buf->b_fname, "w");
if (!(buf->b_p_sn || buf->b_shortname) && buf_fname != NULL
&& mch_getperm(buf_fname) < 0)
dummyfd = mch_fopen((char *)buf_fname, "w");
#endif
/*
@@ -4171,7 +4195,7 @@ findswapname(buf, dirp, old_fname)
if (dir_name == NULL) /* out of memory */
fname = NULL;
else
fname = makeswapname(buf->b_fname, buf->b_ffname, buf, dir_name);
fname = makeswapname(buf_fname, buf->b_ffname, buf, dir_name);
for (;;)
{
@@ -4204,7 +4228,7 @@ findswapname(buf, dirp, old_fname)
* It either contains two dots, is longer than 8 chars, or starts
* with a dot.
*/
tail = gettail(buf->b_fname);
tail = gettail(buf_fname);
if ( vim_strchr(tail, '.') != NULL
|| STRLEN(tail) > (size_t)8
|| *gettail(fname) == '.')
@@ -4273,7 +4297,7 @@ findswapname(buf, dirp, old_fname)
{
buf->b_shortname = TRUE;
vim_free(fname);
fname = makeswapname(buf->b_fname, buf->b_ffname,
fname = makeswapname(buf_fname, buf->b_ffname,
buf, dir_name);
continue; /* try again with b_shortname set */
}
@@ -4344,7 +4368,7 @@ findswapname(buf, dirp, old_fname)
{
buf->b_shortname = TRUE;
vim_free(fname);
fname = makeswapname(buf->b_fname, buf->b_ffname,
fname = makeswapname(buf_fname, buf->b_ffname,
buf, dir_name);
continue; /* try again with '.' replaced with '_' */
}
@@ -4356,7 +4380,7 @@ findswapname(buf, dirp, old_fname)
* viewing a help file or when the path of the file is different
* (happens when all .swp files are in one directory).
*/
if (!recoverymode && buf->b_fname != NULL
if (!recoverymode && buf_fname != NULL
&& !buf->b_help && !(buf->b_flags & BF_DUMMY))
{
int fd;
@@ -4433,7 +4457,7 @@ findswapname(buf, dirp, old_fname)
{
fclose(dummyfd);
dummyfd = NULL;
mch_remove(buf->b_fname);
mch_remove(buf_fname);
did_use_dummy = TRUE;
}
#endif
@@ -4448,7 +4472,7 @@ findswapname(buf, dirp, old_fname)
* user anyway.
*/
if (swap_exists_action != SEA_NONE
&& has_autocmd(EVENT_SWAPEXISTS, buf->b_fname, buf))
&& has_autocmd(EVENT_SWAPEXISTS, buf_fname, buf))
choice = do_swapexists(buf, fname);
if (choice == 0)
@@ -4549,7 +4573,7 @@ findswapname(buf, dirp, old_fname)
#ifdef CREATE_DUMMY_FILE
/* Going to try another name, need the dummy file again. */
if (did_use_dummy)
dummyfd = mch_fopen((char *)buf->b_fname, "w");
dummyfd = mch_fopen((char *)buf_fname, "w");
#endif
}
}
@@ -4581,8 +4605,12 @@ findswapname(buf, dirp, old_fname)
if (dummyfd != NULL) /* file has been created temporarily */
{
fclose(dummyfd);
mch_remove(buf->b_fname);
mch_remove(buf_fname);
}
#endif
#ifdef WIN3264
if (buf_fname != buf->b_fname)
vim_free(buf_fname);
#endif
return fname;
}
+12
View File
@@ -887,6 +887,8 @@ wait_return(redraw)
int oldState;
int tmpState;
int had_got_int;
int save_Recording;
FILE *save_scriptout;
if (redraw == TRUE)
must_redraw = CLEAR;
@@ -957,11 +959,21 @@ wait_return(redraw)
* typeahead buffer. */
++no_mapping;
++allow_keys;
/* Temporarily disable Recording. If Recording is active, the
* character will be recorded later, since it will be added to the
* typebuf after the loop */
save_Recording = Recording;
save_scriptout = scriptout;
Recording = FALSE;
scriptout = NULL;
c = safe_vgetc();
if (had_got_int && !global_busy)
got_int = FALSE;
--no_mapping;
--allow_keys;
Recording = save_Recording;
scriptout = save_scriptout;
#ifdef FEAT_CLIPBOARD
/* Strange way to allow copying (yanking) a modeless selection at
+421 -476
View File
File diff suppressed because it is too large Load Diff
+7
View File
@@ -7070,6 +7070,13 @@ nv_replace(cap)
{
if (got_int)
reset_VIsual();
if (had_ctrl_v)
{
if (cap->nchar == '\r')
cap->nchar = -1;
else if (cap->nchar == '\n')
cap->nchar = -2;
}
nv_operator(cap);
return;
}
+71 -17
View File
@@ -336,7 +336,7 @@ shift_line(left, round, amount, call_changed_bytes)
{
int count;
int i, j;
int p_sw = (int)get_sw_value();
int p_sw = (int)get_sw_value(curbuf);
count = get_indent(); /* get current indent */
@@ -392,7 +392,7 @@ shift_block(oap, amount)
int total;
char_u *newp, *oldp;
int oldcol = curwin->w_cursor.col;
int p_sw = (int)get_sw_value();
int p_sw = (int)get_sw_value(curbuf);
int p_ts = (int)curbuf->b_p_ts;
struct block_def bd;
int incr;
@@ -2074,10 +2074,15 @@ op_replace(oap, c)
char_u *newp, *oldp;
size_t oldlen;
struct block_def bd;
char_u *after_p = NULL;
int had_ctrl_v_cr = (c == -1 || c == -2);
if ((curbuf->b_ml.ml_flags & ML_EMPTY ) || oap->empty)
return OK; /* nothing to do */
if (had_ctrl_v_cr)
c = (c == -1 ? '\r' : '\n');
#ifdef FEAT_MBYTE
if (has_mbyte)
mb_adjust_opend(oap);
@@ -2164,25 +2169,44 @@ op_replace(oap, c)
/* insert pre-spaces */
copy_spaces(newp + bd.textcol, (size_t)bd.startspaces);
/* insert replacement chars CHECK FOR ALLOCATED SPACE */
#ifdef FEAT_MBYTE
if (has_mbyte)
/* -1/-2 is used for entering CR literally. */
if (had_ctrl_v_cr || (c != '\r' && c != '\n'))
{
n = (int)STRLEN(newp);
while (--num_chars >= 0)
n += (*mb_char2bytes)(c, newp + n);
#ifdef FEAT_MBYTE
if (has_mbyte)
{
n = (int)STRLEN(newp);
while (--num_chars >= 0)
n += (*mb_char2bytes)(c, newp + n);
}
else
#endif
copy_chars(newp + STRLEN(newp), (size_t)numc, c);
if (!bd.is_short)
{
/* insert post-spaces */
copy_spaces(newp + STRLEN(newp), (size_t)bd.endspaces);
/* copy the part after the changed part */
STRMOVE(newp + STRLEN(newp), oldp);
}
}
else
#endif
copy_chars(newp + STRLEN(newp), (size_t)numc, c);
if (!bd.is_short)
{
/* insert post-spaces */
copy_spaces(newp + STRLEN(newp), (size_t)bd.endspaces);
/* copy the part after the changed part */
STRMOVE(newp + STRLEN(newp), oldp);
/* Replacing with \r or \n means splitting the line. */
after_p = alloc_check(
(unsigned)(oldlen + 1 + n - STRLEN(newp)));
if (after_p != NULL)
STRMOVE(after_p, oldp);
}
/* replace the line */
ml_replace(curwin->w_cursor.lnum, newp, FALSE);
if (after_p != NULL)
{
ml_append(curwin->w_cursor.lnum++, after_p, 0, FALSE);
appended_lines_mark(curwin->w_cursor.lnum, 1L);
oap->end.lnum++;
vim_free(after_p);
}
}
}
else
@@ -2617,6 +2641,31 @@ op_insert(oap, count1)
{
struct block_def bd2;
/* The user may have moved the cursor before inserting something, try
* to adjust the block for that. */
if (oap->start.lnum == curbuf->b_op_start.lnum && !bd.is_MAX)
{
if (oap->op_type == OP_INSERT
&& oap->start.col != curbuf->b_op_start.col)
{
oap->start.col = curbuf->b_op_start.col;
pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
- oap->start_vcol;
oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
}
else if (oap->op_type == OP_APPEND
&& oap->end.col >= curbuf->b_op_start.col)
{
oap->start.col = curbuf->b_op_start.col;
/* reset pre_textlen to the value of OP_INSERT */
pre_textlen += bd.textlen;
pre_textlen -= getviscol2(oap->start.col, oap->start.coladd)
- oap->start_vcol;
oap->start_vcol = getviscol2(oap->start.col, oap->start.coladd);
oap->op_type = OP_INSERT;
}
}
/*
* Spaces and tabs in the indent may have changed to other spaces and
* tabs. Get the starting column again and correct the length.
@@ -3795,7 +3844,11 @@ do_put(regname, dir, count, flags)
ml_replace(lnum, newp, FALSE);
/* Place cursor on last putted char. */
if (lnum == curwin->w_cursor.lnum)
{
/* make sure curwin->w_virtcol is updated */
changed_cline_bef_curs();
curwin->w_cursor.col += (colnr_T)(totlen - 1);
}
}
#ifdef FEAT_VISUAL
if (VIsual_active)
@@ -4023,7 +4076,8 @@ preprocs_left()
# endif
# endif
# ifdef FEAT_CINDENT
(curbuf->b_p_cin && in_cinkeys('#', ' ', TRUE))
(curbuf->b_p_cin && in_cinkeys('#', ' ', TRUE)
&& curbuf->b_ind_hash_comment == 0)
# endif
;
}
@@ -5009,14 +5063,14 @@ format_lines(line_count, avoid_fex)
if (second_indent > 0) /* the "leader" for FO_Q_SECOND */
{
char_u *p = ml_get_curline();
int indent = skipwhite(p) - p;
int indent = (int)(skipwhite(p) - p);
if (indent > 0)
{
(void)del_bytes(indent, FALSE, FALSE);
mark_col_adjust(curwin->w_cursor.lnum,
(colnr_T)0, 0L, (long)-indent);
}
}
}
curwin->w_cursor.lnum--;
if (do_join(2, TRUE, FALSE, FALSE) == FAIL)
+60 -12
View File
@@ -237,6 +237,7 @@
#ifdef FEAT_STL_OPT
# define PV_STL OPT_BOTH(OPT_WIN(WV_STL))
#endif
#define PV_UL OPT_BOTH(OPT_BUF(BV_UL))
#ifdef FEAT_WINDOWS
# define PV_WFH OPT_WIN(WV_WFH)
#endif
@@ -2730,7 +2731,7 @@ static struct vimoption
#endif
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
{"undolevels", "ul", P_NUM|P_VI_DEF,
(char_u *)&p_ul, PV_NONE,
(char_u *)&p_ul, PV_UL,
{
#if defined(UNIX) || defined(WIN3264) || defined(OS2) || defined(VMS)
(char_u *)1000L,
@@ -3366,6 +3367,7 @@ set_init_1()
curbuf->b_p_initialized = TRUE;
curbuf->b_p_ar = -1; /* no local 'autoread' value */
curbuf->b_p_ul = NO_LOCAL_UNDOLEVEL;
check_buf_options(curbuf);
check_win_options(curwin);
check_options();
@@ -4580,8 +4582,16 @@ do_set(arg, opt_flags)
((flags & P_VI_DEF) || cp_val)
? VI_DEFAULT : VIM_DEFAULT];
else if (nextchar == '<')
value = *(long *)get_varp_scope(&(options[opt_idx]),
OPT_GLOBAL);
{
/* For 'undolevels' NO_LOCAL_UNDOLEVEL means to
* use the global value. */
if ((long *)varp == &curbuf->b_p_ul
&& opt_flags == OPT_LOCAL)
value = NO_LOCAL_UNDOLEVEL;
else
value = *(long *)get_varp_scope(
&(options[opt_idx]), OPT_GLOBAL);
}
else if (((long *)varp == &p_wc
|| (long *)varp == &p_wcm)
&& (*arg == '<'
@@ -5444,6 +5454,7 @@ check_buf_options(buf)
#ifdef FEAT_CINDENT
check_string_option(&buf->b_p_cink);
check_string_option(&buf->b_p_cino);
parse_cino(buf);
#endif
#ifdef FEAT_AUTOCMD
check_string_option(&buf->b_p_ft);
@@ -7077,6 +7088,15 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
}
#endif
#ifdef FEAT_CINDENT
/* 'cinoptions' */
else if (gvarp == &p_cino)
{
/* TODO: recognize errors */
parse_cino(curbuf);
}
#endif
/* Options that are a list of flags. */
else
{
@@ -7189,6 +7209,11 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
if (varp == &(curwin->w_s->b_p_spl))
{
char_u fname[200];
char_u *q = curwin->w_s->b_p_spl;
/* Skip the first name if it is "cjk". */
if (STRNCMP(q, "cjk,", 4) == 0)
q += 4;
/*
* Source the spell/LANG.vim in 'runtimepath'.
@@ -7196,11 +7221,10 @@ did_set_string_option(opt_idx, varp, new_value_alloced, oldval, errbuf,
* Use the first name in 'spelllang' up to '_region' or
* '.encoding'.
*/
for (p = curwin->w_s->b_p_spl; *p != NUL; ++p)
for (p = q; *p != NUL; ++p)
if (vim_strchr((char_u *)"_.,", *p) != NULL)
break;
vim_snprintf((char *)fname, 200, "spell/%.*s.vim",
(int)(p - curwin->w_s->b_p_spl), curwin->w_s->b_p_spl);
vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
source_runtime(fname, TRUE);
}
#endif
@@ -7878,7 +7902,7 @@ set_bool_option(opt_idx, varp, value, opt_flags)
/* when 'hlsearch' is set or reset: reset no_hlsearch */
else if ((int *)varp == &p_hls)
{
no_hlsearch = FALSE;
SET_NO_HLSEARCH(FALSE);
}
#endif
@@ -8462,14 +8486,24 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
curwin->w_p_fdc = 12;
}
}
#endif /* FEAT_FOLDING */
#if defined(FEAT_FOLDING) || defined(FEAT_CINDENT)
/* 'shiftwidth' or 'tabstop' */
else if (pp == &curbuf->b_p_sw || pp == &curbuf->b_p_ts)
{
# ifdef FEAT_FOLDING
if (foldmethodIsIndent(curwin))
foldUpdateAll(curwin);
# endif
# ifdef FEAT_CINDENT
/* When 'shiftwidth' changes, or it's zero and 'tabstop' changes:
* parse 'cinoptions'. */
if (pp == &curbuf->b_p_sw || curbuf->b_p_sw == 0)
parse_cino(curbuf);
# endif
}
#endif /* FEAT_FOLDING */
#endif
#ifdef FEAT_MBYTE
/* 'maxcombine' */
@@ -8591,6 +8625,13 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
u_sync(TRUE);
p_ul = value;
}
else if (pp == &curbuf->b_p_ul)
{
/* use the old value, otherwise u_sync() may not work properly */
curbuf->b_p_ul = old_value;
u_sync(TRUE);
curbuf->b_p_ul = value;
}
#ifdef FEAT_LINEBREAK
/* 'numberwidth' must be positive */
@@ -9838,7 +9879,6 @@ comp_col()
/*
* Unset local option value, similar to ":set opt<".
*/
void
unset_global_local_option(name, from)
char_u *name;
@@ -9911,6 +9951,9 @@ unset_global_local_option(name, from)
clear_string_option(&((win_T *)from)->w_p_stl);
break;
#endif
case PV_UL:
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
break;
}
}
@@ -9959,6 +10002,7 @@ get_varp_scope(p, opt_flags)
#ifdef FEAT_STL_OPT
case PV_STL: return (char_u *)&(curwin->w_p_stl);
#endif
case PV_UL: return (char_u *)&(curbuf->b_p_ul);
}
return NULL; /* "cannot happen" */
}
@@ -10023,6 +10067,8 @@ get_varp(p)
case PV_STL: return *curwin->w_p_stl != NUL
? (char_u *)&(curwin->w_p_stl) : p->var;
#endif
case PV_UL: return curbuf->b_p_ul != NO_LOCAL_UNDOLEVEL
? (char_u *)&(curbuf->b_p_ul) : p->var;
#ifdef FEAT_ARABIC
case PV_ARAB: return (char_u *)&(curwin->w_p_arab);
@@ -10569,6 +10615,7 @@ buf_copy_options(buf, flags)
/* options that are normally global but also have a local value
* are not copied, start using the global value */
buf->b_p_ar = -1;
buf->b_p_ul = NO_LOCAL_UNDOLEVEL;
#ifdef FEAT_QUICKFIX
buf->b_p_gp = empty_option;
buf->b_p_mp = empty_option;
@@ -11873,9 +11920,10 @@ check_ff_value(p)
* 'tabstop' value when 'shiftwidth' is zero.
*/
long
get_sw_value()
get_sw_value(buf)
buf_T *buf;
{
return curbuf->b_p_sw ? curbuf->b_p_sw : curbuf->b_p_ts;
return buf->b_p_sw ? buf->b_p_sw : buf->b_p_ts;
}
/*
@@ -11885,7 +11933,7 @@ get_sw_value()
long
get_sts_value()
{
return curbuf->b_p_sts < 0 ? get_sw_value() : curbuf->b_p_sts;
return curbuf->b_p_sts < 0 ? get_sw_value(curbuf) : curbuf->b_p_sts;
}
/*
+4
View File
@@ -1049,6 +1049,7 @@ enum
, BV_TW
, BV_TX
, BV_UDF
, BV_UL
, BV_WM
, BV_COUNT /* must be the last one */
};
@@ -1127,3 +1128,6 @@ enum
, WV_WRAP
, WV_COUNT /* must be the last one */
};
/* Value for b_p_ul indicating the global value must be used. */
#define NO_LOCAL_UNDOLEVEL -123456
+6 -1
View File
@@ -16,6 +16,11 @@
# define OPAQUE_TOOLBOX_STRUCTS 0
#endif
/* Include MAC_OS_X_VERSION_* macros */
#ifdef HAVE_AVAILABILITYMACROS_H
# include <AvailabilityMacros.h>
#endif
/*
* Macintosh machine-dependent things.
*
@@ -263,7 +268,7 @@
#endif
/* Some "prep work" definition to be able to compile the MacOS X
* version with os_unix.x instead of os_mac.c. Based on the result
* version with os_unix.c instead of os_mac.c. Based on the result
* of ./configure for console MacOS X.
*/
+4
View File
@@ -804,6 +804,10 @@ mch_stackcheck(p)
* completely full.
*/
#if defined(HAVE_AVAILABILITYMACROS_H)
# include <AvailabilityMacros.h>
#endif
#ifndef SIGSTKSZ
# define SIGSTKSZ 8000 /* just a guess of how much stack is needed... */
#endif
+8 -7
View File
@@ -2841,18 +2841,20 @@ mch_dirname(
}
/*
* get file permissions for `name'
* -1 : error
* else mode_t
* Get file permissions for "name".
* Return mode_t or -1 for error.
*/
long
mch_getperm(char_u *name)
{
struct stat st;
int n;
int n;
if (name[0] == '\\' && name[1] == '\\')
/* UNC path */
return (long)win32_getattrs(name);
n = mch_stat(name, &st);
return n == 0 ? (int)st.st_mode : -1;
return n == 0 ? (long)st.st_mode : -1L;
}
@@ -3094,8 +3096,7 @@ win32_fileinfo(char_u *fname, BY_HANDLE_FILE_INFORMATION *info)
* -1 : error
* else FILE_ATTRIBUTE_* defined in winnt.h
*/
static
int
static int
win32_getattrs(char_u *name)
{
int attr;
+1 -5
View File
@@ -47,11 +47,7 @@ cat << EOF > osdef0.c
#endif
EOF
# Mac uses precompiled headers, but we need real headers here.
case `uname` in
Darwin) $CC -I. -I$srcdir -E -no-cpp-precomp osdef0.c >osdef0.cc;;
*) $CC -I. -I$srcdir -E osdef0.c >osdef0.cc;;
esac
$CC -I. -I$srcdir -E osdef0.c >osdef0.cc
# insert a space in front of each line, so that a function name at the
# start of the line is matched with "[)*, ]\1[ (]"
+1 -3
View File
@@ -2,14 +2,12 @@
# Ukrainian Vim translation [uk]
#
# Copyright (C) 2001 Bohdan Vlasyuk <bohdan@vstu.edu.ua>
# Bohdan donated this work to be distributed with Vim under the Vim license.
#
# Thanks to:
# Dmytro Kovalov <dmytro.kovalov@nssmb.com> for useful suggestions
# Dmytro O. Redchuk <dor@kiev-online.net> for viminfo bug
#
# Please, see readme at htpp://www.vstu.edu.ua/~bohdan/vim before any
# complains, and even if you won't complain, read it anyway.
#
msgid ""
msgstr ""
"Project-Id-Version: vim 7.4\n"
+1 -3
View File
@@ -2,14 +2,12 @@
# Ukrainian Vim translation [uk]
#
# Copyright (C) 2001 Bohdan Vlasyuk <bohdan@vstu.edu.ua>
# Bohdan donated this work to be distributed with Vim under the Vim license.
#
# Thanks to:
# Dmytro Kovalov <dmytro.kovalov@nssmb.com> for useful suggestions
# Dmytro O. Redchuk <dor@kiev-online.net> for viminfo bug
#
# Please, see readme at htpp://www.vstu.edu.ua/~bohdan/vim before any
# complains, and even if you won't complain, read it anyway.
#
msgid ""
msgstr ""
"Project-Id-Version: vim 7.4\n"
+4 -4
View File
@@ -282,6 +282,10 @@ pum_redraw()
int round;
int n;
/* Never display more than we have */
if (pum_first > pum_size - pum_height)
pum_first = pum_size - pum_height;
if (pum_scrollbar)
{
thumb_heigth = pum_height * pum_height / pum_size;
@@ -672,10 +676,6 @@ pum_set_selected(n, repeat)
#endif
}
/* Never display more than we have */
if (pum_first > pum_size - pum_height)
pum_first = pum_size - pum_height;
if (!resized)
pum_redraw();
+1 -1
View File
@@ -35,7 +35,7 @@ void prof_inchar_exit __ARGS((void));
int prof_def_func __ARGS((void));
int autowrite __ARGS((buf_T *buf, int forceit));
void autowrite_all __ARGS((void));
int check_changed __ARGS((buf_T *buf, int checkaw, int mult_win, int forceit, int allbuf));
int check_changed __ARGS((buf_T *buf, int flags));
void browse_save_fname __ARGS((buf_T *buf));
void dialog_changed __ARGS((buf_T *buf, int checkall));
int can_abandon __ARGS((buf_T *buf, int forceit));
+3 -1
View File
@@ -69,6 +69,7 @@ char_u *gettail_sep __ARGS((char_u *fname));
char_u *getnextcomp __ARGS((char_u *fname));
char_u *get_past_head __ARGS((char_u *path));
int vim_ispathsep __ARGS((int c));
int vim_ispathsep_nocolon __ARGS((int c));
int vim_ispathlistsep __ARGS((int c));
void shorten_dir __ARGS((char_u *str));
int dir_of_file_exists __ARGS((char_u *fname));
@@ -80,9 +81,10 @@ void add_pathsep __ARGS((char_u *p));
char_u *FullName_save __ARGS((char_u *fname, int force));
pos_T *find_start_comment __ARGS((int ind_maxcomment));
void do_c_expr_indent __ARGS((void));
int cin_islabel __ARGS((int ind_maxcomment));
int cin_islabel __ARGS((void));
int cin_iscase __ARGS((char_u *s, int strict));
int cin_isscopedecl __ARGS((char_u *s));
void parse_cino __ARGS((buf_T *buf));
int get_c_indent __ARGS((void));
int get_expr_indent __ARGS((void));
int get_lisp_indent __ARGS((void));
+1 -1
View File
@@ -59,7 +59,7 @@ int can_bs __ARGS((int what));
void save_file_ff __ARGS((buf_T *buf));
int file_ff_differs __ARGS((buf_T *buf, int ignore_empty));
int check_ff_value __ARGS((char_u *p));
long get_sw_value __ARGS((void));
long get_sw_value __ARGS((buf_T *buf));
long get_sts_value __ARGS((void));
void find_mps_values __ARGS((int *initc, int *findc, int *backwards, int switchit));
/* vim: set ft=c : */
+4 -1
View File
@@ -6455,7 +6455,8 @@ re_num_cmp(val, scan)
/*
* Check whether a backreference matches.
* Returns RA_FAIL, RA_NOMATCH or RA_MATCH.
* If "bytelen" is not NULL, it is set to the bytelength of the whole match.
* If "bytelen" is not NULL, it is set to the byte length of the match in the
* last line.
*/
static int
match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen)
@@ -6511,6 +6512,8 @@ match_with_backref(start_lnum, start_col, end_lnum, end_col, bytelen)
/* Advance to next line. */
reg_nextline();
if (bytelen != NULL)
*bytelen = 0;
++clnum;
ccol = 0;
if (got_int)
+1 -1
View File
@@ -4278,7 +4278,7 @@ addstate(l, state, subs_arg, pim, off)
* endless loop for "\(\)*" */
default:
if (state->lastlist[nfa_ll_index] == l->id)
if (state->lastlist[nfa_ll_index] == l->id && state->c != NFA_SKIP)
{
/* This state is already in the list, don't add it again,
* unless it is an MOPEN that is used for a backreference or
+1 -1
View File
@@ -7460,7 +7460,7 @@ next_search_hl(win, shl, lnum, mincol)
{
/* don't free regprog in the match list, it's a copy */
vim_regfree(shl->rm.regprog);
no_hlsearch = TRUE;
SET_NO_HLSEARCH(TRUE);
}
shl->rm.regprog = NULL;
shl->lnum = 0;
+7 -6
View File
@@ -293,7 +293,7 @@ save_re_pat(idx, pat, magic)
/* If 'hlsearch' set and search pat changed: need redraw. */
if (p_hls)
redraw_all_later(SOME_VALID);
no_hlsearch = FALSE;
SET_NO_HLSEARCH(FALSE);
#endif
}
}
@@ -337,7 +337,7 @@ restore_search_patterns()
spats[1] = saved_spats[1];
last_idx = saved_last_idx;
# ifdef FEAT_SEARCH_EXTRA
no_hlsearch = saved_no_hlsearch;
SET_NO_HLSEARCH(saved_no_hlsearch);
# endif
}
}
@@ -1157,7 +1157,7 @@ do_search(oap, dirc, pat, count, options, tm)
if (no_hlsearch && !(options & SEARCH_KEEP))
{
redraw_all_later(SOME_VALID);
no_hlsearch = FALSE;
SET_NO_HLSEARCH(FALSE);
}
#endif
@@ -4601,7 +4601,7 @@ current_search(count, forward)
ml_get(curwin->w_buffer->b_ml.ml_line_count));
}
}
p_ws = old_p_ws;
}
start_pos = pos;
@@ -4616,7 +4616,6 @@ current_search(count, forward)
if (!VIsual_active)
VIsual = start_pos;
p_ws = old_p_ws;
curwin->w_cursor = pos;
VIsual_active = TRUE;
VIsual_mode = 'v';
@@ -5577,7 +5576,9 @@ read_viminfo_search_pattern(virp, force)
spats[idx].off.off = off;
#ifdef FEAT_SEARCH_EXTRA
if (setlast)
no_hlsearch = !hlsearch_on;
{
SET_NO_HLSEARCH(!hlsearch_on);
}
#endif
}
}
+46 -26
View File
@@ -754,9 +754,9 @@ static int did_set_spelltab;
static void clear_spell_chartab __ARGS((spelltab_T *sp));
static int set_spell_finish __ARGS((spelltab_T *new_st));
static int spell_iswordp __ARGS((char_u *p, win_T *wp));
static int spell_iswordp_nmw __ARGS((char_u *p));
static int spell_iswordp_nmw __ARGS((char_u *p, win_T *wp));
#ifdef FEAT_MBYTE
static int spell_mb_isword_class __ARGS((int cl));
static int spell_mb_isword_class __ARGS((int cl, win_T *wp));
static int spell_iswordp_w __ARGS((int *p, win_T *wp));
#endif
static int write_spell_prefcond __ARGS((FILE *fd, garray_T *gap));
@@ -1149,7 +1149,7 @@ spell_check(wp, ptr, attrp, capcol, docount)
/* When we are at a non-word character there is no error, just
* skip over the character (try looking for a word after it). */
else if (!spell_iswordp_nmw(ptr))
else if (!spell_iswordp_nmw(ptr, wp))
{
if (capcol != NULL && wp->w_s->b_cap_prog != NULL)
{
@@ -1561,7 +1561,7 @@ find_word(mip, mode)
* accept a no-caps word, even when the dictionary
* word specifies ONECAP. */
mb_ptr_back(mip->mi_word, p);
if (spell_iswordp_nmw(p)
if (spell_iswordp_nmw(p, mip->mi_win)
? capflags == WF_ONECAP
: (flags & WF_ONECAP) != 0
&& capflags != WF_ONECAP)
@@ -4234,7 +4234,11 @@ did_set_spelllang(wp)
if (spl_copy == NULL)
goto theend;
/* loop over comma separated language names. */
#ifdef FEAT_MBYTE
wp->w_s->b_cjk = 0;
#endif
/* Loop over comma separated language names. */
for (splp = spl_copy; *splp != NUL; )
{
/* Get one language name. */
@@ -4242,6 +4246,14 @@ did_set_spelllang(wp)
region = NULL;
len = (int)STRLEN(lang);
if (STRCMP(lang, "cjk") == 0)
{
#ifdef FEAT_MBYTE
wp->w_s->b_cjk = 1;
#endif
continue;
}
/* If the name ends in ".spl" use it as the name of the spell file.
* If there is a region name let "region" point to it and remove it
* from the name. */
@@ -4601,7 +4613,7 @@ captype(word, end)
int past_second = FALSE; /* past second word char */
/* find first letter */
for (p = word; !spell_iswordp_nmw(p); mb_ptr_adv(p))
for (p = word; !spell_iswordp_nmw(p, curwin); mb_ptr_adv(p))
if (end == NULL ? *p == NUL : p >= end)
return 0; /* only non-word characters, illegal word */
#ifdef FEAT_MBYTE
@@ -4617,7 +4629,7 @@ captype(word, end)
* But a word with an upper char only at start is a ONECAP.
*/
for ( ; end == NULL ? *p != NUL : p < end; mb_ptr_adv(p))
if (spell_iswordp_nmw(p))
if (spell_iswordp_nmw(p, curwin))
{
c = PTR2CHAR(p);
if (!SPELL_ISUPPER(c))
@@ -9907,7 +9919,7 @@ spell_iswordp(p, wp)
c = mb_ptr2char(s);
if (c > 255)
return spell_mb_isword_class(mb_get_class(s));
return spell_mb_isword_class(mb_get_class(s), wp);
return spelltab.st_isw[c];
}
#endif
@@ -9920,8 +9932,9 @@ spell_iswordp(p, wp)
* Unlike spell_iswordp() this doesn't check for "midword" characters.
*/
static int
spell_iswordp_nmw(p)
spell_iswordp_nmw(p, wp)
char_u *p;
win_T *wp;
{
#ifdef FEAT_MBYTE
int c;
@@ -9930,7 +9943,7 @@ spell_iswordp_nmw(p)
{
c = mb_ptr2char(p);
if (c > 255)
return spell_mb_isword_class(mb_get_class(p));
return spell_mb_isword_class(mb_get_class(p), wp);
return spelltab.st_isw[c];
}
#endif
@@ -9942,11 +9955,16 @@ spell_iswordp_nmw(p)
* Return TRUE if word class indicates a word character.
* Only for characters above 255.
* Unicode subscript and superscript are not considered word characters.
* See also dbcs_class() and utf_class() in mbyte.c.
*/
static int
spell_mb_isword_class(cl)
int cl;
spell_mb_isword_class(cl, wp)
int cl;
win_T *wp;
{
if (wp->w_s->b_cjk)
/* East Asian characters are not considered word characters. */
return cl == 2 || cl == 0x2800;
return cl >= 2 && cl != 0x2070 && cl != 0x2080;
}
@@ -9971,9 +9989,10 @@ spell_iswordp_w(p, wp)
if (*s > 255)
{
if (enc_utf8)
return spell_mb_isword_class(utf_class(*s));
return spell_mb_isword_class(utf_class(*s), wp);
if (enc_dbcs)
return dbcs_class((unsigned)*s >> 8, *s & 0xff) >= 2;
return spell_mb_isword_class(
dbcs_class((unsigned)*s >> 8, *s & 0xff), wp);
return 0;
}
return spelltab.st_isw[*s];
@@ -10193,13 +10212,13 @@ spell_suggest(count)
line = ml_get_curline();
p = line + curwin->w_cursor.col;
/* Backup to before start of word. */
while (p > line && spell_iswordp_nmw(p))
while (p > line && spell_iswordp_nmw(p, curwin))
mb_ptr_back(line, p);
/* Forward to start of word. */
while (*p != NUL && !spell_iswordp_nmw(p))
while (*p != NUL && !spell_iswordp_nmw(p, curwin))
mb_ptr_adv(p);
if (!spell_iswordp_nmw(p)) /* No word found. */
if (!spell_iswordp_nmw(p, curwin)) /* No word found. */
{
beep_flush();
return;
@@ -10436,7 +10455,7 @@ check_need_cap(lnum, col)
for (;;)
{
mb_ptr_back(line, p);
if (p == line || spell_iswordp_nmw(p))
if (p == line || spell_iswordp_nmw(p, curwin))
break;
if (vim_regexec(&regmatch, p, 0)
&& regmatch.endp[0] == line + endcol)
@@ -11645,7 +11664,7 @@ suggest_trie_walk(su, lp, fword, soundfold)
/* When appending a compound word after a word character don't
* use Onecap. */
if (p != NULL && spell_iswordp_nmw(p))
if (p != NULL && spell_iswordp_nmw(p, curwin))
c &= ~WF_ONECAP;
make_case_word(tword + sp->ts_splitoff,
preword + sp->ts_prewordlen, c);
@@ -11895,7 +11914,8 @@ suggest_trie_walk(su, lp, fword, soundfold)
* character when the word ends. But only when the
* good word can end. */
if (((!try_compound && !spell_iswordp_nmw(fword
+ sp->ts_fidx))
+ sp->ts_fidx,
curwin))
|| fword_ends)
&& fword[sp->ts_fidx] != NUL
&& goodword_ends)
@@ -13378,9 +13398,8 @@ add_sound_suggest(su, goodword, score, lp)
/* Lookup the word "orgnr" one of the two tries. */
n = 0;
wlen = 0;
wordcount = 0;
for (;;)
for (wlen = 0; wlen < MAXWLEN - 3; ++wlen)
{
i = 1;
if (wordcount == orgnr && byts[n + 1] == NUL)
@@ -13394,6 +13413,7 @@ add_sound_suggest(su, goodword, score, lp)
if (i > byts[n]) /* safety check */
{
STRCPY(theword + wlen, "BAD");
wlen += 3;
goto badword;
}
@@ -13406,7 +13426,7 @@ add_sound_suggest(su, goodword, score, lp)
wordcount += wc;
}
theword[wlen++] = byts[n + i];
theword[wlen] = byts[n + i];
n = idxs[n + i];
}
badword:
@@ -14226,7 +14246,7 @@ spell_soundfold_sal(slang, inword, res)
}
else
{
if (spell_iswordp_nmw(s))
if (spell_iswordp_nmw(s, curwin))
*t++ = *s;
++s;
}
@@ -14521,7 +14541,7 @@ spell_soundfold_wsal(slang, inword, res)
else
{
did_white = FALSE;
if (!spell_iswordp_nmw(t))
if (!spell_iswordp_nmw(t, curwin))
continue;
}
}
@@ -16045,7 +16065,7 @@ spell_word_start(startcol)
for (p = line + startcol; p > line; )
{
mb_ptr_back(line, p);
if (spell_iswordp_nmw(p))
if (spell_iswordp_nmw(p, curwin))
break;
}
+44
View File
@@ -542,6 +542,7 @@ typedef struct
int keepmarks; /* TRUE when ":keepmarks" was used */
int keepjumps; /* TRUE when ":keepjumps" was used */
int lockmarks; /* TRUE when ":lockmarks" was used */
int keeppatterns; /* TRUE when ":keeppatterns" was used */
# ifdef FEAT_AUTOCMD
char_u *save_ei; /* saved value of 'eventignore' */
# endif
@@ -1309,6 +1310,9 @@ typedef struct {
regprog_T *b_cap_prog; /* program for 'spellcapcheck' */
char_u *b_p_spf; /* 'spellfile' */
char_u *b_p_spl; /* 'spelllang' */
# ifdef FEAT_MBYTE
int b_cjk; /* all CJK letters as OK */
# endif
#endif
#if !defined(FEAT_SYN_HL) && !defined(FEAT_SPELL)
int dummy;
@@ -1627,6 +1631,7 @@ struct file_buffer
char_u *b_p_dict; /* 'dictionary' local value */
char_u *b_p_tsr; /* 'thesaurus' local value */
#endif
long b_p_ul; /* 'undolevels' local value */
#ifdef FEAT_PERSISTENT_UNDO
int b_p_udf; /* 'undofile' */
#endif
@@ -1636,6 +1641,45 @@ struct file_buffer
/* end of buffer options */
#ifdef FEAT_CINDENT
/* values set from b_p_cino */
int b_ind_level;
int b_ind_open_imag;
int b_ind_no_brace;
int b_ind_first_open;
int b_ind_open_extra;
int b_ind_close_extra;
int b_ind_open_left_imag;
int b_ind_jump_label;
int b_ind_case;
int b_ind_case_code;
int b_ind_case_break;
int b_ind_param;
int b_ind_func_type;
int b_ind_comment;
int b_ind_in_comment;
int b_ind_in_comment2;
int b_ind_cpp_baseclass;
int b_ind_continuation;
int b_ind_unclosed;
int b_ind_unclosed2;
int b_ind_unclosed_noignore;
int b_ind_unclosed_wrapped;
int b_ind_unclosed_whiteok;
int b_ind_matching_paren;
int b_ind_paren_prev;
int b_ind_maxparen;
int b_ind_maxcomment;
int b_ind_scopedecl;
int b_ind_scopedecl_code;
int b_ind_java;
int b_ind_js;
int b_ind_keep_case_label;
int b_ind_hash_comment;
int b_ind_cpp_namespace;
int b_ind_if_for_while;
#endif
linenr_T b_no_eol_lnum; /* non-zero lnum when last line of next binary
* write should not have an end-of-line */
+3 -1
View File
@@ -3330,7 +3330,9 @@ jumpto_tag(lbuf, forceit, keep_help)
#ifdef FEAT_SEARCH_EXTRA
/* restore no_hlsearch when keeping the old search pattern */
if (search_options)
no_hlsearch = save_no_hlsearch;
{
SET_NO_HLSEARCH(save_no_hlsearch);
}
#endif
/* Return OK if jumped to another file (at least we found the file!). */
+5 -1
View File
@@ -34,7 +34,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test81.out test82.out test83.out test84.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test97.out test98.out \
test99.out
test99.out test100.out test101.out test102.out test103.out
.SUFFIXES: .in .out
@@ -150,3 +150,7 @@ test96.out: test96.in
test97.out: test97.in
test98.out: test98.in
test99.out: test99.in
test100.out: test100.in
test101.out: test101.in
test102.out: test102.in
test103.out: test103.in
+2 -1
View File
@@ -32,7 +32,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test98.out test99.out
test94.out test95.out test96.out test98.out test99.out \
test100.out test101.out test102.out test103.out
SCRIPTS32 = test50.out test70.out
+2 -1
View File
@@ -52,7 +52,8 @@ SCRIPTS = test3.out test4.out test5.out test6.out test7.out \
test79.out test80.out test81.out test82.out test83.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test98.out test99.out
test94.out test95.out test96.out test98.out test99.out \
test100out test101.out test102.out test103.out
SCRIPTS32 = test50.out test70.out
+2 -1
View File
@@ -34,7 +34,8 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
test76.out test77.out test78.out test79.out test80.out \
test81.out test82.out test83.out test84.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test98.out test99.out
test94.out test95.out test96.out test98.out test99.out \
test100.out test101.out test102.out test103.out
.SUFFIXES: .in .out
+3 -2
View File
@@ -4,7 +4,7 @@
# Authors: Zoltan Arpadffy, <arpadffy@polarhome.com>
# Sandor Kopanyi, <sandor.kopanyi@mailbox.hu>
#
# Last change: 2013 Sep 19
# Last change: 2013 Nov 21
#
# This has been tested on VMS 6.2 to 8.3 on DEC Alpha, VAX and IA64.
# Edit the lines in the Configuration section below to select.
@@ -78,7 +78,8 @@ SCRIPT = test1.out test2.out test3.out test4.out test5.out \
test77.out test78.out test79.out test80.out test81.out \
test82.out test83.out test84.out test88.out test89.out \
test90.out test91.out test92.out test93.out test94.out \
test95.out test96.out test97.out test98.out test99.out
test95.out test96.out test97.out test98.out test99.out \
test100.out test101.out test102.out test103.out
# Known problems:
# Test 30: a problem around mac format - unknown reason
+1 -1
View File
@@ -30,7 +30,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
test84.out test85.out test86.out test87.out test88.out \
test89.out test90.out test91.out test92.out test93.out \
test94.out test95.out test96.out test97.out test98.out \
test99.out
test99.out test100.out test101.out test102.out test103.out
SCRIPTS_GUI = test16.out
+42
View File
@@ -0,0 +1,42 @@
Tests for 'undolevel' setting being global-local
STARTTEST
:so small.vim
:set nocompatible viminfo+=nviminfo ul=5
:fu! FillBuffer()
:for i in range(1,13)
:put=i
:exe "setg ul=" . &g:ul
:endfor
:endfu
:fu! UndoLevel()
:redir @a | setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |redir end
:$put a
:endfu
:new one
:0put ='ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'
:call FillBuffer()
:call feedkeys(":earlier 10\n", 't')
:call UndoLevel()
:%w! test.out
:new two
:0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)'
:setlocal ul=2
:call FillBuffer()
:call feedkeys(":earlier 10\n", 't')
:call UndoLevel()
:setlocal ul=10
:call UndoLevel()
:%w >> test.out
:wincmd p
:redir >>test.out | echo "global value shouldn't be changed and still be 5!" | echo 'ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'|:setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |echo "" |redir end
:new three
:setglobal ul=50
:1put ='global value should be changed to 50'
:2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)'
:call UndoLevel()
:%w >> test.out
:"sleep 10
:qa!
ENDTEST
+41
View File
@@ -0,0 +1,41 @@
ONE: expecting global undolevels: 5, local undolevels: -123456 (default)
1
2
3
4
5
6
7
undolevels=5 global
undolevels=-123456 local
TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)
1
2
3
4
5
6
7
8
9
10
undolevels=5 global
undolevels=2 local
undolevels=5 global
undolevels=10 local
global value shouldn't be changed and still be 5!
ONE: expecting global undolevels: 5, local undolevels: -123456 (default)
undolevels=5 global
undolevels=-123456 local
global value should be changed to 50
THREE: expecting global undolevels: 50, local undolevels: -123456 (default)
undolevels=50 global
undolevels=-123456 local
+45
View File
@@ -0,0 +1,45 @@
Test for v:hlsearch vim: set ft=vim :
STARTTEST
:" Last abc: Q
:so small.vim
:new
:call setline(1, repeat(['aaa'], 10))
:set hlsearch nolazyredraw
:let r=[]
:command -nargs=0 -bar AddR :call add(r, [screenattr(1, 1), v:hlsearch])
/aaa
:AddR
:nohlsearch
:AddR
:let v:hlsearch=1
:AddR
:let v:hlsearch=0
:AddR
:set hlsearch
:AddR
:let v:hlsearch=0
:AddR
n:AddR
:let v:hlsearch=0
:AddR
/
:AddR
:let r1=r[0][0]
:" I guess it is not guaranteed that screenattr outputs always the same character
:call map(r, 'v:val[1].":".(v:val[0]==r1?"highlighted":"not highlighted")')
:try
: let v:hlsearch=[]
:catch
: call add(r, matchstr(v:exception,'^Vim(let):E\d\+:'))
:endtry
:bwipeout!
:$put=r
:call garbagecollect(1)
:"
:/^start:/,$wq! test.out
:" vim: et ts=4 isk-=\:
:call getchar()
ENDTEST
start:
+11
View File
@@ -0,0 +1,11 @@
start:
1:highlighted
0:not highlighted
1:highlighted
0:not highlighted
1:highlighted
0:not highlighted
1:highlighted
0:not highlighted
1:highlighted
Vim(let):E706:
+12
View File
@@ -0,0 +1,12 @@
Test if fnameescape is correct for special chars like !
STARTTEST
:%d
:let fname = 'Xspa ce'
:try | exe "w! " . fnameescape(fname) | put='Space' | endtry
:let fname = 'Xemark!'
:try | exe "w! " . fnameescape(fname) | put='ExclamationMark' | endtry
:w! test.out
:qa!
ENDTEST
+3
View File
@@ -0,0 +1,3 @@
Space
ExclamationMark
+37
View File
@@ -0,0 +1,37 @@
Test for visual mode not being reset causing E315 error.
STARTTEST
:so small.vim
:enew
:let g:msg="Everything's fine."
:function! TriggerTheProblem()
: " At this point there is no visual selection because :call reset it.
: " Let's restore the selection:
: normal gv
: '<,'>del _
: try
: exe "normal \<Esc>"
: catch /^Vim\%((\a\+)\)\=:E315/
: echom 'Snap! E315 error!'
: let g:msg='Snap! E315 error!'
: endtry
:endfunction
:enew
:setl buftype=nofile
:call append(line('$'), 'Delete this line.')
:"
:"
:" NOTE: this has to be done by a call to a function because executing :del the
:" ex-way will require the colon operator which resets the visual mode thus
:" preventing the problem:
:"
GV:call TriggerTheProblem()
:%del _
:call append(line('$'), g:msg)
:w! test.out
:brewind
ENDTEST
STARTTEST
:qa!
ENDTEST
+2
View File
@@ -0,0 +1,2 @@
Everything's fine.
+12 -1
View File
@@ -1,6 +1,7 @@
Test for user functions.
Also test an <expr> mapping calling a function.
Also test that a builtin function cannot be replaced.
Also test for regression when calling arbitrary expression.
STARTTEST
:so small.vim
@@ -62,7 +63,17 @@ XX+-XX
[(one again:call append(line('$'), max([1, 2, 3]))
:call extend(g:, {'max': function('min')})
:call append(line('$'), max([1, 2, 3]))
:$-7,$w! test.out
:try
: " Regression: the first line below used to throw ?E110: Missing ')'?
: " Second is here just to prove that this line is correct when not skipping
: " rhs of &&.
: $put =(0&&(function('tr'))(1, 2, 3))
: $put =(1&&(function('tr'))(1, 2, 3))
:catch
: $put ='!!! Unexpected exception:'
: $put =v:exception
:endtry
:$-9,$w! test.out
:delfunc Table
:delfunc Compute
:delfunc Expr1
+2
View File
@@ -6,3 +6,5 @@ XX111-XX
1. one again
3
3
0
1
+34
View File
@@ -19,6 +19,22 @@ Gllllkkklllrq
:" Test block-change
G$khhhhhkkcmno
:$-4,$w! test.out
:" Test block-insert using cursor keys for movement
/^aaaa/
:exe ":norm! l\<C-V>jjjlllI\<Right>\<Right> \<Esc>"
:/^aa/,/^$/w >> test.out
:" Test for Visual block was created with the last <C-v>$
/^A23$/
:exe ":norm! l\<C-V>j$Aab\<Esc>"
:.,/^$/w >> test.out
:" Test for Visual block was created with the middle <C-v>$ (1)
/^B23$/
:exe ":norm! l\<C-V>j$hAab\<Esc>"
:.,/^$/w >> test.out
:" Test for Visual block was created with the middle <C-v>$ (2)
/^C23$/
:exe ":norm! l\<C-V>j$hhAab\<Esc>"
:.,/^$/w >> test.out
:" gUe must uppercase a whole word, also when ß changes to SS
Gothe youtußeuu endYpk0wgUe
:" gUfx must uppercase until x, inclusive.
@@ -32,10 +48,28 @@ Oblah di
doh dutVkUj
:" Uppercase part of two lines
ddppi333k0i222fyllvjfuUk
:" visual replace using Enter or NL
G3o1234567892k05l2jr G3o987652k02l2jr
G3o1234567892k05l2jr
G3o987652k02l2jr
:/^the/,$w >> test.out
:qa!
ENDTEST
aaaaaa
bbbbbb
cccccc
dddddd
A23
4567
B23
4567
C23
4567
abcdefghijklm
abcdefghijklm
abcdefghijklm
Binary file not shown.
+3
View File
@@ -406,6 +406,7 @@ STARTTEST
:call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<!$', 'foo.bat/foo.bat'])
:call add(tl, [2, '^.*\.\(.*\)/.\+\(\1\)\@<=$', 'foo.bat/foo.bat', 'foo.bat/foo.bat', 'bat', 'bat'])
:call add(tl, [2, '\\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}', '2013-06-27${0}', '${0}', '0'])
:call add(tl, [2, '^\(a*\)\1$', 'aaaaaaaa', 'aaaaaaaa', 'aaaa'])
:"
:"""" Look-behind with limit
:call add(tl, [2, '<\@<=span.', 'xxspanxx<spanyyy', 'spany'])
@@ -506,6 +507,8 @@ STARTTEST
:" Check a pattern with a line break and ^ and $
:call add(tl, [2, 'a\n^b$\n^c', ['a', 'b', 'c'], ['XX']])
:"
:call add(tl, [2, '\(^.\+\n\)\1', [' dog', ' dog', 'asdf'], ['XXasdf']])
:"
:"""" Run the multi-line tests
:"
:$put ='multi-line tests'
+6
View File
@@ -944,6 +944,9 @@ OK 2 - ^.*\.\(.*\)/.\+\(\1\)\@<=$
OK 0 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
OK 1 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
OK 2 - \\\@<!\${\(\d\+\%(:.\{-}\)\?\\\@<!\)}
OK 0 - ^\(a*\)\1$
OK 1 - ^\(a*\)\1$
OK 2 - ^\(a*\)\1$
OK 0 - <\@<=span.
OK 1 - <\@<=span.
OK 2 - <\@<=span.
@@ -1028,6 +1031,9 @@ OK 2 - \<\(\(25\_[0-5]\|2\_[0-4]\_[0-9]\|\_[01]\?\_[0-9]\_[0-9]\?\)\.\)\{3\}\(25
OK 0 - a\n^b$\n^c
OK 1 - a\n^b$\n^c
OK 2 - a\n^b$\n^c
OK 0 - \(^.\+\n\)\1
OK 1 - \(^.\+\n\)\1
OK 2 - \(^.\+\n\)\1
<T="5">Ta 5</Title>
<T="7">Ac 7</Title>
+16
View File
@@ -1,6 +1,7 @@
Test for multi-byte text formatting.
Also test, that 'mps' with multibyte chars works.
And test "ra" on multi-byte characters.
Also test byteidx() and byteidxcomp()
STARTTEST
:so mbyte.vim
@@ -153,6 +154,21 @@ ra test
bb
aab
STARTTEST
:let a = '.é.' " one char of two bytes
:let b = '.é.' " normal e with composing char
/^byteidx
:put =string([byteidx(a, 0), byteidx(a, 1), byteidx(a, 2), byteidx(a, 3), byteidx(a, 4)])
:put =string([byteidx(b, 0), byteidx(b, 1), byteidx(b, 2), byteidx(b, 3), byteidx(b, 4)])
/^byteidxcomp
:put =string([byteidxcomp(a, 0), byteidxcomp(a, 1), byteidxcomp(a, 2), byteidxcomp(a, 3), byteidxcomp(a, 4)])
:let b = '.é.'
:put =string([byteidxcomp(b, 0), byteidxcomp(b, 1), byteidxcomp(b, 2), byteidxcomp(b, 3), byteidxcomp(b, 4), byteidxcomp(b, 5)])
ENDTEST
byteidx
byteidxcomp
STARTTEST
:g/^STARTTEST/.,/^ENDTEST/d
:1;/^Results/,$wq! test.out
+8
View File
@@ -149,3 +149,11 @@ ra test
aaaa
aaa
byteidx
[0, 1, 3, 4, -1]
[0, 1, 4, 5, -1]
byteidxcomp
[0, 1, 3, 4, -1]
[0, 1, 2, 4, 5, -1]
+1 -1
View File
@@ -1,4 +1,4 @@
" Tests for functions.
Tests for maparg().
STARTTEST
:so small.vim
+34
View File
@@ -1088,6 +1088,9 @@ ee('d.get("a", 2, 3)')
stringtochars_test('d.get(%s)')
ee('d.pop("a")')
ee('dl.pop("a")')
cb.append(">> DictionaryContains")
ee('"" in d')
ee('0 in d')
cb.append(">> DictionaryIterNext")
ee('for i in ned: ned["a"] = 1')
del i
@@ -1278,6 +1281,37 @@ del Exe
EOF
:delfunction Exe
:"
:" Regression: interrupting vim.command propagates to next vim.command
py << EOF
def test_keyboard_interrupt():
try:
vim.command('while 1 | endwhile')
except KeyboardInterrupt:
cb.append('Caught KeyboardInterrupt')
except Exception:
cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
else:
cb.append('!!!!!!!! No exception')
try:
vim.command('$ put =\'Running :put\'')
except KeyboardInterrupt:
cb.append('!!!!!!!! Caught KeyboardInterrupt')
except Exception:
cb.append('!!!!!!!! Caught exception: ' + repr(sys.exc_info))
else:
cb.append('No exception')
EOF
:debuggreedy
:call inputsave()
:call feedkeys("s\ns\ns\ns\nq\n")
:redir => output
:debug silent! py test_keyboard_interrupt()
:redir END
:0 debuggreedy
:silent $put =output
:unlet output
:py del test_keyboard_interrupt
:"
:" Cleanup
py << EOF
del cb

Some files were not shown because too many files have changed in this diff Show More