mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
@@ -543,7 +543,6 @@ SRC_DOS = \
|
||||
tools/rename.bat \
|
||||
src/bigvim.bat \
|
||||
src/bigvim64.bat \
|
||||
src/msvcsetup.bat \
|
||||
src/msvc2008.bat \
|
||||
src/msvc2010.bat \
|
||||
src/msvc2015.bat \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2022 Jan 15
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2022 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1218,7 +1218,7 @@ TextYankPost After text has been yanked or deleted in the
|
||||
Not triggered when |quote_| is used nor when
|
||||
called recursively.
|
||||
It is not allowed to change the buffer text,
|
||||
see |textlock|.
|
||||
see |textlock|. *E1064*
|
||||
{only when compiled with the +eval feature}
|
||||
|
||||
*User*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 8.2. Last change: 2022 Jan 16
|
||||
*builtin.txt* For Vim version 8.2. Last change: 2022 Jan 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2882,7 +2882,7 @@ get({dict}, {key} [, {default}])
|
||||
Preferably used as a |method|: >
|
||||
mydict->get(key)
|
||||
get({func}, {what})
|
||||
Get an item with from Funcref {func}. Possible values for
|
||||
Get item {what} from Funcref {func}. Possible values for
|
||||
{what} are:
|
||||
"name" The function name
|
||||
"func" The function
|
||||
@@ -6396,8 +6396,8 @@ readdir({directory} [, {expr} [, {dict}]]) *readdir()*
|
||||
readdir(dirname, {n -> n =~ '.txt$'})
|
||||
< To skip hidden and backup files: >
|
||||
readdir(dirname, {n -> n !~ '^\.\|\~$'})
|
||||
|
||||
< The optional {dict} argument allows for further custom
|
||||
< *E857*
|
||||
The optional {dict} argument allows for further custom
|
||||
values. Currently this is used to specify if and how sorting
|
||||
should be performed. The dict can have the following members:
|
||||
|
||||
@@ -9498,7 +9498,6 @@ win_execute({id}, {command} [, {silent}]) *win_execute()*
|
||||
call win_execute(winid, 'set syntax=python')
|
||||
< Doing the same with `setwinvar()` would not trigger
|
||||
autocommands and not actually show syntax highlighting.
|
||||
|
||||
*E994*
|
||||
Not all commands are allowed in popup windows.
|
||||
When window {id} does not exist then no error is given and
|
||||
|
||||
+12
-6
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 8.2. Last change: 2021 May 24
|
||||
*diff.txt* For Vim version 8.2. Last change: 2022 Jan 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -335,8 +335,9 @@ After setting this variable, reload the syntax script: >
|
||||
|
||||
FINDING THE DIFFERENCES *diff-diffexpr*
|
||||
|
||||
The 'diffexpr' option can be set to use something else than the standard
|
||||
"diff" program to compare two files and find the differences. *E959*
|
||||
The 'diffexpr' option can be set to use something else than the internal diff
|
||||
support or the standard "diff" program to compare two files and find the
|
||||
differences. *E959*
|
||||
|
||||
When 'diffexpr' is empty, Vim uses this command to find the differences
|
||||
between file1 and file2: >
|
||||
@@ -369,7 +370,7 @@ format mentioned. These variables are set to the file names used:
|
||||
|
||||
v:fname_in original file
|
||||
v:fname_new new version of the same file
|
||||
v:fname_out resulting diff file
|
||||
v:fname_out where to write the resulting diff file
|
||||
|
||||
Additionally, 'diffexpr' should take care of "icase" and "iwhite" in the
|
||||
'diffopt' option. 'diffexpr' cannot change the value of 'lines' and
|
||||
@@ -402,7 +403,9 @@ If the 'diffexpr' expression starts with s: or |<SID>|, then it is replaced
|
||||
with the script ID (|local-function|). Example: >
|
||||
set diffexpr=s:MyDiffExpr()
|
||||
set diffexpr=<SID>SomeDiffExpr()
|
||||
<
|
||||
Otherwise, the expression is evaluated in the context of the script where the
|
||||
option was set, thus script-local items are available.
|
||||
|
||||
*E810* *E97*
|
||||
Vim will do a test if the diff output looks alright. If it doesn't, you will
|
||||
get an error message. Possible causes:
|
||||
@@ -458,5 +461,8 @@ If the 'patchexpr' expression starts with s: or |<SID>|, then it is replaced
|
||||
with the script ID (|local-function|). Example: >
|
||||
set patchexpr=s:MyPatchExpr()
|
||||
set patchexpr=<SID>SomePatchExpr()
|
||||
<
|
||||
Otherwise, the expression is evaluated in the context of the script where the
|
||||
option was set, thus script-local items are available.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.2. Last change: 2022 Jan 11
|
||||
*editing.txt* For Vim version 8.2. Last change: 2022 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -433,7 +433,7 @@ This also works for most other systems, with the restriction that the
|
||||
backticks must be around the whole item. It is not possible to have text
|
||||
directly before the first or just after the last backtick.
|
||||
|
||||
*`=*
|
||||
*`=* *E1083*
|
||||
You can have the backticks expanded as a Vim expression, instead of as an
|
||||
external command, by putting an equal sign right after the first backtick,
|
||||
e.g.: >
|
||||
@@ -890,7 +890,7 @@ Note: When the 'write' option is off, you are not able to write any file.
|
||||
|
||||
*:w* *:write*
|
||||
*E502* *E503* *E504* *E505*
|
||||
*E512* *E514* *E667* *E796* *E949*
|
||||
*E512* *E514* *E667* *E949*
|
||||
:w[rite] [++opt] Write the whole buffer to the current file. This is
|
||||
the normal way to save changes to a file. It fails
|
||||
when the 'readonly' option is set or when there is
|
||||
|
||||
+40
-20
@@ -1,11 +1,11 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2022 Jan 08
|
||||
*eval.txt* For Vim version 8.2. Last change: 2022 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
Expression evaluation *expression* *expr* *E15* *eval*
|
||||
|
||||
*E1002*
|
||||
Using expressions is introduced in chapter 41 of the user manual |usr_41.txt|.
|
||||
|
||||
Note: Expression evaluation can be disabled at compile time. If this has been
|
||||
@@ -53,7 +53,7 @@ Number A 32 or 64 bit signed number. |expr-number|
|
||||
Examples: -123 0x10 0177 0o177 0b1011
|
||||
|
||||
Float A floating point number. |floating-point-format| *Float*
|
||||
{only when compiled with the |+float| feature}
|
||||
{only when compiled with the |+float| feature} *E1076*
|
||||
Examples: 123.456 1.15e-6 -1.1e3
|
||||
|
||||
String A NUL terminated string of 8-bit unsigned characters (bytes).
|
||||
@@ -1030,7 +1030,7 @@ is |true| or |false|.
|
||||
*expr-==?* *expr-!=?* *expr->?* *expr->=?*
|
||||
*expr-<?* *expr-<=?* *expr-=~?* *expr-!~?*
|
||||
*expr-is* *expr-isnot* *expr-is#* *expr-isnot#*
|
||||
*expr-is?* *expr-isnot?*
|
||||
*expr-is?* *expr-isnot?* *E1072*
|
||||
use 'ignorecase' match case ignore case ~
|
||||
equal == ==# ==?
|
||||
not equal != !=# !=?
|
||||
@@ -1071,7 +1071,7 @@ To compare Funcrefs to see if they refer to the same function, ignoring bound
|
||||
Dictionary and arguments, use |get()| to get the function name: >
|
||||
if get(Part1, 'name') == get(Part2, 'name')
|
||||
" Part1 and Part2 refer to the same function
|
||||
|
||||
< *E1037*
|
||||
Using "is" or "isnot" with a |List|, |Dictionary| or |Blob| checks whether
|
||||
the expressions are referring to the same |List|, |Dictionary| or |Blob|
|
||||
instance. A copy of a |List| is different from the original |List|. When
|
||||
@@ -1123,7 +1123,7 @@ can be matched like an ordinary character. Examples:
|
||||
"foo\nbar" =~ "\\n" evaluates to 0
|
||||
|
||||
|
||||
expr5 and expr6 *expr5* *expr6*
|
||||
expr5 and expr6 *expr5* *expr6* *E1036* *E1051*
|
||||
---------------
|
||||
expr6 + expr6 Number addition, |List| or |Blob| concatenation *expr-+*
|
||||
expr6 - expr6 Number subtraction *expr--*
|
||||
@@ -1182,7 +1182,7 @@ When the righthand side of '%' is zero, the result is 0.
|
||||
|
||||
None of these work for |Funcref|s.
|
||||
|
||||
".", ".." and "%" do not work for Float. *E804*
|
||||
".", ".." and "%" do not work for Float. *E804* *E1035*
|
||||
|
||||
|
||||
expr7 *expr7*
|
||||
@@ -1229,7 +1229,7 @@ in any order. E.g., these are all possible:
|
||||
Evaluation is always from left to right.
|
||||
|
||||
expr9[expr1] item of String or |List| *expr-[]* *E111*
|
||||
*E909* *subscript*
|
||||
*E909* *subscript* *E1062*
|
||||
In legacy Vim script:
|
||||
If expr9 is a Number or String this results in a String that contains the
|
||||
expr1'th single byte from expr9. expr9 is used as a String (a number is
|
||||
@@ -1364,7 +1364,16 @@ Is equivalent to: >
|
||||
(-1.234)->string()
|
||||
And NOT: >
|
||||
-(1.234->string())
|
||||
<
|
||||
|
||||
What comes after "->" can be a name, a simple expression (not containing any
|
||||
parenthesis), or any expression in parenthesis: >
|
||||
base->name(args)
|
||||
base->some.name(args)
|
||||
base->alist[idx](args)
|
||||
base->(getFuncRef())(args)
|
||||
Note that in the last call the base is passed to the function resulting from
|
||||
"(getFuncRef())", inserted before "args".
|
||||
|
||||
*E274*
|
||||
"->name(" must not contain white space. There can be white space before the
|
||||
"->" and after the "(", thus you can split the lines like this: >
|
||||
@@ -1568,7 +1577,7 @@ The first one probably doesn't echo anything, the second echoes the $shell
|
||||
variable (if your shell supports it).
|
||||
|
||||
|
||||
internal variable *expr-variable*
|
||||
internal variable *expr-variable* *E1015*
|
||||
-----------------
|
||||
variable internal variable
|
||||
See below |internal-variables|.
|
||||
@@ -1656,7 +1665,7 @@ for a lambda expression, you can find what it is with the following command: >
|
||||
See also: |numbered-function|
|
||||
|
||||
==============================================================================
|
||||
3. Internal variable *internal-variables* *E461*
|
||||
3. Internal variable *internal-variables* *E461* *E1001*
|
||||
|
||||
An internal variable name can be made up of letters, digits and '_'. But it
|
||||
cannot start with a digit. In legacy script it is also possible to use curly
|
||||
@@ -1814,7 +1823,7 @@ variables for each buffer. Use local buffer variables instead |b:var|.
|
||||
|
||||
|
||||
PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
|
||||
*E963*
|
||||
*E963* *E1063*
|
||||
Some variables can be set by the user, but the type cannot be changed.
|
||||
|
||||
*v:argv* *argv-variable*
|
||||
@@ -2842,7 +2851,7 @@ This function can then be called with: >
|
||||
: echo div
|
||||
:endif
|
||||
<
|
||||
*:cal* *:call* *E107* *E117*
|
||||
*:cal* *:call* *E107*
|
||||
:[range]cal[l] {name}([arguments])
|
||||
Call a function. The name of the function and its arguments
|
||||
are as specified with `:function`. Up to 20 arguments can be
|
||||
@@ -2886,6 +2895,12 @@ This function can then be called with: >
|
||||
:4,8call GetDict().method()
|
||||
< Here GetDict() gets the range but method() does not.
|
||||
|
||||
*E117*
|
||||
When a function cannot be found the error "E117: Unknown function" will be
|
||||
given. If the function was using an autoload path or an autoload import and
|
||||
the script is a |Vim9| script, this may also be caused by the function not
|
||||
being exported.
|
||||
|
||||
*E132*
|
||||
The recursiveness of user functions is restricted with the |'maxfuncdepth'|
|
||||
option.
|
||||
@@ -2985,6 +3000,9 @@ Also note that if you have two script files, and one calls a function in the
|
||||
other and vice versa, before the used function is defined, it won't work.
|
||||
Avoid using the autoload functionality at the toplevel.
|
||||
|
||||
In |Vim9| script you will get error *E1263* if you use a function name with a
|
||||
"#" character when not in an autoload script.
|
||||
|
||||
Hint: If you distribute a bunch of scripts you can pack them together with the
|
||||
|vimball| utility. Also read the user manual |distribute-script|.
|
||||
|
||||
@@ -3071,8 +3089,8 @@ declarations and assignments do not use a command. |vim9-declaration|
|
||||
When the selected range of items is partly past the
|
||||
end of the list, items will be added.
|
||||
|
||||
*:let+=* *:let-=* *:letstar=*
|
||||
*:let/=* *:let%=* *:let.=* *:let..=* *E734* *E985*
|
||||
*:let+=* *:let-=* *:letstar=* *:let/=* *:let%=*
|
||||
*:let.=* *:let..=* *E734* *E985* *E1019*
|
||||
:let {var} += {expr1} Like ":let {var} = {var} + {expr1}".
|
||||
:let {var} -= {expr1} Like ":let {var} = {var} - {expr1}".
|
||||
:let {var} *= {expr1} Like ":let {var} = {var} * {expr1}".
|
||||
@@ -3275,7 +3293,7 @@ text...
|
||||
* Funcref
|
||||
This does not work in Vim9 script. |vim9-declaration|
|
||||
|
||||
:unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795*
|
||||
:unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795* *E1081*
|
||||
Remove the internal variable {name}. Several variable
|
||||
names can be given, they are all removed. The name
|
||||
may also be a |List| or |Dictionary| item.
|
||||
@@ -3301,7 +3319,7 @@ text...
|
||||
If the system does not support deleting an environment
|
||||
variable, it is made empty.
|
||||
|
||||
*:cons* *:const*
|
||||
*:cons* *:const* *E1018*
|
||||
:cons[t] {var-name} = {expr1}
|
||||
:cons[t] [{name1}, {name2}, ...] = {expr1}
|
||||
:cons[t] [{name}, ..., ; {lastname}] = {expr1}
|
||||
@@ -3521,7 +3539,8 @@ text...
|
||||
all nested ":try"s inside the loop. The outermost
|
||||
":endtry" then jumps to the command after the loop.
|
||||
|
||||
:try *:try* *:endt* *:endtry* *E600* *E601* *E602*
|
||||
:try *:try* *:endt* *:endtry*
|
||||
*E600* *E601* *E602* *E1032*
|
||||
:endt[ry] Change the error handling for the commands between
|
||||
":try" and ":endtry" including everything being
|
||||
executed across ":source" commands, function calls,
|
||||
@@ -3557,7 +3576,8 @@ text...
|
||||
try | sleep 100 | catch /^Vim:Interrupt$/ | endtry
|
||||
try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry
|
||||
<
|
||||
*:cat* *:catch* *E603* *E604* *E605*
|
||||
*:cat* *:catch*
|
||||
*E603* *E604* *E605* *E654* *E1033*
|
||||
:cat[ch] /{pattern}/ The following commands until the next |:catch|,
|
||||
|:finally|, or |:endtry| that belongs to the same
|
||||
|:try| as the ":catch" are executed when an exception
|
||||
@@ -3578,7 +3598,7 @@ text...
|
||||
Another character can be used instead of / around the
|
||||
{pattern}, so long as it does not have a special
|
||||
meaning (e.g., '|' or '"') and doesn't occur inside
|
||||
{pattern}.
|
||||
{pattern}. *E1067*
|
||||
Information about the exception is available in
|
||||
|v:exception|. Also see |throw-variables|.
|
||||
NOTE: It is not reliable to ":catch" the TEXT of
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2021 Dec 30
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2022 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -133,14 +133,15 @@ shell script: "#!/bin/csh".
|
||||
argument was used.
|
||||
|
||||
*filetype-overrule*
|
||||
When the same extension is used for two filetypes, Vim tries to guess what
|
||||
kind of file it is. This doesn't always work. A number of global variables
|
||||
can be used to overrule the filetype used for certain extensions:
|
||||
When the same extension is used for multiple filetypes, Vim tries to guess
|
||||
what kind of file it is. This doesn't always work. A number of global
|
||||
variables can be used to overrule the filetype used for certain extensions:
|
||||
|
||||
file name variable ~
|
||||
*.asa g:filetype_asa |ft-aspvbs-syntax| |ft-aspperl-syntax|
|
||||
*.asm g:asmsyntax |ft-asm-syntax|
|
||||
*.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
|
||||
*.bas g:filetype_bas |ft-basic-syntax|
|
||||
*.fs g:filetype_fs |ft-forth-syntax|
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
*.inc g:filetype_inc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 8.2. Last change: 2021 Jul 13
|
||||
*fold.txt* For Vim version 8.2. Last change: 2022 Jan 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -511,7 +511,10 @@ Note the use of backslashes to avoid some characters to be interpreted by the
|
||||
:endfunction
|
||||
|
||||
Evaluating 'foldtext' is done in the |sandbox|. The current window is set to
|
||||
the window that displays the line. Errors are ignored.
|
||||
the window that displays the line. The context is set to the script where the
|
||||
option was last set.
|
||||
|
||||
Errors are ignored. For debugging set the 'debug' option to "throw".
|
||||
|
||||
The default value is |foldtext()|. This returns a reasonable text for most
|
||||
types of folding. If you don't like it, you can specify your own 'foldtext'
|
||||
|
||||
+4
-2
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.2. Last change: 2022 Jan 15
|
||||
*map.txt* For Vim version 8.2. Last change: 2022 Jan 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1411,7 +1411,7 @@ scripts.
|
||||
|
||||
*:command-verbose*
|
||||
When 'verbose' is non-zero, listing a command will also display where it was
|
||||
last defined. Example: >
|
||||
last defined and any completion argument. Example: >
|
||||
|
||||
:verbose command TOhtml
|
||||
< Name Args Range Complete Definition ~
|
||||
@@ -1530,6 +1530,8 @@ completion can be enabled:
|
||||
-complete=custom,{func} custom completion, defined via {func}
|
||||
-complete=customlist,{func} custom completion, defined via {func}
|
||||
|
||||
If you specify completion while there is nothing to complete (-nargs=0, the
|
||||
default) then you get error *E1208* .
|
||||
Note: That some completion methods might expand environment variables.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 8.2. Last change: 2022 Jan 08
|
||||
*mbyte.txt* For Vim version 8.2. Last change: 2022 Jan 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
|
||||
+231
-230
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 8.2. Last change: 2022 Jan 08
|
||||
*message.txt* For Vim version 8.2. Last change: 2022 Jan 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -46,13 +46,13 @@ maintains the messages or the translations. You can use this to contact the
|
||||
maintainer when you spot a mistake.
|
||||
|
||||
If you want to find help on a specific (error) message, use the ID at the
|
||||
start of the message. For example, to get help on the message: >
|
||||
start of the message. For example, to get help on the message:
|
||||
|
||||
E72: Close error on swap file
|
||||
E72: Close error on swap file ~
|
||||
|
||||
or (translated): >
|
||||
or (translated):
|
||||
|
||||
E72: Errore durante chiusura swap file
|
||||
E72: Errore durante chiusura swap file ~
|
||||
|
||||
Use: >
|
||||
|
||||
@@ -62,6 +62,8 @@ If you are lazy, it also works without the shift key: >
|
||||
|
||||
:help e72
|
||||
|
||||
The number in this ID has no meaning.
|
||||
|
||||
==============================================================================
|
||||
2. Error messages *error-messages* *errors*
|
||||
|
||||
@@ -76,117 +78,117 @@ See `:messages` above.
|
||||
LIST OF MESSAGES
|
||||
*E222* *E228* *E232* *E293* *E298* *E304* *E317*
|
||||
*E318* *E356* *E438* *E439* *E440* *E316* *E320* *E322*
|
||||
*E323* *E341* *E473* *E570* *E685* *E292* >
|
||||
Add to read buffer
|
||||
makemap: Illegal mode
|
||||
Cannot create BalloonEval with both message and callback
|
||||
Hangul automata ERROR
|
||||
block was not locked
|
||||
Didn't get block nr {N}?
|
||||
ml_upd_block0(): Didn't get block 0??
|
||||
pointer block id wrong {N}
|
||||
Updated too many blocks?
|
||||
get_varp ERROR
|
||||
u_undo: line numbers wrong
|
||||
undo list corrupt
|
||||
undo line missing
|
||||
ml_get: cannot find line {N}
|
||||
cannot find line {N}
|
||||
line number out of range: {N} past the end
|
||||
line count wrong in block {N}
|
||||
Internal error
|
||||
Internal error: {function}
|
||||
fatal error in cs_manage_matches
|
||||
Invalid count for del_bytes(): {N}
|
||||
*E323* *E341* *E473* *E570* *E685* *E292*
|
||||
Add to read buffer ~
|
||||
makemap: Illegal mode ~
|
||||
Cannot create BalloonEval with both message and callback ~
|
||||
Hangul automata ERROR ~
|
||||
block was not locked ~
|
||||
Didn't get block nr {N}? ~
|
||||
ml_upd_block0(): Didn't get block 0?? ~
|
||||
pointer block id wrong {N} ~
|
||||
Updated too many blocks? ~
|
||||
get_varp ERROR ~
|
||||
u_undo: line numbers wrong ~
|
||||
undo list corrupt ~
|
||||
undo line missing ~
|
||||
ml_get: cannot find line {N} ~
|
||||
cannot find line {N} ~
|
||||
line number out of range: {N} past the end ~
|
||||
line count wrong in block {N} ~
|
||||
Internal error ~
|
||||
Internal error: {function} ~
|
||||
fatal error in cs_manage_matches ~
|
||||
Invalid count for del_bytes(): {N} ~
|
||||
|
||||
This is an internal error. If you can reproduce it, please send in a bug
|
||||
report. |bugs|
|
||||
|
||||
>
|
||||
ATTENTION
|
||||
Found a swap file by the name ...
|
||||
|
||||
ATTENTION ~
|
||||
Found a swap file by the name ... ~
|
||||
|
||||
See |ATTENTION|.
|
||||
|
||||
*E92* >
|
||||
Buffer {N} not found
|
||||
*E92*
|
||||
Buffer {N} not found ~
|
||||
|
||||
The buffer you requested does not exist. This can also happen when you have
|
||||
wiped out a buffer which contains a mark or is referenced in another way.
|
||||
|:bwipeout|
|
||||
|
||||
*E95* >
|
||||
Buffer with this name already exists
|
||||
*E95*
|
||||
Buffer with this name already exists ~
|
||||
|
||||
You cannot have two buffers with exactly the same name. This includes the
|
||||
path leading to the file.
|
||||
|
||||
*E72* >
|
||||
Close error on swap file
|
||||
*E72*
|
||||
Close error on swap file ~
|
||||
|
||||
The |swap-file|, that is used to keep a copy of the edited text, could not be
|
||||
closed properly. Mostly harmless.
|
||||
|
||||
*E169* >
|
||||
Command too recursive
|
||||
*E169*
|
||||
Command too recursive ~
|
||||
|
||||
This happens when an Ex command executes an Ex command that executes an Ex
|
||||
command, etc. The limit is 200 or the value of 'maxfuncdepth', whatever is
|
||||
larger. When it's more there probably is an endless loop. Probably a
|
||||
|:execute| or |:source| command is involved.
|
||||
|
||||
*E254* >
|
||||
Cannot allocate color {name}
|
||||
*E254*
|
||||
Cannot allocate color {name} ~
|
||||
|
||||
The color name {name} is unknown. See |gui-colors| for a list of colors that
|
||||
are available on most systems.
|
||||
|
||||
*E1244* >
|
||||
Bad color string: {str}
|
||||
*E1244*
|
||||
Bad color string: {str} ~
|
||||
|
||||
The provided color did not conform to the pattern #rrggbb
|
||||
|
||||
*E458* >
|
||||
Cannot allocate colormap entry, some colors may be incorrect
|
||||
*E458*
|
||||
Cannot allocate colormap entry, some colors may be incorrect ~
|
||||
|
||||
This means that there are not enough colors available for Vim. It will still
|
||||
run, but some of the colors will not appear in the specified color. Try
|
||||
stopping other applications that use many colors, or start them after starting
|
||||
gvim.
|
||||
Browsers are known to consume a lot of colors. You can avoid this with
|
||||
netscape by telling it to use its own colormap: >
|
||||
netscape -install
|
||||
Or tell it to limit to a certain number of colors (64 should work well): >
|
||||
netscape -ncols 64
|
||||
This can also be done with a line in your Xdefaults file: >
|
||||
Netscape*installColormap: Yes
|
||||
or >
|
||||
Netscape*maxImageColors: 64
|
||||
<
|
||||
*E79* >
|
||||
Cannot expand wildcards
|
||||
netscape by telling it to use its own colormap:
|
||||
netscape -install ~
|
||||
Or tell it to limit to a certain number of colors (64 should work well):
|
||||
netscape -ncols 64 ~
|
||||
This can also be done with a line in your Xdefaults file:
|
||||
Netscape*installColormap: Yes ~
|
||||
or
|
||||
Netscape*maxImageColors: 64 ~
|
||||
|
||||
*E79*
|
||||
Cannot expand wildcards ~
|
||||
|
||||
A filename contains a strange combination of characters, which causes Vim to
|
||||
attempt expanding wildcards but this fails. This does NOT mean that no
|
||||
matching file names could be found, but that the pattern was illegal.
|
||||
|
||||
*E459* >
|
||||
Cannot go back to previous directory
|
||||
*E459*
|
||||
Cannot go back to previous directory ~
|
||||
|
||||
While expanding a file name, Vim failed to go back to the previously used
|
||||
directory. All file names being used may be invalid now! You need to have
|
||||
execute permission on the current directory.
|
||||
|
||||
*E190* *E212* >
|
||||
Cannot open "{filename}" for writing
|
||||
Can't open file for writing
|
||||
*E190* *E212*
|
||||
Cannot open "{filename}" for writing ~
|
||||
Can't open file for writing ~
|
||||
|
||||
For some reason the file you are writing to cannot be created or overwritten.
|
||||
The reason could be that you do not have permission to write in the directory
|
||||
or the file name is not valid.
|
||||
|
||||
*E166* >
|
||||
Can't open linked file for writing
|
||||
*E166*
|
||||
Can't open linked file for writing ~
|
||||
|
||||
You are trying to write to a file which can't be overwritten, and the file is
|
||||
a link (either a hard link or a symbolic link). Writing might still be
|
||||
@@ -197,20 +199,20 @@ place. If you really want to write the file under this name, you have to
|
||||
manually delete the link or the file, or change the permissions so that Vim
|
||||
can overwrite.
|
||||
|
||||
*E46* >
|
||||
Cannot change read-only variable "{name}"
|
||||
*E46*
|
||||
Cannot change read-only variable "{name}" ~
|
||||
|
||||
You are trying to assign a value to an argument of a function |a:var| or a Vim
|
||||
internal variable |v:var| which is read-only.
|
||||
|
||||
*E90* >
|
||||
Cannot unload last buffer
|
||||
*E90*
|
||||
Cannot unload last buffer ~
|
||||
|
||||
Vim always requires one buffer to be loaded, otherwise there would be nothing
|
||||
to display in the window.
|
||||
|
||||
*E40* >
|
||||
Can't open errorfile <filename>
|
||||
*E40*
|
||||
Can't open errorfile <filename> ~
|
||||
|
||||
When using the ":make" or ":grep" commands: The file used to save the error
|
||||
messages or grep output cannot be opened. This can have several causes:
|
||||
@@ -222,8 +224,8 @@ messages or grep output cannot be opened. This can have several causes:
|
||||
- The 'grepprg' or 'makeprg' could not be executed. This cannot always be
|
||||
detected (especially on MS-Windows). Check your $PATH.
|
||||
|
||||
>
|
||||
Can't open file C:\TEMP\VIoD243.TMP
|
||||
|
||||
Can't open file C:\TEMP\VIoD243.TMP ~
|
||||
|
||||
On MS-Windows, this message appears when the output of an external command was
|
||||
to be read, but the command didn't run successfully. This can be caused by
|
||||
@@ -231,21 +233,21 @@ many things. Check the 'shell', 'shellquote', 'shellxquote', 'shellslash' and
|
||||
related options. It might also be that the external command was not found,
|
||||
there is no different error message for that.
|
||||
|
||||
*E12* >
|
||||
Command not allowed from exrc/vimrc in current dir or tag search
|
||||
*E12*
|
||||
Command not allowed from exrc/vimrc in current dir or tag search ~
|
||||
|
||||
Some commands are not allowed for security reasons. These commands mostly
|
||||
come from a .exrc or .vimrc file in the current directory, or from a tags
|
||||
file. Also see 'secure'.
|
||||
|
||||
*E74* >
|
||||
Command too complex
|
||||
*E74*
|
||||
Command too complex ~
|
||||
|
||||
A mapping resulted in a very long command string. Could be caused by a
|
||||
mapping that indirectly calls itself.
|
||||
|
||||
>
|
||||
CONVERSION ERROR
|
||||
|
||||
CONVERSION ERROR ~
|
||||
|
||||
When writing a file and the text "CONVERSION ERROR" appears, this means that
|
||||
some bits were lost when converting text from the internally used UTF-8 to the
|
||||
@@ -257,51 +259,51 @@ If there is a backup file, when 'writebackup' or 'backup' is set, it will not
|
||||
be deleted, so you can move it back into place if you want to discard the
|
||||
changes.
|
||||
|
||||
*E302* >
|
||||
Could not rename swap file
|
||||
*E302*
|
||||
Could not rename swap file ~
|
||||
|
||||
When the file name changes, Vim tries to rename the |swap-file| as well.
|
||||
This failed and the old swap file is now still used. Mostly harmless.
|
||||
|
||||
*E43* *E44* >
|
||||
Damaged match string
|
||||
Corrupted regexp program
|
||||
*E43* *E44*
|
||||
Damaged match string ~
|
||||
Corrupted regexp program ~
|
||||
|
||||
Something inside Vim went wrong and resulted in a corrupted regexp. If you
|
||||
know how to reproduce this problem, please report it. |bugs|
|
||||
|
||||
*E208* *E209* *E210* >
|
||||
Error writing to "{filename}"
|
||||
Error closing "{filename}"
|
||||
Error reading "{filename}"
|
||||
*E208* *E209* *E210*
|
||||
Error writing to "{filename}" ~
|
||||
Error closing "{filename}" ~
|
||||
Error reading "{filename}" ~
|
||||
|
||||
This occurs when Vim is trying to rename a file, but a simple change of file
|
||||
name doesn't work. Then the file will be copied, but somehow this failed.
|
||||
The result may be that both the original file and the destination file exist
|
||||
and the destination file may be incomplete.
|
||||
|
||||
>
|
||||
Vim: Error reading input, exiting...
|
||||
|
||||
Vim: Error reading input, exiting... ~
|
||||
|
||||
This occurs when Vim cannot read typed characters while input is required.
|
||||
Vim got stuck, the only thing it can do is exit. This can happen when both
|
||||
stdin and stderr are redirected and executing a script that doesn't exit Vim.
|
||||
|
||||
*E47* >
|
||||
Error while reading errorfile
|
||||
*E47*
|
||||
Error while reading errorfile ~
|
||||
|
||||
Reading the error file was not possible. This is NOT caused by an error
|
||||
message that was not recognized.
|
||||
|
||||
*E80* >
|
||||
Error while writing
|
||||
*E80*
|
||||
Error while writing ~
|
||||
|
||||
Writing a file was not completed successfully. The file is probably
|
||||
incomplete.
|
||||
|
||||
*E13* *E189* >
|
||||
File exists (add ! to override)
|
||||
"{filename}" exists (add ! to override)
|
||||
*E13* *E189*
|
||||
File exists (add ! to override) ~
|
||||
"{filename}" exists (add ! to override) ~
|
||||
|
||||
You are protected from accidentally overwriting a file. When you want to
|
||||
write anyway, use the same command, but add a "!" just after the command.
|
||||
@@ -310,8 +312,8 @@ Example: >
|
||||
changes to: >
|
||||
:w! /tmp/test
|
||||
<
|
||||
*E768* >
|
||||
Swap file exists: {filename} (:silent! overrides)
|
||||
*E768*
|
||||
Swap file exists: {filename} (:silent! overrides) ~
|
||||
|
||||
You are protected from overwriting a file that is being edited by Vim. This
|
||||
happens when you use ":w! filename" and a swapfile is found.
|
||||
@@ -323,115 +325,115 @@ happens when you use ":w! filename" and a swapfile is found.
|
||||
< The special command is needed, since you already added the ! for overwriting
|
||||
an existing file.
|
||||
|
||||
*E139* >
|
||||
File is loaded in another buffer
|
||||
*E139*
|
||||
File is loaded in another buffer ~
|
||||
|
||||
You are trying to write a file under a name which is also used in another
|
||||
buffer. This would result in two versions of the same file.
|
||||
|
||||
*E142* >
|
||||
File not written: Writing is disabled by 'write' option
|
||||
*E142*
|
||||
File not written: Writing is disabled by 'write' option ~
|
||||
|
||||
The 'write' option is off. This makes all commands that try to write a file
|
||||
generate this message. This could be caused by a |-m| commandline argument.
|
||||
You can switch the 'write' option on with ":set write".
|
||||
|
||||
*E25* >
|
||||
GUI cannot be used: Not enabled at compile time
|
||||
*E25*
|
||||
GUI cannot be used: Not enabled at compile time ~
|
||||
|
||||
You are running a version of Vim that doesn't include the GUI code. Therefore
|
||||
"gvim" and ":gui" don't work.
|
||||
|
||||
*E49* >
|
||||
Invalid scroll size
|
||||
*E49*
|
||||
Invalid scroll size ~
|
||||
|
||||
This is caused by setting an invalid value for the 'scroll', 'scrolljump' or
|
||||
'scrolloff' options.
|
||||
|
||||
*E17* >
|
||||
"{filename}" is a directory
|
||||
*E17*
|
||||
"{filename}" is a directory ~
|
||||
|
||||
You tried to write a file with the name of a directory. This is not possible.
|
||||
You probably need to append a file name.
|
||||
|
||||
*E19* >
|
||||
Mark has invalid line number
|
||||
*E19*
|
||||
Mark has invalid line number ~
|
||||
|
||||
You are using a mark that has a line number that doesn't exist. This can
|
||||
happen when you have a mark in another file, and some other program has
|
||||
deleted lines from it.
|
||||
|
||||
*E219* *E220* >
|
||||
Missing {.
|
||||
Missing }.
|
||||
*E219* *E220*
|
||||
Missing {. ~
|
||||
Missing }. ~
|
||||
|
||||
Using a {} construct in a file name, but there is a { without a matching } or
|
||||
the other way around. It should be used like this: {foo,bar}. This matches
|
||||
"foo" and "bar".
|
||||
|
||||
*E315* >
|
||||
ml_get: invalid lnum: {number}
|
||||
*E315*
|
||||
ml_get: invalid lnum: {number} ~
|
||||
|
||||
This is an internal Vim error. Please try to find out how it can be
|
||||
reproduced, and submit a bug report |bugreport.vim|.
|
||||
|
||||
*E173* >
|
||||
{number} more files to edit
|
||||
*E173*
|
||||
{number} more files to edit ~
|
||||
|
||||
You are trying to exit, while the last item in the argument list has not been
|
||||
edited. This protects you from accidentally exiting when you still have more
|
||||
files to work on. See |argument-list|. If you do want to exit, just do it
|
||||
again and it will work.
|
||||
|
||||
*E23* *E194* >
|
||||
No alternate file
|
||||
No alternate file name to substitute for '#'
|
||||
*E23* *E194*
|
||||
No alternate file ~
|
||||
No alternate file name to substitute for '#' ~
|
||||
|
||||
The alternate file is not defined yet. See |alternate-file|.
|
||||
|
||||
*E32* >
|
||||
No file name
|
||||
*E32*
|
||||
No file name ~
|
||||
|
||||
The current buffer has no name. To write it, use ":w fname". Or give the
|
||||
buffer a name with ":file fname".
|
||||
|
||||
*E141* >
|
||||
No file name for buffer {number}
|
||||
*E141*
|
||||
No file name for buffer {number} ~
|
||||
|
||||
One of the buffers that was changed does not have a file name. Therefore it
|
||||
cannot be written. You need to give the buffer a file name: >
|
||||
:buffer {number}
|
||||
:file {filename}
|
||||
<
|
||||
*E33* >
|
||||
No previous substitute regular expression
|
||||
*E33*
|
||||
No previous substitute regular expression ~
|
||||
|
||||
When using the '~' character in a pattern, it is replaced with the previously
|
||||
used pattern in a ":substitute" command. This fails when no such command has
|
||||
been used yet. See |/~|. This also happens when using ":s/pat/%/", where the
|
||||
"%" stands for the previous substitute string.
|
||||
|
||||
*E35* >
|
||||
No previous regular expression
|
||||
*E35*
|
||||
No previous regular expression ~
|
||||
|
||||
When using an empty search pattern, the previous search pattern is used. But
|
||||
that is not possible if there was no previous search.
|
||||
|
||||
*E24* >
|
||||
No such abbreviation
|
||||
*E24*
|
||||
No such abbreviation ~
|
||||
|
||||
You have used an ":unabbreviate" command with an argument which is not an
|
||||
existing abbreviation. All variations of this command give the same message:
|
||||
":cunabbrev", ":iunabbrev", etc. Check for trailing white space.
|
||||
|
||||
>
|
||||
/dev/dsp: No such file or directory
|
||||
|
||||
/dev/dsp: No such file or directory ~
|
||||
|
||||
Only given for GTK GUI with Gnome support. Gnome tries to use the audio
|
||||
device and it isn't present. You can ignore this error.
|
||||
|
||||
*E31* >
|
||||
No such mapping
|
||||
*E31*
|
||||
No such mapping ~
|
||||
|
||||
You have used an ":unmap" command with an argument which is not an existing
|
||||
mapping. All variations of this command give the same message: ":cunmap",
|
||||
@@ -440,9 +442,9 @@ mapping. All variations of this command give the same message: ":cunmap",
|
||||
- If the mapping is buffer-local you need to use ":unmap <buffer>".
|
||||
|:map-<buffer>|
|
||||
|
||||
*E37* *E89* >
|
||||
No write since last change (add ! to override)
|
||||
No write since last change for buffer {N} (add ! to override)
|
||||
*E37* *E89*
|
||||
No write since last change (add ! to override) ~
|
||||
No write since last change for buffer {N} (add ! to override) ~
|
||||
|
||||
You are trying to |abandon| a file that has changes. Vim protects you from
|
||||
losing your work. You can either write the changed file with ":w", or, if you
|
||||
@@ -452,8 +454,8 @@ adding a '!' character just after the command you used. Example: >
|
||||
changes to: >
|
||||
:e! other_file
|
||||
<
|
||||
*E162* >
|
||||
No write since last change for buffer "{name}"
|
||||
*E162*
|
||||
No write since last change for buffer "{name}" ~
|
||||
|
||||
This appears when you try to exit Vim while some buffers are changed. You
|
||||
will either have to write the changed buffer (with |:w|), or use a command to
|
||||
@@ -461,23 +463,23 @@ abandon the buffer forcefully, e.g., with ":qa!". Careful, make sure you
|
||||
don't throw away changes you really want to keep. You might have forgotten
|
||||
about a buffer, especially when 'hidden' is set.
|
||||
|
||||
>
|
||||
[No write since last change]
|
||||
|
||||
[No write since last change] ~
|
||||
|
||||
This appears when executing a shell command while at least one buffer was
|
||||
changed. To avoid the message reset the 'warn' option.
|
||||
|
||||
*E38* >
|
||||
Null argument
|
||||
*E38*
|
||||
Null argument ~
|
||||
|
||||
Something inside Vim went wrong and resulted in a NULL pointer. If you know
|
||||
how to reproduce this problem, please report it. |bugs|
|
||||
|
||||
*E41* *E82* *E83* *E342* >
|
||||
Out of memory!
|
||||
Out of memory! (allocating {number} bytes)
|
||||
Cannot allocate any buffer, exiting...
|
||||
Cannot allocate buffer, using other one...
|
||||
*E41* *E82* *E83* *E342*
|
||||
Out of memory! ~
|
||||
Out of memory! (allocating {number} bytes) ~
|
||||
Cannot allocate any buffer, exiting... ~
|
||||
Cannot allocate buffer, using other one... ~
|
||||
|
||||
Oh, oh. You must have been doing something complicated, or some other program
|
||||
is consuming your memory. Be careful! Vim is not completely prepared for an
|
||||
@@ -495,16 +497,16 @@ in memory, you can reduce that with these options:
|
||||
helps for a change that affects all lines.
|
||||
- 'undoreload' Set to zero to disable.
|
||||
|
||||
*E339* >
|
||||
Pattern too long
|
||||
*E339*
|
||||
Pattern too long ~
|
||||
|
||||
This happens on systems with 16 bit ints: The compiled regexp pattern is
|
||||
longer than about 65000 characters. Try using a shorter pattern.
|
||||
It also happens when the offset of a rule doesn't fit in the space available.
|
||||
Try simplifying the pattern.
|
||||
|
||||
*E45* >
|
||||
'readonly' option is set (add ! to override)
|
||||
*E45*
|
||||
'readonly' option is set (add ! to override) ~
|
||||
|
||||
You are trying to write a file that was marked as read-only. To write the
|
||||
file anyway, either reset the 'readonly' option, or add a '!' character just
|
||||
@@ -513,18 +515,18 @@ after the command you used. Example: >
|
||||
changes to: >
|
||||
:w!
|
||||
<
|
||||
*E294* *E295* *E301* >
|
||||
Read error in swap file
|
||||
Seek error in swap file read
|
||||
Oops, lost the swap file!!!
|
||||
*E294* *E295* *E301*
|
||||
Read error in swap file ~
|
||||
Seek error in swap file read ~
|
||||
Oops, lost the swap file!!! ~
|
||||
|
||||
Vim tried to read text from the |swap-file|, but something went wrong. The
|
||||
text in the related buffer may now be corrupted! Check carefully before you
|
||||
write a buffer. You may want to write it in another file and check for
|
||||
differences.
|
||||
|
||||
*E192* >
|
||||
Recursive use of :normal too deep
|
||||
*E192*
|
||||
Recursive use of :normal too deep ~
|
||||
|
||||
You are using a ":normal" command, whose argument again uses a ":normal"
|
||||
command in a recursive way. This is restricted to 'maxmapdepth' levels. This
|
||||
@@ -532,16 +534,16 @@ example illustrates how to get this message: >
|
||||
:map gq :normal gq<CR>
|
||||
If you type "gq", it will execute this mapping, which will call "gq" again.
|
||||
|
||||
*E22* >
|
||||
Scripts nested too deep
|
||||
*E22*
|
||||
Scripts nested too deep ~
|
||||
|
||||
Scripts can be read with the "-s" command-line argument and with the
|
||||
`:source!` command. The script can then again read another script. This can
|
||||
continue for about 14 levels. When more nesting is done, Vim assumes that
|
||||
there is a recursive loop and stops with this error message.
|
||||
|
||||
*E319* >
|
||||
Sorry, the command is not available in this version
|
||||
*E319*
|
||||
Sorry, the command is not available in this version ~
|
||||
|
||||
You have used a command that is not present in the version of Vim you are
|
||||
using. When compiling Vim, many different features can be enabled or
|
||||
@@ -549,8 +551,8 @@ disabled. This depends on how big Vim has chosen to be and the operating
|
||||
system. See |+feature-list| for when which feature is available. The
|
||||
|:version| command shows which feature Vim was compiled with.
|
||||
|
||||
*E300* >
|
||||
Swap file already exists (symlink attack?)
|
||||
*E300*
|
||||
Swap file already exists (symlink attack?) ~
|
||||
|
||||
This message appears when Vim is trying to open a swap file and finds it
|
||||
already exists or finds a symbolic link in its place. This shouldn't happen,
|
||||
@@ -559,8 +561,8 @@ opened the same file at exactly the same moment (very unlikely) or someone is
|
||||
attempting a symlink attack (could happen when editing a file in /tmp or when
|
||||
'directory' starts with "/tmp", which is a bad choice).
|
||||
|
||||
*E432* >
|
||||
Tags file not sorted: {file name}
|
||||
*E432*
|
||||
Tags file not sorted: {file name} ~
|
||||
|
||||
Vim (and Vi) expect tags files to be sorted in ASCII order. Binary searching
|
||||
can then be used, which is a lot faster than a linear search. If your tags
|
||||
@@ -569,21 +571,21 @@ This message is only given when Vim detects a problem when searching for a
|
||||
tag. Sometimes this message is not given, even though the tags file is not
|
||||
properly sorted.
|
||||
|
||||
*E424* >
|
||||
Too many different highlighting attributes in use
|
||||
*E424*
|
||||
Too many different highlighting attributes in use ~
|
||||
|
||||
Vim can only handle about 223 different kinds of highlighting. If you run
|
||||
into this limit, you have used too many |:highlight| commands with different
|
||||
arguments. A ":highlight link" is not counted.
|
||||
|
||||
*E77* >
|
||||
Too many file names
|
||||
*E77*
|
||||
Too many file names ~
|
||||
|
||||
When expanding file names, more than one match was found. Only one match is
|
||||
allowed for the command that was used.
|
||||
|
||||
*E303* >
|
||||
Unable to open swap file for "{filename}", recovery impossible
|
||||
*E303*
|
||||
Unable to open swap file for "{filename}", recovery impossible ~
|
||||
|
||||
Vim was not able to create a swap file. You can still edit the file, but if
|
||||
Vim unexpectedly exits the changes will be lost. And Vim may consume a lot of
|
||||
@@ -591,25 +593,25 @@ memory when editing a big file. You may want to change the 'directory' option
|
||||
to avoid this error. This error is not given when 'directory' is empty. See
|
||||
|swap-file|.
|
||||
|
||||
*E140* >
|
||||
Use ! to write partial buffer
|
||||
*E140*
|
||||
Use ! to write partial buffer ~
|
||||
|
||||
When using a range to write part of a buffer, it is unusual to overwrite the
|
||||
original file. It is probably a mistake (e.g., when Visual mode was active
|
||||
when using ":w"), therefore Vim requires using a ! after the command, e.g.:
|
||||
":3,10w!".
|
||||
>
|
||||
|
||||
Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type
|
||||
VirtualBinding
|
||||
|
||||
Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type ~
|
||||
VirtualBinding ~
|
||||
|
||||
Messages like this appear when starting up. This is not a Vim problem, your
|
||||
X11 configuration is wrong. You can find a hint on how to solve this here:
|
||||
http://groups.yahoo.com/group/solarisonintel/message/12179.
|
||||
[this URL is no longer valid]
|
||||
|
||||
*W10* >
|
||||
Warning: Changing a readonly file
|
||||
*W10*
|
||||
Warning: Changing a readonly file ~
|
||||
|
||||
The file is read-only and you are making a change to it anyway. You can use
|
||||
the |FileChangedRO| autocommand event to avoid this message (the autocommand
|
||||
@@ -617,15 +619,15 @@ must reset the 'readonly' option). See 'modifiable' to completely disallow
|
||||
making changes to a file.
|
||||
This message is only given for the first change after 'readonly' has been set.
|
||||
|
||||
*W13* >
|
||||
Warning: File "{filename}" has been created after editing started
|
||||
*W13*
|
||||
Warning: File "{filename}" has been created after editing started ~
|
||||
|
||||
You are editing a file in Vim when it didn't exist, but it does exist now.
|
||||
You will have to decide if you want to keep the version in Vim or the newly
|
||||
created file. This message is not given when 'buftype' is not empty.
|
||||
|
||||
*W11* >
|
||||
Warning: File "{filename}" has changed since editing started
|
||||
*W11*
|
||||
Warning: File "{filename}" has changed since editing started ~
|
||||
|
||||
The file which you have started editing has got another timestamp and the
|
||||
contents changed (more precisely: When reading the file again with the current
|
||||
@@ -648,15 +650,15 @@ starts. It can be fixed in one of these ways:
|
||||
If you get W11 all the time, you may need to disable "Acronis Active
|
||||
Protection" or register Vim as a trusted service/application.
|
||||
|
||||
*W12* >
|
||||
Warning: File "{filename}" has changed and the buffer was changed in Vim as well
|
||||
*W12*
|
||||
Warning: File "{filename}" has changed and the buffer was changed in Vim as well ~
|
||||
|
||||
Like the above, and the buffer for the file was changed in this Vim as well.
|
||||
You will have to decide if you want to keep the version in this Vim or the one
|
||||
on disk. This message is not given when 'buftype' is not empty.
|
||||
|
||||
*W16* >
|
||||
Warning: Mode of file "{filename}" has changed since editing started
|
||||
*W16*
|
||||
Warning: Mode of file "{filename}" has changed since editing started ~
|
||||
|
||||
When the timestamp for a buffer was changed and the contents are still the
|
||||
same but the mode (permissions) have changed. This usually occurs when
|
||||
@@ -664,37 +666,37 @@ checking out a file from a version control system, which causes the read-only
|
||||
bit to be reset. It should be safe to reload the file. Set 'autoread' to
|
||||
automatically reload the file.
|
||||
|
||||
*E211* >
|
||||
File "{filename}" no longer available
|
||||
*E211*
|
||||
File "{filename}" no longer available ~
|
||||
|
||||
The file which you have started editing has disappeared, or is no longer
|
||||
accessible. Make sure you write the buffer somewhere to avoid losing
|
||||
changes. This message is not given when 'buftype' is not empty.
|
||||
|
||||
*W14* >
|
||||
Warning: List of file names overflow
|
||||
*W14*
|
||||
Warning: List of file names overflow ~
|
||||
|
||||
You must be using an awful lot of buffers. It's now possible that two buffers
|
||||
have the same number, which causes various problems. You might want to exit
|
||||
Vim and restart it.
|
||||
|
||||
*E931* >
|
||||
Buffer cannot be registered
|
||||
*E931*
|
||||
Buffer cannot be registered ~
|
||||
|
||||
Out of memory or a duplicate buffer number. May happen after W14. Looking up
|
||||
a buffer will not always work, better restart Vim.
|
||||
|
||||
*E296* *E297* >
|
||||
Seek error in swap file write
|
||||
Write error in swap file
|
||||
*E296* *E297*
|
||||
Seek error in swap file write ~
|
||||
Write error in swap file ~
|
||||
|
||||
This mostly happens when the disk is full. Vim could not write text into the
|
||||
|swap-file|. It's not directly harmful, but when Vim unexpectedly exits some
|
||||
text may be lost without recovery being possible. Vim might run out of memory
|
||||
when this problem persists.
|
||||
|
||||
*connection-refused* >
|
||||
Xlib: connection to "<machine-name:0.0" refused by server
|
||||
*connection-refused*
|
||||
Xlib: connection to "<machine-name:0.0" refused by server ~
|
||||
|
||||
This happens when Vim tries to connect to the X server, but the X server does
|
||||
not allow a connection. The connection to the X server is needed to be able
|
||||
@@ -702,55 +704,55 @@ to restore the title and for the xterm clipboard support. Unfortunately this
|
||||
error message cannot be avoided, except by disabling the |+xterm_clipboard|
|
||||
and |+X11| features.
|
||||
|
||||
*E10* >
|
||||
\\ should be followed by /, ? or &
|
||||
*E10*
|
||||
\\ should be followed by /, ? or & ~
|
||||
|
||||
A command line started with a backslash or the range of a command contained a
|
||||
backslash in a wrong place. This is often caused by command-line continuation
|
||||
being disabled. Remove the 'C' flag from the 'cpoptions' option to enable it.
|
||||
Or use ":set nocp".
|
||||
|
||||
*E471* >
|
||||
Argument required
|
||||
*E471*
|
||||
Argument required ~
|
||||
|
||||
This happens when an Ex command with mandatory argument(s) was executed, but
|
||||
no argument has been specified.
|
||||
|
||||
*E474* *E475* *E983* >
|
||||
Invalid argument
|
||||
Invalid argument: {arg}
|
||||
Duplicate argument: {arg}
|
||||
*E474* *E475* *E983*
|
||||
Invalid argument ~
|
||||
Invalid argument: {arg} ~
|
||||
Duplicate argument: {arg} ~
|
||||
|
||||
An Ex command or function has been executed, but an invalid argument has been
|
||||
specified.
|
||||
|
||||
*E488* >
|
||||
Trailing characters
|
||||
*E488*
|
||||
Trailing characters ~
|
||||
|
||||
An argument has been added to an Ex command that does not permit one.
|
||||
Or the argument has invalid characters and has not been recognized.
|
||||
|
||||
*E477* *E478* >
|
||||
No ! allowed
|
||||
Don't panic!
|
||||
*E477* *E478*
|
||||
No ! allowed ~
|
||||
Don't panic! ~
|
||||
|
||||
You have added a "!" after an Ex command that doesn't permit one.
|
||||
|
||||
*E481* >
|
||||
No range allowed
|
||||
*E481*
|
||||
No range allowed ~
|
||||
|
||||
A range was specified for an Ex command that doesn't permit one. See
|
||||
|cmdline-ranges|.
|
||||
|
||||
*E482* *E483* >
|
||||
Can't create file {filename}
|
||||
Can't get temp file name
|
||||
*E482* *E483*
|
||||
Can't create file {filename} ~
|
||||
Can't get temp file name ~
|
||||
|
||||
Vim cannot create a temporary file.
|
||||
|
||||
*E484* *E485* >
|
||||
Can't open file {filename}
|
||||
Can't read file {filename}
|
||||
*E484* *E485*
|
||||
Can't open file {filename} ~
|
||||
Can't read file {filename} ~
|
||||
|
||||
Vim cannot read a temporary file. Especially on Windows, this can be caused
|
||||
by wrong escaping of special characters for cmd.exe; the approach was
|
||||
@@ -758,8 +760,8 @@ changed with patch 7.3.443. Try using |shellescape()| for all shell arguments
|
||||
given to |system()|, or explicitly add escaping with ^. Also see
|
||||
'shellxquote' and 'shellxescape'.
|
||||
|
||||
*E464* >
|
||||
Ambiguous use of user-defined command
|
||||
*E464*
|
||||
Ambiguous use of user-defined command ~
|
||||
|
||||
There are two user-defined commands with a common name prefix, and you used
|
||||
Command-line completion to execute one of them. |user-cmd-ambiguous|
|
||||
@@ -768,23 +770,22 @@ Example: >
|
||||
:command MyCommand2 echo "two"
|
||||
:MyCommand
|
||||
<
|
||||
*E492* >
|
||||
Not an editor command
|
||||
*E492*
|
||||
Not an editor command ~
|
||||
|
||||
You tried to execute a command that is neither an Ex command nor
|
||||
a user-defined command.
|
||||
|
||||
*E943* >
|
||||
Command table needs to be updated, run 'make cmdidxs'
|
||||
*E943*
|
||||
Command table needs to be updated, run 'make cmdidxs' ~
|
||||
|
||||
This can only happen when changing the source code, when adding a command in
|
||||
src/ex_cmds.h. The lookup table then needs to be updated, by running: >
|
||||
make cmdidxs
|
||||
<
|
||||
*E928* *E889* *E839* >
|
||||
E928: String required
|
||||
E889: Number required
|
||||
E839: Bool required
|
||||
*E928* *E889*
|
||||
E928: String required ~
|
||||
E889: Number required ~
|
||||
|
||||
These happen when a value or expression is used that does not have the
|
||||
expected type.
|
||||
@@ -841,9 +842,9 @@ Also see 'mouse'. The hit-enter message is highlighted with the |hl-Question|
|
||||
group.
|
||||
|
||||
|
||||
*more-prompt* *pager* >
|
||||
-- More --
|
||||
-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit
|
||||
*more-prompt* *pager*
|
||||
-- More -- ~
|
||||
-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q: quit ~
|
||||
|
||||
This message is given when the screen is filled with messages. It is only
|
||||
given when the 'more' option is on. It is highlighted with the |hl-MoreMsg|
|
||||
|
||||
+22
-9
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2022 Jan 02
|
||||
*options.txt* For Vim version 8.2. Last change: 2022 Jan 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -170,7 +170,7 @@ When a key code is not set, it's like it does not exist. Trying to get its
|
||||
value will result in an error: >
|
||||
:set t_kb=
|
||||
:set t_kb
|
||||
E846: Key code not set: t_kb
|
||||
< E846: Key code not set: t_kb ~
|
||||
|
||||
The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
@@ -1226,7 +1226,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the script ID (|local-function|). Example: >
|
||||
set bexpr=s:MyBalloonExpr()
|
||||
set bexpr=<SID>SomeBalloonExpr()
|
||||
<
|
||||
< Otherwise, the expression is evaluated in the context of the script
|
||||
where the option was set, thus script-local items are available.
|
||||
|
||||
The expression will be evaluated in the |sandbox| when set from a
|
||||
modeline, see |sandbox-option|.
|
||||
This option cannot be set in a modeline when 'modelineexpr' is off.
|
||||
@@ -3454,7 +3456,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not available when compiled without the |+folding|
|
||||
or |+eval| features}
|
||||
The expression used for when 'foldmethod' is "expr". It is evaluated
|
||||
for each line to obtain its fold level. See |fold-expr|.
|
||||
for each line to obtain its fold level. The context is set to the
|
||||
script where 'foldexpr' was set, script-local items can be accessed.
|
||||
See |fold-expr| for the usage.
|
||||
|
||||
The expression will be evaluated in the |sandbox| if set from a
|
||||
modeline, see |sandbox-option|.
|
||||
@@ -3588,7 +3592,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not available when compiled without the |+folding|
|
||||
feature}
|
||||
An expression which is used to specify the text displayed for a closed
|
||||
fold. See |fold-foldtext|.
|
||||
fold. The context is set to the script where 'foldexpr' was set,
|
||||
script-local items can be accessed. See |fold-foldtext| for the
|
||||
usage.
|
||||
|
||||
The expression will be evaluated in the |sandbox| if set from a
|
||||
modeline, see |sandbox-option|.
|
||||
@@ -3631,7 +3637,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the script ID (|local-function|). Example: >
|
||||
set formatexpr=s:MyFormatExpr()
|
||||
set formatexpr=<SID>SomeFormatExpr()
|
||||
<
|
||||
< Otherwise, the expression is evaluated in the context of the script
|
||||
where the option was set, thus script-local items are available.
|
||||
|
||||
The expression will be evaluated in the |sandbox| when set from a
|
||||
modeline, see |sandbox-option|. That stops the option from working,
|
||||
since changing the buffer text is not allowed.
|
||||
@@ -4558,7 +4566,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the script ID (|local-function|). Example: >
|
||||
set includeexpr=s:MyIncludeExpr(v:fname)
|
||||
set includeexpr=<SID>SomeIncludeExpr(v:fname)
|
||||
<
|
||||
< Otherwise, the expression is evaluated in the context of the script
|
||||
where the option was set, thus script-local items are available.
|
||||
|
||||
The expression will be evaluated in the |sandbox| when set from a
|
||||
modeline, see |sandbox-option|.
|
||||
This option cannot be set in a modeline when 'modelineexpr' is off.
|
||||
@@ -4632,11 +4642,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The expression is evaluated with |v:lnum| set to the line number for
|
||||
which the indent is to be computed. The cursor is also in this line
|
||||
when the expression is evaluated (but it may be moved around).
|
||||
|
||||
If the expression starts with s: or |<SID>|, then it is replaced with
|
||||
the script ID (|local-function|). Example: >
|
||||
set indentexpr=s:MyIndentExpr()
|
||||
set indentexpr=<SID>SomeIndentExpr()
|
||||
<
|
||||
< Otherwise, the expression is evaluated in the context of the script
|
||||
where the option was set, thus script-local items are available.
|
||||
|
||||
The expression must return the number of spaces worth of indent. It
|
||||
can return "-1" to keep the current indent (this means 'autoindent' is
|
||||
used for the indent).
|
||||
@@ -5817,7 +5830,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'opendevice'* *'odev'* *'noopendevice'* *'noodev'*
|
||||
'opendevice' 'odev' boolean (default off)
|
||||
global
|
||||
{only for MS-Windows}
|
||||
{only for MS-Windows} *E796*
|
||||
Enable reading and writing from devices. This may get Vim stuck on a
|
||||
device that can be opened but doesn't actually do the I/O. Therefore
|
||||
it is off by default.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2022 Jan 09
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2022 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -354,7 +354,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
<
|
||||
|
||||
:scriptv[ersion] {version} *:scriptv* *:scriptversion*
|
||||
*E999* *E984*
|
||||
*E999* *E984* *E1040*
|
||||
Specify the version of Vim for the lines that follow
|
||||
in the same file. Only applies at the toplevel of
|
||||
sourced scripts, not inside functions.
|
||||
@@ -367,8 +367,8 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
|
||||
:vim9s[cript] [noclear] *:vim9s* *:vim9script*
|
||||
Marks a script file as containing |Vim9-script|
|
||||
commands. Also see |vim9-namespace|.
|
||||
Must be the first command in the file.
|
||||
commands. Also see |vim9-namespace|. *E1038*
|
||||
Must be the first command in the file. *E1039*
|
||||
For [noclear] see |vim9-reload|.
|
||||
Without the |+eval| feature this changes the syntax
|
||||
for some commands.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.2. Last change: 2022 Jan 03
|
||||
*starting.txt* For Vim version 8.2. Last change: 2022 Jan 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -268,8 +268,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
started if possible.
|
||||
|
||||
*-e*
|
||||
-e Start Vim in Ex mode |Q|. Only makes a difference when the
|
||||
executable is not called "ex".
|
||||
-e Start Vim in Ex mode, see |Ex-mode|. Only makes a difference
|
||||
when the executable is not called "ex".
|
||||
|
||||
*-E*
|
||||
-E Start Vim in improved Ex mode |gQ|. Only makes a difference
|
||||
|
||||
@@ -956,12 +956,16 @@ the options 'foldminlines' and 'foldnestmax' in |.vimrc| or use |:setlocal| in
|
||||
|
||||
BASIC *basic.vim* *vb.vim* *ft-basic-syntax* *ft-vb-syntax*
|
||||
|
||||
Both Visual Basic and "normal" basic use the extension ".bas". To detect
|
||||
Both Visual Basic and "normal" BASIC use the extension ".bas". To detect
|
||||
which one should be used, Vim checks for the string "VB_Name" in the first
|
||||
five lines of the file. If it is not found, filetype will be "basic",
|
||||
otherwise "vb". Files with the ".frm" extension will always be seen as Visual
|
||||
Basic.
|
||||
|
||||
If the automatic detection doesn't work for you or you only edit, for
|
||||
example, FreeBASIC files, use this in your startup vimrc: >
|
||||
:let filetype_bas = "freebasic"
|
||||
|
||||
|
||||
C *c.vim* *ft-c-syntax*
|
||||
|
||||
|
||||
+79
-2
@@ -2592,6 +2592,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:imenu gui.txt /*:imenu*
|
||||
:imp vim9.txt /*:imp*
|
||||
:import vim9.txt /*:import*
|
||||
:import-as vim9.txt /*:import-as*
|
||||
:import-cycle vim9.txt /*:import-cycle*
|
||||
:in insert.txt /*:in*
|
||||
:index index.txt /*:index*
|
||||
@@ -4004,17 +4005,88 @@ DirChanged autocmd.txt /*DirChanged*
|
||||
E motion.txt /*E*
|
||||
E10 message.txt /*E10*
|
||||
E100 diff.txt /*E100*
|
||||
E1001 eval.txt /*E1001*
|
||||
E1002 eval.txt /*E1002*
|
||||
E1003 vim9.txt /*E1003*
|
||||
E1004 vim9.txt /*E1004*
|
||||
E1005 vim9.txt /*E1005*
|
||||
E1006 vim9.txt /*E1006*
|
||||
E1007 vim9.txt /*E1007*
|
||||
E1008 vim9.txt /*E1008*
|
||||
E1009 vim9.txt /*E1009*
|
||||
E101 diff.txt /*E101*
|
||||
E1010 vim9.txt /*E1010*
|
||||
E1011 vim9.txt /*E1011*
|
||||
E1012 vim9.txt /*E1012*
|
||||
E1013 vim9.txt /*E1013*
|
||||
E1014 vim9.txt /*E1014*
|
||||
E1015 eval.txt /*E1015*
|
||||
E1016 vim9.txt /*E1016*
|
||||
E1017 vim9.txt /*E1017*
|
||||
E1018 eval.txt /*E1018*
|
||||
E1019 eval.txt /*E1019*
|
||||
E102 diff.txt /*E102*
|
||||
E1020 vim9.txt /*E1020*
|
||||
E1021 vim9.txt /*E1021*
|
||||
E1022 vim9.txt /*E1022*
|
||||
E1023 vim9.txt /*E1023*
|
||||
E1024 vim9.txt /*E1024*
|
||||
E1025 vim9.txt /*E1025*
|
||||
E1026 vim9.txt /*E1026*
|
||||
E1027 vim9.txt /*E1027*
|
||||
E1028 vim9.txt /*E1028*
|
||||
E1029 vim9.txt /*E1029*
|
||||
E103 diff.txt /*E103*
|
||||
E1030 vim9.txt /*E1030*
|
||||
E1031 vim9.txt /*E1031*
|
||||
E1032 eval.txt /*E1032*
|
||||
E1033 eval.txt /*E1033*
|
||||
E1034 vim9.txt /*E1034*
|
||||
E1035 eval.txt /*E1035*
|
||||
E1036 eval.txt /*E1036*
|
||||
E1037 eval.txt /*E1037*
|
||||
E1038 repeat.txt /*E1038*
|
||||
E1039 repeat.txt /*E1039*
|
||||
E104 digraph.txt /*E104*
|
||||
E1040 repeat.txt /*E1040*
|
||||
E1041 vim9.txt /*E1041*
|
||||
E1042 vim9.txt /*E1042*
|
||||
E1043 vim9.txt /*E1043*
|
||||
E1044 vim9.txt /*E1044*
|
||||
E1047 vim9.txt /*E1047*
|
||||
E1048 vim9.txt /*E1048*
|
||||
E1049 vim9.txt /*E1049*
|
||||
E105 mbyte.txt /*E105*
|
||||
E1050 vim9.txt /*E1050*
|
||||
E1051 eval.txt /*E1051*
|
||||
E1052 vim9.txt /*E1052*
|
||||
E1053 vim9.txt /*E1053*
|
||||
E1054 vim9.txt /*E1054*
|
||||
E1055 vim9.txt /*E1055*
|
||||
E1056 vim9.txt /*E1056*
|
||||
E1057 vim9.txt /*E1057*
|
||||
E1058 vim9.txt /*E1058*
|
||||
E1059 vim9.txt /*E1059*
|
||||
E1060 vim9.txt /*E1060*
|
||||
E1061 vim9.txt /*E1061*
|
||||
E1062 eval.txt /*E1062*
|
||||
E1063 eval.txt /*E1063*
|
||||
E1064 autocmd.txt /*E1064*
|
||||
E1066 vim9.txt /*E1066*
|
||||
E1067 eval.txt /*E1067*
|
||||
E1068 vim9.txt /*E1068*
|
||||
E1069 vim9.txt /*E1069*
|
||||
E107 eval.txt /*E107*
|
||||
E1071 vim9.txt /*E1071*
|
||||
E1072 eval.txt /*E1072*
|
||||
E1073 vim9.txt /*E1073*
|
||||
E1074 vim9.txt /*E1074*
|
||||
E1075 vim9.txt /*E1075*
|
||||
E1076 eval.txt /*E1076*
|
||||
E1077 vim9.txt /*E1077*
|
||||
E108 eval.txt /*E108*
|
||||
E1081 eval.txt /*E1081*
|
||||
E1083 editing.txt /*E1083*
|
||||
E109 eval.txt /*E109*
|
||||
E1091 vim9.txt /*E1091*
|
||||
E1094 vim9.txt /*E1094*
|
||||
@@ -4051,6 +4123,7 @@ E120 eval.txt /*E120*
|
||||
E1200 options.txt /*E1200*
|
||||
E1201 options.txt /*E1201*
|
||||
E1205 builtin.txt /*E1205*
|
||||
E1208 map.txt /*E1208*
|
||||
E121 eval.txt /*E121*
|
||||
E1214 builtin.txt /*E1214*
|
||||
E122 eval.txt /*E122*
|
||||
@@ -4067,6 +4140,7 @@ E1245 cmdline.txt /*E1245*
|
||||
E125 eval.txt /*E125*
|
||||
E1255 map.txt /*E1255*
|
||||
E126 eval.txt /*E126*
|
||||
E1263 eval.txt /*E1263*
|
||||
E127 eval.txt /*E127*
|
||||
E128 eval.txt /*E128*
|
||||
E129 eval.txt /*E129*
|
||||
@@ -4630,6 +4704,7 @@ E65 pattern.txt /*E65*
|
||||
E650 netbeans.txt /*E650*
|
||||
E651 netbeans.txt /*E651*
|
||||
E652 netbeans.txt /*E652*
|
||||
E654 eval.txt /*E654*
|
||||
E655 builtin.txt /*E655*
|
||||
E656 netbeans.txt /*E656*
|
||||
E657 netbeans.txt /*E657*
|
||||
@@ -4783,7 +4858,7 @@ E792 gui.txt /*E792*
|
||||
E793 diff.txt /*E793*
|
||||
E794 eval.txt /*E794*
|
||||
E795 eval.txt /*E795*
|
||||
E796 editing.txt /*E796*
|
||||
E796 options.txt /*E796*
|
||||
E797 spell.txt /*E797*
|
||||
E798 builtin.txt /*E798*
|
||||
E799 builtin.txt /*E799*
|
||||
@@ -4830,7 +4905,6 @@ E835 options.txt /*E835*
|
||||
E836 if_pyth.txt /*E836*
|
||||
E837 if_pyth.txt /*E837*
|
||||
E838 netbeans.txt /*E838*
|
||||
E839 message.txt /*E839*
|
||||
E84 windows.txt /*E84*
|
||||
E840 insert.txt /*E840*
|
||||
E841 map.txt /*E841*
|
||||
@@ -4849,6 +4923,8 @@ E852 gui_x11.txt /*E852*
|
||||
E853 eval.txt /*E853*
|
||||
E854 options.txt /*E854*
|
||||
E855 autocmd.txt /*E855*
|
||||
E856 testing.txt /*E856*
|
||||
E857 builtin.txt /*E857*
|
||||
E858 builtin.txt /*E858*
|
||||
E859 builtin.txt /*E859*
|
||||
E86 windows.txt /*E86*
|
||||
@@ -10245,6 +10321,7 @@ v_CTRL-C visual.txt /*v_CTRL-C*
|
||||
v_CTRL-G visual.txt /*v_CTRL-G*
|
||||
v_CTRL-H change.txt /*v_CTRL-H*
|
||||
v_CTRL-O visual.txt /*v_CTRL-O*
|
||||
v_CTRL-R visual.txt /*v_CTRL-R*
|
||||
v_CTRL-V visual.txt /*v_CTRL-V*
|
||||
v_CTRL-X change.txt /*v_CTRL-X*
|
||||
v_CTRL-Z starting.txt /*v_CTRL-Z*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2021 Dec 21
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2022 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1178,7 +1178,7 @@ gdb window A terminal window in which "gdb vim" is executed. Here you
|
||||
program window A terminal window for the executed program. When "run" is
|
||||
used in gdb the program I/O will happen in this window, so
|
||||
that it does not interfere with controlling gdb. The buffer
|
||||
name is "gdb program".
|
||||
name is "debugged program".
|
||||
|
||||
The current window is used to show the source code. When gdb pauses the
|
||||
source file location will be displayed, if possible. A sign is used to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 8.2. Last change: 2022 Jan 13
|
||||
*testing.txt* For Vim version 8.2. Last change: 2022 Jan 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -352,7 +352,7 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
|
||||
Run {cmd} and add an error message to |v:errors| if it does
|
||||
NOT produce an error or when {error} is not found in the
|
||||
error message. Also see |assert-return|.
|
||||
|
||||
*E856*
|
||||
When {error} is a string it must be found literally in the
|
||||
first reported error. Most often this will be the error code,
|
||||
including the colon, e.g. "E123:". >
|
||||
|
||||
+13
-13
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2022 Jan 15
|
||||
*todo.txt* For Vim version 8.2. Last change: 2022 Jan 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,19 +38,14 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
TODO in eval_method() for using partial.
|
||||
|
||||
TODO in compile_load_scriptvar()
|
||||
Try using a variable or function that is not exported
|
||||
|
||||
"return Msg()" does not give an error if there is no return value. #9497
|
||||
|
||||
eval_map_expr() in getchar.c saves stuff because "mp" can change, this does
|
||||
not happen in map.c for an abbreviation. Test that this fails, fix it.
|
||||
Also set the script context for other "expr" options, like for 'foldexpr'?
|
||||
'printexpr' eval_printexpr()
|
||||
"expr:" part of 'spellsuggest eval_spell_expr()
|
||||
|
||||
Once Vim9 is stable:
|
||||
- Add all the error numbers in a good place in documentation.
|
||||
done until E653
|
||||
done until E1083
|
||||
- Check code coverage, add more tests if needed.
|
||||
- Use Vim9 for runtime files.
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
@@ -67,8 +62,8 @@ Further Vim9 improvements, possibly after launch:
|
||||
evaluation.
|
||||
Use the location where the option was set for deciding whether it's to be
|
||||
evaluated in Vim9 script context.
|
||||
- implement :type, "import type"
|
||||
- implement :enum, "import enum".
|
||||
- implement :type
|
||||
- implement :enum
|
||||
- implement :class and :interface: See |vim9-classes|
|
||||
- For range: make table of first ASCII character with flag to quickly check if
|
||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||
@@ -207,6 +202,9 @@ Terminal emulator window:
|
||||
When using 'cryptmethod' xchaha20 the undo file is not encrypted.
|
||||
Need to handle extra bytes.
|
||||
|
||||
In Select mode the deleted text always goes into the unnamed register.
|
||||
Use CTRL-R to specify the register to use. (#9531)
|
||||
|
||||
Some prompts are not translated: #9495
|
||||
|
||||
Test_communicate_ipv6(): is flaky on many systems
|
||||
@@ -245,6 +243,8 @@ this.
|
||||
|
||||
MS-Windows: did path modifier :p:8 stop working? #8600
|
||||
|
||||
Add support for "underdouble", "underdot" and "underdash". #9553
|
||||
|
||||
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
|
||||
|
||||
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
.TH VIM 1 "2006 Apr 11"
|
||||
.TH VIM 1 "2021 Jun 13"
|
||||
.SH NAME
|
||||
vim \- Vi IMproved, a programmer's text editor
|
||||
.SH SYNOPSIS
|
||||
|
||||
+1
-1
@@ -432,4 +432,4 @@ BUGS
|
||||
|
||||
|
||||
|
||||
2006 Apr 11 VIM(1)
|
||||
2021 Jun 13 VIM(1)
|
||||
|
||||
+53
-30
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2022 Jan 18
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2022 Jan 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -190,7 +190,7 @@ functions.
|
||||
|
||||
Arguments are accessed by name, without "a:", just like any other language.
|
||||
There is no "a:" dictionary or "a:000" list.
|
||||
*vim9-variable-arguments*
|
||||
*vim9-variable-arguments* *E1055*
|
||||
Variable arguments are defined as the last argument, with a name and have a
|
||||
list type, similar to TypeScript. For example, a list of numbers: >
|
||||
def MyFunc(...itemlist: list<number>)
|
||||
@@ -227,7 +227,7 @@ the "name#" prefix is sufficient. >
|
||||
def s:ThisFunction() # script-local
|
||||
def g:ThatFunction() # global
|
||||
def scriptname#function() # autoload
|
||||
|
||||
< *E1058* *E1075*
|
||||
When using `:function` or `:def` to specify a nested function inside a `:def`
|
||||
function and no namespace was given, this nested function is local to the code
|
||||
block it is defined in. In a `:def` function it is not possible to define a
|
||||
@@ -289,7 +289,8 @@ some point when loaded again. E.g. when a buffer local option is set: >
|
||||
|
||||
|
||||
Variable declarations with :var, :final and :const ~
|
||||
*vim9-declaration* *:var*
|
||||
*vim9-declaration* *:var*
|
||||
*E1017* *E1020* *E1054*
|
||||
Local variables need to be declared with `:var`. Local constants need to be
|
||||
declared with `:final` or `:const`. We refer to both as "variables" in this
|
||||
section.
|
||||
@@ -320,7 +321,7 @@ The declaration must be done earlier: >
|
||||
inner = 0
|
||||
endif
|
||||
echo inner
|
||||
|
||||
< *E1025*
|
||||
To intentionally hide a variable from code that follows, a block can be
|
||||
used: >
|
||||
{
|
||||
@@ -347,12 +348,12 @@ And with autocommands: >
|
||||
}
|
||||
|
||||
Although using a :def function probably works better.
|
||||
|
||||
*E1022*
|
||||
Declaring a variable with a type but without an initializer will initialize to
|
||||
false (for bool), empty (for string, list, dict, etc.) or zero (for number,
|
||||
any, etc.). This matters especially when using the "any" type, the value will
|
||||
default to the number zero.
|
||||
|
||||
*E1016* *E1052* *E1066*
|
||||
In Vim9 script `:let` cannot be used. An existing variable is assigned to
|
||||
without any command. The same for global, window, tab, buffer and Vim
|
||||
variables, because they are not really declared. Those can also be deleted
|
||||
@@ -363,7 +364,7 @@ instead.
|
||||
|
||||
The `exists()` and `exists_compiled()` functions do not work on local variables
|
||||
or arguments.
|
||||
|
||||
*E1006* *E1041*
|
||||
Variables, functions and function arguments cannot shadow previously defined
|
||||
or imported variables and functions in the same script file.
|
||||
Variables may shadow Ex commands, rename the variable if needed.
|
||||
@@ -431,7 +432,7 @@ How constants work varies between languages. Some consider a variable that
|
||||
can't be assigned another value a constant. JavaScript is an example. Others
|
||||
also make the value immutable, thus when a constant uses a list, the list
|
||||
cannot be changed. In Vim9 we can use both.
|
||||
|
||||
*E1021*
|
||||
`:const` is used for making both the variable and the value a constant. Use
|
||||
this for composite structures that you want to make sure will not be modified.
|
||||
Example: >
|
||||
@@ -564,7 +565,7 @@ characters, e.g.: >
|
||||
})
|
||||
No command can follow the "{", only a comment can be used there.
|
||||
|
||||
*command-block*
|
||||
*command-block* *E1026*
|
||||
The block can also be used for defining a user command. Inside the block Vim9
|
||||
syntax will be used.
|
||||
|
||||
@@ -684,6 +685,11 @@ This will assign "start" and print a line: >
|
||||
var result = start
|
||||
:+ print
|
||||
|
||||
After the range an Ex command must follow. Without the colon you can call a
|
||||
function without `:call`, but after a range you do need it: >
|
||||
MyFunc()
|
||||
:% call MyFunc()
|
||||
|
||||
Note that the colon is not required for the |+cmd| argument: >
|
||||
edit +6 fname
|
||||
|
||||
@@ -732,7 +738,7 @@ Notes:
|
||||
|
||||
|
||||
White space ~
|
||||
|
||||
*E1004* *E1068* *E1069* *E1074*
|
||||
Vim9 script enforces proper use of white space. This is no longer allowed: >
|
||||
var name=234 # Error!
|
||||
var name= 234 # Error!
|
||||
@@ -777,7 +783,7 @@ No curly braces expansion ~
|
||||
|
||||
|
||||
Dictionary literals ~
|
||||
*vim9-literal-dict*
|
||||
*vim9-literal-dict* *E1014*
|
||||
Traditionally Vim has supported dictionary literals with a {} syntax: >
|
||||
let dict = {'key': value}
|
||||
|
||||
@@ -867,7 +873,7 @@ first if needed.
|
||||
|
||||
|
||||
Conditions and expressions ~
|
||||
*vim9-boolean*
|
||||
*vim9-boolean*
|
||||
Conditions and expressions are mostly working like they do in other languages.
|
||||
Some values are different from legacy Vim script:
|
||||
value legacy Vim script Vim9 script ~
|
||||
@@ -921,7 +927,7 @@ always converted to string: >
|
||||
|
||||
Simple types are Number, Float, Special and Bool. For other types |string()|
|
||||
should be used.
|
||||
*false* *true* *null*
|
||||
*false* *true* *null* *E1034*
|
||||
In Vim9 script one can use "true" for v:true, "false" for v:false and "null"
|
||||
for v:null. When converting a boolean to a string "false" and "true" are
|
||||
used, not "v:false" and "v:true" like in legacy script. "v:none" is not
|
||||
@@ -1064,15 +1070,19 @@ Using ++var or --var in an expression is not supported yet.
|
||||
|
||||
3. New style functions *fast-functions*
|
||||
|
||||
*:def*
|
||||
*:def* *E1028*
|
||||
:def[!] {name}([arguments])[: {return-type}]
|
||||
Define a new function by the name {name}. The body of
|
||||
the function follows in the next lines, until the
|
||||
matching `:enddef`.
|
||||
|
||||
When {return-type} is omitted or is "void" the
|
||||
function is not expected to return anything.
|
||||
|
||||
matching `:enddef`. *E1073*
|
||||
*E1011*
|
||||
The {name} must be less than 100 bytes long.
|
||||
*E1003* *E1027* *E1056* *E1059*
|
||||
The type of value used with `:return` must match
|
||||
{return-type}. When {return-type} is omitted or is
|
||||
"void" the function is not expected to return
|
||||
anything.
|
||||
*E1077*
|
||||
{arguments} is a sequence of zero or more argument
|
||||
declarations. There are three forms:
|
||||
{name}: {type}
|
||||
@@ -1096,7 +1106,7 @@ Using ++var or --var in an expression is not supported yet.
|
||||
later in Vim9 script. They can only be removed by
|
||||
reloading the same script.
|
||||
|
||||
*:enddef*
|
||||
*:enddef* *E1057*
|
||||
:enddef End of a function defined with `:def`. It should be on
|
||||
a line by its own.
|
||||
|
||||
@@ -1116,7 +1126,7 @@ prefix if they do not exist at the time of compiling.
|
||||
|
||||
*:disa* *:disassemble*
|
||||
:disa[ssemble] {func} Show the instructions generated for {func}.
|
||||
This is for debugging and testing.
|
||||
This is for debugging and testing. *E1061*
|
||||
Note that for command line completion of {func} you
|
||||
can prepend "s:" to find script-local functions.
|
||||
|
||||
@@ -1178,7 +1188,8 @@ for each closure call a function to define it: >
|
||||
==============================================================================
|
||||
|
||||
4. Types *vim9-types*
|
||||
|
||||
*E1008* *E1009* *E1010* *E1012*
|
||||
*E1013* *E1029* *E1030*
|
||||
The following builtin types are supported:
|
||||
bool
|
||||
number
|
||||
@@ -1193,17 +1204,19 @@ The following builtin types are supported:
|
||||
func: {type}
|
||||
func({type}, ...)
|
||||
func({type}, ...): {type}
|
||||
void
|
||||
|
||||
Not supported yet:
|
||||
tuple<a: {type}, b: {type}, ...>
|
||||
|
||||
These types can be used in declarations, but no simple value will actually
|
||||
have the "void" type.
|
||||
have the "void" type. Trying to use a void (e.g. a function without a
|
||||
return value) results in error *E1031* .
|
||||
|
||||
There is no array type, use list<{type}> instead. For a list constant an
|
||||
efficient implementation is used that avoids allocating lot of small pieces of
|
||||
memory.
|
||||
|
||||
*E1005* *E1007*
|
||||
A partial and function can be declared in more or less specific ways:
|
||||
func any kind of function reference, no type
|
||||
checking for arguments or return value
|
||||
@@ -1432,7 +1445,7 @@ Exporting an item can be written as: >
|
||||
export def MyFunc() ...
|
||||
export class MyClass ...
|
||||
export interface MyClass ...
|
||||
|
||||
< *E1043* *E1044*
|
||||
As this suggests, only constants, variables, `:def` functions and classes can
|
||||
be exported. {not implemented yet: class, interface}
|
||||
|
||||
@@ -1441,19 +1454,23 @@ be exported. {not implemented yet: class, interface}
|
||||
|
||||
|
||||
Import ~
|
||||
*:import* *:imp* *E1094*
|
||||
*:import* *:imp* *E1094* *E1047*
|
||||
*E1048* *E1049* *E1053* *E1071*
|
||||
The exported items can be imported in another Vim9 script: >
|
||||
import "myscript.vim"
|
||||
|
||||
This makes each item available as "myscript.item".
|
||||
|
||||
*:import-as*
|
||||
In case the name is long or ambiguous, another name can be specified: >
|
||||
import "thatscript.vim" as that
|
||||
|
||||
< *E1060*
|
||||
Then you can use "that.EXPORTED_CONST", "that.someValue", etc. You are free
|
||||
to choose the name "that". Use something that will be recognized as referring
|
||||
to the imported script. Avoid command names and builtin function names,
|
||||
because the name will shadow them.
|
||||
because the name will shadow them. If the name starts with a capital letter
|
||||
it can also shadow global user commands and functions. Also, you cannot use
|
||||
the name for something else in the script, such as a function or variable
|
||||
name.
|
||||
|
||||
In case the dot in the name is undesired, a local reference can be made for a
|
||||
function: >
|
||||
@@ -1466,6 +1483,12 @@ This does not work for variables, since the value would be copied once and
|
||||
when changing the variable the copy will change, not the original variable.
|
||||
You will need to use the full name, with the dot.
|
||||
|
||||
The full syntax of the command is:
|
||||
import {filename} [as {name}]
|
||||
Where {filename} is an expression that must evaluate to a string. Without the
|
||||
"as {name}" part it must end in ".vim". {name} must consist of letters,
|
||||
digits and '_', like |internal-variables|.
|
||||
|
||||
`:import` can also be used in legacy Vim script. The imported items still
|
||||
become script-local, even when the "s:" prefix is not given.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*visual.txt* For Vim version 8.2. Last change: 2021 Nov 21
|
||||
*visual.txt* For Vim version 8.2. Last change: 2022 Jan 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
+69
-3
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Jan 13
|
||||
" Last Change: 2022 Jan 23
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -654,6 +654,9 @@ au BufNewFile,BufRead *.fsl setf framescript
|
||||
" FStab
|
||||
au BufNewFile,BufRead fstab,mtab setf fstab
|
||||
|
||||
" Fusion
|
||||
au BufRead,BufNewFile *.fusion setf fusion
|
||||
|
||||
" F# or Forth
|
||||
au BufNewFile,BufRead *.fs call dist#ft#FTfs()
|
||||
|
||||
@@ -666,6 +669,12 @@ au BufNewFile,BufRead .gdbinit,gdbinit setf gdb
|
||||
" GDMO
|
||||
au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
|
||||
" GDscript
|
||||
au BufNewFile,BufRead *.gd setf gdscript
|
||||
|
||||
" Godot resource
|
||||
au BufRead,BufNewFile *.tscn,*.tres setf gdresource
|
||||
|
||||
" Gedcom
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
@@ -678,8 +687,10 @@ autocmd BufRead,BufNewFile *.gift setf gift
|
||||
" Git
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead NOTES_EDITMSG,EDIT_DESCRIPTION setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,*/etc/gitconfig setf gitconfig
|
||||
au BufNewFile,BufRead */.config/git/config setf gitconfig
|
||||
au BufNewFile,BufRead *.git/config.worktree setf gitconfig
|
||||
au BufNewFile,BufRead *.git/worktrees/*/config.worktree setf gitconfig
|
||||
au BufNewFile,BufRead .gitmodules,*.git/modules/*/config setf gitconfig
|
||||
if !empty($XDG_CONFIG_HOME)
|
||||
au BufNewFile,BufRead $XDG_CONFIG_HOME/git/config setf gitconfig
|
||||
@@ -694,6 +705,9 @@ au BufNewFile,BufRead *.git/*
|
||||
" Gkrellmrc
|
||||
au BufNewFile,BufRead gkrellmrc,gkrellmrc_? setf gkrellmrc
|
||||
|
||||
" GLSL
|
||||
au BufNewFile,BufRead *.glsl setf glsl
|
||||
|
||||
" GP scripts (2.0 and onward)
|
||||
au BufNewFile,BufRead *.gp,.gprc setf gp
|
||||
|
||||
@@ -714,15 +728,19 @@ au BufNewFile,BufRead gitolite.conf setf gitolite
|
||||
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
|
||||
|
||||
" Gnuplot scripts
|
||||
au BufNewFile,BufRead *.gpi setf gnuplot
|
||||
au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot
|
||||
|
||||
" Go (Google)
|
||||
au BufNewFile,BufRead *.go setf go
|
||||
au BufNewFile,BufRead Gopkg.lock setf toml
|
||||
au BufRead,BufNewFile go.work setf gowork
|
||||
|
||||
" GrADS scripts
|
||||
au BufNewFile,BufRead *.gs setf grads
|
||||
|
||||
" GraphQL
|
||||
au BufNewFile,BufRead *.graphql,*.graphqls,*.gql setf graphql
|
||||
|
||||
" Gretl
|
||||
au BufNewFile,BufRead *.gretl setf gretl
|
||||
|
||||
@@ -738,12 +756,18 @@ au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/
|
||||
" GTK RC
|
||||
au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
|
||||
|
||||
" Hack
|
||||
au BufRead,BufNewFile *.hack,*.hackpartial setf hack
|
||||
|
||||
" Haml
|
||||
au BufNewFile,BufRead *.haml setf haml
|
||||
|
||||
" Hamster Classic | Playground files
|
||||
au BufNewFile,BufRead *.hsm setf hamster
|
||||
|
||||
" Handlebars
|
||||
au BufNewFile,BufRead *.hbs setf handlebars
|
||||
|
||||
" Haskell
|
||||
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell
|
||||
au BufNewFile,BufRead *.lhs setf lhaskell
|
||||
@@ -756,12 +780,21 @@ au BufNewFile,BufRead cabal.config setf cabalconfig
|
||||
au BufNewFile,BufRead *.ht setf haste
|
||||
au BufNewFile,BufRead *.htpp setf hastepreproc
|
||||
|
||||
" HCL
|
||||
au BufRead,BufNewFile *.hcl setf hcl
|
||||
|
||||
" Hercules
|
||||
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
|
||||
|
||||
" HEEx
|
||||
au BufRead,BufNewFile *.heex setf heex
|
||||
|
||||
" HEX (Intel)
|
||||
au BufNewFile,BufRead *.hex,*.h32 setf hex
|
||||
|
||||
" Hjson
|
||||
au BufNewFile,BufRead *.hjson setf hjson
|
||||
|
||||
" Hollywood
|
||||
au BufRead,BufNewFile *.hws setf hollywood
|
||||
|
||||
@@ -886,6 +919,9 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
|
||||
" JSON
|
||||
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
|
||||
|
||||
" JSON5
|
||||
au BufNewFile,BufRead *.json5 setf json5
|
||||
|
||||
" JSON Patch (RFC 6902)
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
|
||||
@@ -937,6 +973,9 @@ au BufNewFile,BufRead *.ldif setf ldif
|
||||
" Ld loader
|
||||
au BufNewFile,BufRead *.ld setf ld
|
||||
|
||||
" Ledger
|
||||
au BufRead,BufNewFile *.ldg,*.ledger,*.journal setf ledger
|
||||
|
||||
" Less
|
||||
au BufNewFile,BufRead *.less setf less
|
||||
|
||||
@@ -1174,6 +1213,9 @@ au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/etc/nginx/*,*/usr/local/
|
||||
" Ninja file
|
||||
au BufNewFile,BufRead *.ninja setf ninja
|
||||
|
||||
" Nix
|
||||
au BufRead,BufNewFile *.nix setf nix
|
||||
|
||||
" NPM RC file
|
||||
au BufNewFile,BufRead npmrc,.npmrc setf dosini
|
||||
|
||||
@@ -1359,6 +1401,9 @@ au BufNewFile,BufRead *printcap
|
||||
au BufNewFile,BufRead *termcap
|
||||
\ let b:ptcap_type = "term" | setf ptcap
|
||||
|
||||
" Prisma
|
||||
au BufRead,BufNewFile *.prisma setf prisma
|
||||
|
||||
" PCCTS / ANTLR
|
||||
"au BufNewFile,BufRead *.g setf antlr
|
||||
au BufNewFile,BufRead *.g setf pccts
|
||||
@@ -1366,6 +1411,9 @@ au BufNewFile,BufRead *.g setf pccts
|
||||
" PPWizard
|
||||
au BufNewFile,BufRead *.it,*.ih setf ppwiz
|
||||
|
||||
" Pug
|
||||
au BufRead,BufNewFile *.pug setf pug
|
||||
|
||||
" Puppet
|
||||
au BufNewFile,BufRead Puppetfile setf ruby
|
||||
|
||||
@@ -1431,6 +1479,9 @@ au BufNewFile,BufRead *.pyx,*.pxd setf pyrex
|
||||
au BufNewFile,BufRead *.py,*.pyw,.pythonstartup,.pythonrc setf python
|
||||
au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
|
||||
|
||||
" QL
|
||||
au BufRead,BufNewFile *.ql,*.qll setf ql
|
||||
|
||||
" Radiance
|
||||
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
||||
|
||||
@@ -1835,6 +1886,9 @@ au BufNewFile,BufRead */etc/sudoers,sudoers.tmp setf sudoers
|
||||
" SVG (Scalable Vector Graphics)
|
||||
au BufNewFile,BufRead *.svg setf svg
|
||||
|
||||
" Surface
|
||||
au BufRead,BufNewFile *.sface setf surface
|
||||
|
||||
" Tads (or Nroff or Perl test file)
|
||||
au BufNewFile,BufRead *.t
|
||||
\ if !dist#ft#FTnroff() && !dist#ft#FTperl() | setf tads | endif
|
||||
@@ -1852,6 +1906,9 @@ au BufRead,BufNewFile *.task setf taskedit
|
||||
" Tcl (JACL too)
|
||||
au BufNewFile,BufRead *.tcl,*.tm,*.tk,*.itcl,*.itk,*.jacl,.tclshrc,.wishrc setf tcl
|
||||
|
||||
" Teal
|
||||
au BufRead,BufNewFile *.tl setf teal
|
||||
|
||||
" TealInfo
|
||||
au BufNewFile,BufRead *.tli setf tli
|
||||
|
||||
@@ -1869,6 +1926,9 @@ au BufRead,BufNewFile *.ttl
|
||||
" Terminfo
|
||||
au BufNewFile,BufRead *.ti setf terminfo
|
||||
|
||||
" Terraform
|
||||
au BufRead,BufNewFile *.tfvars setf terraform
|
||||
|
||||
" TeX
|
||||
au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
|
||||
au BufNewFile,BufRead *.tex call dist#ft#FTtex()
|
||||
@@ -1888,6 +1948,9 @@ au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
|
||||
" TF mud client
|
||||
au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
|
||||
|
||||
" TLA+
|
||||
au BufRead,BufNewFile *.tla setf tla
|
||||
|
||||
" tmux configuration
|
||||
au BufNewFile,BufRead {.,}tmux*.conf setf tmux
|
||||
|
||||
@@ -2146,6 +2209,9 @@ au BufNewFile,BufRead *.raml setf raml
|
||||
" yum conf (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/yum.conf setf dosini
|
||||
|
||||
" YANG
|
||||
au BufRead,BufNewFile *.yang setf yang
|
||||
|
||||
" Zimbu
|
||||
au BufNewFile,BufRead *.zu setf zimbu
|
||||
" Zimbu Templates
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# Translators: This is the Application Name used in the GVim desktop file
|
||||
Name[de]=GVim
|
||||
Name[eo]=GVim
|
||||
Name[fi]=GVim
|
||||
Name[fr]=GVim
|
||||
Name[it]=GVim
|
||||
Name[ru]=GVim
|
||||
@@ -13,6 +14,7 @@ Name=GVim
|
||||
# Translators: This is the Generic Application Name used in the Vim desktop file
|
||||
GenericName[de]=Texteditor
|
||||
GenericName[eo]=Tekstoredaktilo
|
||||
GenericName[fi]=Tekstinmuokkain
|
||||
GenericName[fr]=Éditeur de texte
|
||||
GenericName[it]=Editor di testi
|
||||
GenericName[ja]=テキストエディタ
|
||||
@@ -23,6 +25,7 @@ GenericName=Text Editor
|
||||
# Translators: This is the comment used in the Vim desktop file
|
||||
Comment[de]=Textdateien bearbeiten
|
||||
Comment[eo]=Redakti tekstajn dosierojn
|
||||
Comment[fi]=Muokkaa tekstitiedostoja
|
||||
Comment[fr]=Éditer des fichiers texte
|
||||
Comment[it]=Edita file di testo
|
||||
Comment[ja]=テキストファイルを編集します
|
||||
@@ -54,7 +57,6 @@ Comment[es]=Edita archivos de texto
|
||||
Comment[et]=Redigeeri tekstifaile
|
||||
Comment[eu]=Editatu testu-fitxategiak
|
||||
Comment[fa]=ویرایش پروندههای متنی
|
||||
Comment[fi]=Muokkaa tekstitiedostoja
|
||||
Comment[ga]=Eagar comhad Téacs
|
||||
Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
|
||||
Comment[he]=ערוך קבצי טקסט
|
||||
@@ -103,6 +105,7 @@ Type=Application
|
||||
# Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
|
||||
Keywords[de]=Text;Editor;
|
||||
Keywords[eo]=Teksto;redaktilo;
|
||||
Keywords[fi]=Teksti;muokkain;editori;
|
||||
Keywords[fr]=Texte;éditeur;
|
||||
Keywords[it]=Testo;editor;
|
||||
Keywords[ja]=テキスト;エディタ;
|
||||
|
||||
+2
-1
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2022 Jan 13
|
||||
" Last Change: 2022 Jan 17
|
||||
"
|
||||
" WORK IN PROGRESS - Only the basics work
|
||||
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
||||
@@ -1254,6 +1254,7 @@ func s:HandleCursor(msg)
|
||||
if lnum =~ '^[0-9]*$'
|
||||
call s:GotoSourcewinOrCreateIt()
|
||||
if expand('%:p') != fnamemodify(fname, ':p')
|
||||
echomsg 'different fname: "' .. expand('%:p') .. '" vs "' .. fnamemodify(fname, ':p') .. '"'
|
||||
augroup Termdebug
|
||||
" Always open a file read-only instead of showing the ATTENTION
|
||||
" prompt, since we are unlikely to want to edit the file.
|
||||
|
||||
+11
-10
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: M$ Resource files (*.rc)
|
||||
" Maintainer: Christian Brabandt
|
||||
" Last Change: 2015-05-29
|
||||
" Last Change: 20220116
|
||||
" Repository: https://github.com/chrisbra/vim-rc-syntax
|
||||
" License: Vim (see :h license)
|
||||
" Previous Maintainer: Heiko Erhardt <Heiko.Erhardt@munich.netsurf.de>
|
||||
@@ -173,16 +173,17 @@ hi def link rcAttribute rcCommonAttribute
|
||||
hi def link rcStdId rcStatement
|
||||
hi def link rcStatement Statement
|
||||
|
||||
" Default color overrides
|
||||
hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow
|
||||
hi def rcMainObject term=underline ctermfg=Blue guifg=Blue
|
||||
hi def rcSubObject ctermfg=Green guifg=Green
|
||||
hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green
|
||||
hi def rcParam ctermfg=DarkGreen guifg=DarkGreen
|
||||
hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen
|
||||
hi def rcCommonAttribute ctermfg=Brown guifg=Brown
|
||||
hi def link rcLanguage Constant
|
||||
hi def link rcCaptionParam Constant
|
||||
hi def link rcCommonAttribute Constant
|
||||
|
||||
hi def link rcMainObject Identifier
|
||||
hi def link rcSubObject Define
|
||||
hi def link rcParam Constant
|
||||
hi def link rcStatement Statement
|
||||
"
|
||||
"hi def link rcIdentifier Identifier
|
||||
|
||||
"hi def link rcIdentifier Identifier
|
||||
|
||||
|
||||
let b:current_syntax = "rc"
|
||||
|
||||
+55
-55
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Derek Wyatt
|
||||
" URL: https://github.com/derekwyatt/vim-scala
|
||||
" License: Same as Vim
|
||||
" Last Change: 23 August 2021
|
||||
" Last Change: 23 January 2022
|
||||
" ----------------------------------------------------------------------------
|
||||
|
||||
if !exists('main_syntax')
|
||||
@@ -43,55 +43,55 @@ syn keyword scalaKeyword class trait object extends with nextgroup=scalaInstance
|
||||
syn keyword scalaKeyword case nextgroup=scalaKeyword,scalaCaseFollowing skipwhite
|
||||
syn keyword scalaKeyword val nextgroup=scalaNameDefinition,scalaQuasiQuotes skipwhite
|
||||
syn keyword scalaKeyword def var nextgroup=scalaNameDefinition skipwhite
|
||||
hi link scalaKeyword Keyword
|
||||
hi def link scalaKeyword Keyword
|
||||
|
||||
exe 'syn region scalaBlock start=/{/ end=/}/ contains=' . s:ContainedGroup() . ' fold'
|
||||
|
||||
syn keyword scalaAkkaSpecialWord when goto using startWith initialize onTransition stay become unbecome
|
||||
hi link scalaAkkaSpecialWord PreProc
|
||||
hi def link scalaAkkaSpecialWord PreProc
|
||||
|
||||
syn keyword scalatestSpecialWord shouldBe
|
||||
syn match scalatestShouldDSLA /^\s\+\zsit should/
|
||||
syn match scalatestShouldDSLB /\<should\>/
|
||||
hi link scalatestSpecialWord PreProc
|
||||
hi link scalatestShouldDSLA PreProc
|
||||
hi link scalatestShouldDSLB PreProc
|
||||
hi def link scalatestSpecialWord PreProc
|
||||
hi def link scalatestShouldDSLA PreProc
|
||||
hi def link scalatestShouldDSLB PreProc
|
||||
|
||||
syn match scalaSymbol /'[_A-Za-z0-9$]\+/
|
||||
hi link scalaSymbol Number
|
||||
hi def link scalaSymbol Number
|
||||
|
||||
syn match scalaChar /'.'/
|
||||
syn match scalaChar /'\\[\\"'ntbrf]'/ contains=scalaEscapedChar
|
||||
syn match scalaChar /'\\u[A-Fa-f0-9]\{4}'/ contains=scalaUnicodeChar
|
||||
syn match scalaEscapedChar /\\[\\"'ntbrf]/
|
||||
syn match scalaUnicodeChar /\\u[A-Fa-f0-9]\{4}/
|
||||
hi link scalaChar Character
|
||||
hi link scalaEscapedChar Special
|
||||
hi link scalaUnicodeChar Special
|
||||
hi def link scalaChar Character
|
||||
hi def link scalaEscapedChar Special
|
||||
hi def link scalaUnicodeChar Special
|
||||
|
||||
syn match scalaOperator "||"
|
||||
syn match scalaOperator "&&"
|
||||
syn match scalaOperator "|"
|
||||
syn match scalaOperator "&"
|
||||
hi link scalaOperator Special
|
||||
hi def link scalaOperator Special
|
||||
|
||||
syn match scalaNameDefinition /\<[_A-Za-z0-9$]\+\>/ contained nextgroup=scalaPostNameDefinition,scalaVariableDeclarationList
|
||||
syn match scalaNameDefinition /`[^`]\+`/ contained nextgroup=scalaPostNameDefinition
|
||||
syn match scalaVariableDeclarationList /\s*,\s*/ contained nextgroup=scalaNameDefinition
|
||||
syn match scalaPostNameDefinition /\_s*:\_s*/ contained nextgroup=scalaTypeDeclaration
|
||||
hi link scalaNameDefinition Function
|
||||
hi def link scalaNameDefinition Function
|
||||
|
||||
syn match scalaInstanceDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaInstanceHash
|
||||
syn match scalaInstanceDeclaration /`[^`]\+`/ contained
|
||||
syn match scalaInstanceHash /#/ contained nextgroup=scalaInstanceDeclaration
|
||||
hi link scalaInstanceDeclaration Special
|
||||
hi link scalaInstanceHash Type
|
||||
hi def link scalaInstanceDeclaration Special
|
||||
hi def link scalaInstanceHash Type
|
||||
|
||||
syn match scalaUnimplemented /???/
|
||||
hi link scalaUnimplemented ERROR
|
||||
hi def link scalaUnimplemented ERROR
|
||||
|
||||
syn match scalaCapitalWord /\<[A-Z][A-Za-z0-9$]*\>/
|
||||
hi link scalaCapitalWord Special
|
||||
hi def link scalaCapitalWord Special
|
||||
|
||||
" Handle type declarations specially
|
||||
syn region scalaTypeStatement matchgroup=Keyword start=/\<type\_s\+\ze/ end=/$/ contains=scalaTypeTypeDeclaration,scalaSquareBrackets,scalaTypeTypeEquals,scalaTypeStatement
|
||||
@@ -105,18 +105,18 @@ syn match scalaTypeTypeEquals /=\ze[^>]/ contained nextgroup=scalaTypeTypePostDe
|
||||
syn match scalaTypeTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeTypeDeclaration skipwhite
|
||||
syn match scalaTypeTypePostDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypePostExtension skipwhite
|
||||
syn match scalaTypeTypePostExtension /\%(⇒\|=>\|<:\|:>\|=:=\|::\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeTypePostDeclaration skipwhite
|
||||
hi link scalaTypeTypeDeclaration Type
|
||||
hi link scalaTypeTypeExtension Keyword
|
||||
hi link scalaTypeTypePostDeclaration Special
|
||||
hi link scalaTypeTypePostExtension Keyword
|
||||
hi def link scalaTypeTypeDeclaration Type
|
||||
hi def link scalaTypeTypeExtension Keyword
|
||||
hi def link scalaTypeTypePostDeclaration Special
|
||||
hi def link scalaTypeTypePostExtension Keyword
|
||||
|
||||
syn match scalaTypeDeclaration /(/ contained nextgroup=scalaTypeExtension contains=scalaRoundBrackets skipwhite
|
||||
syn match scalaTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeDeclaration contains=scalaTypeExtension skipwhite
|
||||
syn match scalaTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeExtension skipwhite
|
||||
syn match scalaTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeDeclaration skipwhite
|
||||
hi link scalaTypeDeclaration Type
|
||||
hi link scalaTypeExtension Keyword
|
||||
hi link scalaTypePostExtension Keyword
|
||||
hi def link scalaTypeDeclaration Type
|
||||
hi def link scalaTypeExtension Keyword
|
||||
hi def link scalaTypePostExtension Keyword
|
||||
|
||||
syn match scalaTypeAnnotation /\%([_a-zA-Z0-9$\s]:\_s*\)\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration contains=scalaRoundBrackets
|
||||
syn match scalaTypeAnnotation /)\_s*:\_s*\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration
|
||||
@@ -124,51 +124,51 @@ hi clear scalaTypeAnnotation
|
||||
|
||||
syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained contains=scalaCapitalWord
|
||||
syn match scalaCaseFollowing /`[^`]\+`/ contained contains=scalaCapitalWord
|
||||
hi link scalaCaseFollowing Special
|
||||
hi def link scalaCaseFollowing Special
|
||||
|
||||
syn keyword scalaKeywordModifier abstract override final lazy implicit private protected sealed null super
|
||||
syn keyword scalaSpecialFunction implicitly require
|
||||
hi link scalaKeywordModifier Function
|
||||
hi link scalaSpecialFunction Function
|
||||
hi def link scalaKeywordModifier Function
|
||||
hi def link scalaSpecialFunction Function
|
||||
|
||||
syn keyword scalaSpecial this true false ne eq
|
||||
syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite
|
||||
syn match scalaSpecial "\%(=>\|⇒\|<-\|←\|->\|→\)"
|
||||
syn match scalaSpecial /`[^`]\+`/ " Backtick literals
|
||||
hi link scalaSpecial PreProc
|
||||
hi def link scalaSpecial PreProc
|
||||
|
||||
syn keyword scalaExternal package import
|
||||
hi link scalaExternal Include
|
||||
hi def link scalaExternal Include
|
||||
|
||||
syn match scalaStringEmbeddedQuote /\\"/ contained
|
||||
syn region scalaString start=/"/ end=/"/ contains=scalaStringEmbeddedQuote,scalaEscapedChar,scalaUnicodeChar
|
||||
hi link scalaString String
|
||||
hi link scalaStringEmbeddedQuote String
|
||||
hi def link scalaString String
|
||||
hi def link scalaStringEmbeddedQuote String
|
||||
|
||||
syn region scalaIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||
syn region scalaTripleIString matchgroup=scalaInterpolationBrackets start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\ze\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||
hi link scalaIString String
|
||||
hi link scalaTripleIString String
|
||||
hi def link scalaIString String
|
||||
hi def link scalaTripleIString String
|
||||
|
||||
syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained
|
||||
exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup()
|
||||
hi link scalaInterpolation Function
|
||||
hi def link scalaInterpolation Function
|
||||
hi clear scalaInterpolationB
|
||||
|
||||
syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||
syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained
|
||||
exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup()
|
||||
hi link scalaFString String
|
||||
hi link scalaFInterpolation Function
|
||||
hi def link scalaFString String
|
||||
hi def link scalaFInterpolation Function
|
||||
hi clear scalaFInterpolationB
|
||||
|
||||
syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar
|
||||
syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
|
||||
hi link scalaTripleString String
|
||||
hi link scalaTripleFString String
|
||||
hi def link scalaTripleString String
|
||||
hi def link scalaTripleFString String
|
||||
|
||||
hi link scalaInterpolationBrackets Special
|
||||
hi link scalaInterpolationBoundary Function
|
||||
hi def link scalaInterpolationBrackets Special
|
||||
hi def link scalaInterpolationBoundary Function
|
||||
|
||||
syn match scalaNumber /\<0[dDfFlL]\?\>/ " Just a bare 0
|
||||
syn match scalaNumber /\<[1-9]\d*[dDfFlL]\?\>/ " A multi-digit number - octal numbers with leading 0's are deprecated in Scala
|
||||
@@ -176,16 +176,16 @@ syn match scalaNumber /\<0[xX][0-9a-fA-F]\+[dDfFlL]\?\>/ " Hex number
|
||||
syn match scalaNumber /\%(\<\d\+\.\d*\|\.\d\+\)\%([eE][-+]\=\d\+\)\=[fFdD]\=/ " exponential notation 1
|
||||
syn match scalaNumber /\<\d\+[eE][-+]\=\d\+[fFdD]\=\>/ " exponential notation 2
|
||||
syn match scalaNumber /\<\d\+\%([eE][-+]\=\d\+\)\=[fFdD]\>/ " exponential notation 3
|
||||
hi link scalaNumber Number
|
||||
hi def link scalaNumber Number
|
||||
|
||||
syn region scalaRoundBrackets start="(" end=")" skipwhite contained contains=scalaTypeDeclaration,scalaSquareBrackets,scalaRoundBrackets
|
||||
|
||||
syn region scalaSquareBrackets matchgroup=scalaSquareBracketsBrackets start="\[" end="\]" skipwhite nextgroup=scalaTypeExtension contains=scalaTypeDeclaration,scalaSquareBrackets,scalaTypeOperator,scalaTypeAnnotationParameter
|
||||
syn match scalaTypeOperator /[-+=:<>]\+/ contained
|
||||
syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained
|
||||
hi link scalaSquareBracketsBrackets Type
|
||||
hi link scalaTypeOperator Keyword
|
||||
hi link scalaTypeAnnotationParameter Function
|
||||
hi def link scalaSquareBracketsBrackets Type
|
||||
hi def link scalaTypeOperator Keyword
|
||||
hi def link scalaTypeAnnotationParameter Function
|
||||
|
||||
syn match scalaShebang "\%^#!.*" display
|
||||
syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@Spell keepend fold
|
||||
@@ -195,20 +195,20 @@ syn match scalaParamAnnotationValue /[.`_A-Za-z0-9$]\+/ contained
|
||||
syn region scalaDocLinks start="\[\[" end="\]\]" contained
|
||||
syn region scalaCommentCodeBlock matchgroup=Keyword start="{{{" end="}}}" contained
|
||||
syn match scalaTodo "\vTODO|FIXME|XXX" contained
|
||||
hi link scalaShebang Comment
|
||||
hi link scalaMultilineComment Comment
|
||||
hi link scalaDocLinks Function
|
||||
hi link scalaParameterAnnotation Function
|
||||
hi link scalaParamAnnotationValue Keyword
|
||||
hi link scalaCommentAnnotation Function
|
||||
hi link scalaCommentCodeBlock String
|
||||
hi link scalaTodo Todo
|
||||
hi def link scalaShebang Comment
|
||||
hi def link scalaMultilineComment Comment
|
||||
hi def link scalaDocLinks Function
|
||||
hi def link scalaParameterAnnotation Function
|
||||
hi def link scalaParamAnnotationValue Keyword
|
||||
hi def link scalaCommentAnnotation Function
|
||||
hi def link scalaCommentCodeBlock String
|
||||
hi def link scalaTodo Todo
|
||||
|
||||
syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/
|
||||
hi link scalaAnnotation PreProc
|
||||
hi def link scalaAnnotation PreProc
|
||||
|
||||
syn match scalaTrailingComment "//.*$" contains=scalaTodo,@Spell
|
||||
hi link scalaTrailingComment Comment
|
||||
hi def link scalaTrailingComment Comment
|
||||
|
||||
syn match scalaAkkaFSM /goto([^)]*)\_s\+\<using\>/ contains=scalaAkkaFSMGotoUsing
|
||||
syn match scalaAkkaFSM /stay\_s\+using/
|
||||
@@ -221,8 +221,8 @@ syn match scalaAkkaFSM /onTermination/
|
||||
syn match scalaAkkaFSM /whenUnhandled/
|
||||
syn match scalaAkkaFSMGotoUsing /\<using\>/
|
||||
syn match scalaAkkaFSMGotoUsing /\<goto\>/
|
||||
hi link scalaAkkaFSM PreProc
|
||||
hi link scalaAkkaFSMGotoUsing PreProc
|
||||
hi def link scalaAkkaFSM PreProc
|
||||
hi def link scalaAkkaFSMGotoUsing PreProc
|
||||
|
||||
let b:current_syntax = 'scala'
|
||||
|
||||
|
||||
+4
-1
@@ -4,6 +4,7 @@
|
||||
# Translators: This is the Application Name used in the Vim desktop file
|
||||
Name[de]=Vim
|
||||
Name[eo]=Vim
|
||||
Name[fi]=Vim
|
||||
Name[fr]=Vim
|
||||
Name[it]=Vim
|
||||
Name[ru]=Vim
|
||||
@@ -13,6 +14,7 @@ Name=Vim
|
||||
# Translators: This is the Generic Application Name used in the Vim desktop file
|
||||
GenericName[de]=Texteditor
|
||||
GenericName[eo]=Tekstoredaktilo
|
||||
GenericName[fi]=Tekstinmuokkain
|
||||
GenericName[fr]=Éditeur de texte
|
||||
GenericName[it]=Editor di testi
|
||||
GenericName[ja]=テキストエディタ
|
||||
@@ -23,6 +25,7 @@ GenericName=Text Editor
|
||||
# Translators: This is the comment used in the Vim desktop file
|
||||
Comment[de]=Textdateien bearbeiten
|
||||
Comment[eo]=Redakti tekstajn dosierojn
|
||||
Comment[fi]=Muokkaa tekstitiedostoja
|
||||
Comment[fr]=Éditer des fichiers texte
|
||||
Comment[it]=Edita file di testo
|
||||
Comment[ja]=テキストファイルを編集します
|
||||
@@ -54,7 +57,6 @@ Comment[es]=Edita archivos de texto
|
||||
Comment[et]=Redigeeri tekstifaile
|
||||
Comment[eu]=Editatu testu-fitxategiak
|
||||
Comment[fa]=ویرایش پروندههای متنی
|
||||
Comment[fi]=Muokkaa tekstitiedostoja
|
||||
Comment[ga]=Eagar comhad Téacs
|
||||
Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
|
||||
Comment[he]=ערוך קבצי טקסט
|
||||
@@ -103,6 +105,7 @@ Type=Application
|
||||
# Translators: Search terms to find this application. Do NOT change the semicolons! The list MUST also end with a semicolon!
|
||||
Keywords[de]=Text;Editor;
|
||||
Keywords[eo]=Teksto;redaktilo;
|
||||
Keywords[fi]=Teksti;muokkain;editori;
|
||||
Keywords[fr]=Texte;éditeur;
|
||||
Keywords[it]=Testo;editor;
|
||||
Keywords[ja]=テキスト;エディタ;
|
||||
|
||||
@@ -44,12 +44,6 @@
|
||||
#include <shlobj.h>
|
||||
#include <wchar.h>
|
||||
|
||||
/* Accommodate old versions of VC that don't have a modern Platform SDK */
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1300) || !defined(MAXULONG_PTR)
|
||||
# undef UINT_PTR
|
||||
# define UINT_PTR UINT
|
||||
#endif
|
||||
|
||||
#define ResultFromShort(i) ResultFromScode(MAKE_SCODE(SEVERITY_SUCCESS, 0, (USHORT)(i)))
|
||||
|
||||
// Initialize GUIDs (should be done only and at-least once per DLL/EXE)
|
||||
|
||||
+2
-77
@@ -155,83 +155,8 @@ OLDER VERSIONS
|
||||
The minimal supported version is Windows XP. Building with older compilers
|
||||
might still work, but these instructions might be outdated.
|
||||
|
||||
If you need the executable to run on Windows 98 or ME, use the 2003 one
|
||||
|msvc-2003-toolkit| or |msvc-2005-express|, and use the source code before
|
||||
8.0.0029.
|
||||
|
||||
Visual C++ Toolkit 2003 *msvc-2003-toolkit*
|
||||
-----------------------
|
||||
|
||||
NOTE: this most likely does not work
|
||||
|
||||
You could download the Microsoft Visual C++ Toolkit 2003 from
|
||||
http://msdn.microsoft.com/visualc/vctoolkit2003/
|
||||
Unfortunately this URL is no longer valid. Unofficial downloads appear to be
|
||||
available from links mentioned on these pages (use at your own risk):
|
||||
http://www.filewatcher.com/m/VCToolkitSetup.exe.32952488.0.0.html
|
||||
http://feargame.net/wiki/index.php?title=Building_Source_with_the_VC2003_Toolkit
|
||||
|
||||
This contains the command-line tools (compiler, linker, CRT headers,
|
||||
and libraries) for Visual Studio .NET 2003, but not the Visual Studio IDE.
|
||||
To compile and debug Vim with the VC2003 Toolkit, you will also need
|
||||
|ms-platform-sdk|, |dotnet-1.1-redist|, |dotnet-1.1-sdk|,
|
||||
and |windbg-download|.
|
||||
|
||||
It's easier to download Visual C++ 2008 Express Edition, |msvc-2008-express|,
|
||||
which is freely available in perpetuity.
|
||||
|
||||
The free Code::Blocks IDE works with the VC2003 Toolkit, as described at
|
||||
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE
|
||||
(This site also takes you through configuring a number of other
|
||||
free C compilers for Win32.)
|
||||
|
||||
To compile Vim using the VC2003 Toolkit and Make_mvc.mak, you must first
|
||||
execute the following commands in a cmd.exe window (the msvcsetup.bat batch
|
||||
file can be used):
|
||||
|
||||
set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH%
|
||||
call "%VCToolkitInstallDir%vcvars32.bat"
|
||||
set MSVCVer=7.1
|
||||
call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd"
|
||||
set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB%
|
||||
|
||||
Now you can build Vim with Make_mvc.mak.
|
||||
|
||||
|
||||
Getting the Windows Platform SDK *ms-platform-sdk*
|
||||
|
||||
You will also need a copy of the Windows Platform SDK. Specifically, you need
|
||||
the Windows Core SDK subset of the Platform SDK, which contains the Windows
|
||||
headers and libraries. You need to search for it, Microsoft keeps changing
|
||||
the URL.
|
||||
|
||||
|
||||
Getting the .NET Framework 1.1 Runtime *dotnet-1.1-redist*
|
||||
|
||||
You need the .NET Framework 1.1 Redistributable Package from
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=262d25e3-f589-4842-8157-034d1e7cf3a3
|
||||
or from Windows Update:
|
||||
http://windowsupdate.microsoft.com/
|
||||
This is needed to install |dotnet-1.1-sdk|. It also contains cvtres.exe,
|
||||
which is needed to link Vim.
|
||||
|
||||
|
||||
Getting the .NET Framework 1.1 SDK *dotnet-1.1-sdk*
|
||||
|
||||
You need the .NET Framework 1.1 SDK from
|
||||
http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d
|
||||
This contains some additional libraries needed to compile Vim,
|
||||
such as msvcrt.lib. You must install |dotnet-1.1-redist| before
|
||||
installing the .NET 1.1 SDK.
|
||||
|
||||
|
||||
Getting the WinDbg debugger *windbg-download*
|
||||
|
||||
The Debugging Tools for Windows can be downloaded from
|
||||
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
|
||||
This includes the WinDbg debugger, which you will want if you ever need
|
||||
to debug Vim itself. An earlier version of the Debugging Tools
|
||||
is also available through the Platform SDK, |ms-platform-sdk|.
|
||||
If you need the executable to run on Windows 98 or ME, use the 2005 one
|
||||
|msvc-2005-express|, and use the source code before 8.0.0029.
|
||||
|
||||
|
||||
Visual C++ 2005 Express Edition *msvc-2005-express*
|
||||
|
||||
+47
-99
@@ -274,17 +274,15 @@ MSVC_MAJOR = ($(MSVCVER) / 100 - 5)
|
||||
MSVCRT_VER = ($(MSVCVER) / 100 * 10 - 50)
|
||||
!endif
|
||||
|
||||
# Calculate MSVC_FULL for Visual C++ 8 and up.
|
||||
!if $(MSVC_MAJOR) >= 8
|
||||
! if [echo MSVC_FULL=_MSC_FULL_VER> msvcfullver.c && $(CC) /EP msvcfullver.c > msvcfullver.~ 2> nul]
|
||||
! message *** ERROR
|
||||
! message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
|
||||
! message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
|
||||
! error Make aborted.
|
||||
! else
|
||||
! include msvcfullver.~
|
||||
! if [del msvcfullver.c msvcfullver.~]
|
||||
! endif
|
||||
# Calculate MSVC_FULL.
|
||||
!if [echo MSVC_FULL=_MSC_FULL_VER> msvcfullver.c && $(CC) /EP msvcfullver.c > msvcfullver.~ 2> nul]
|
||||
! message *** ERROR
|
||||
! message Cannot run Visual C to determine its version. Make sure cl.exe is in your PATH.
|
||||
! message This can usually be done by running "vcvarsall.bat", located in the bin directory where Visual Studio was installed.
|
||||
! error Make aborted.
|
||||
!else
|
||||
! include msvcfullver.~
|
||||
! if [del msvcfullver.c msvcfullver.~]
|
||||
! endif
|
||||
!endif
|
||||
|
||||
@@ -305,18 +303,11 @@ MSVCRT_NAME = msvcr$(MSVCRT_VER)
|
||||
MSVCRT_NAME = vcruntime$(MSVCRT_VER)
|
||||
!endif
|
||||
|
||||
!if $(MSVC_MAJOR) == 6
|
||||
CPU = ix86
|
||||
!endif
|
||||
|
||||
### Set the default $(WINVER) to make it work with VC++7.0 (VS.NET)
|
||||
!ifndef WINVER
|
||||
WINVER = 0x0501
|
||||
!endif
|
||||
|
||||
# Flag to turn on Win64 compatibility warnings for VC7.x and VC8.
|
||||
WP64CHECK = /Wp64
|
||||
|
||||
# Use multiprocess build
|
||||
USE_MP = yes
|
||||
|
||||
@@ -499,16 +490,6 @@ CHANNEL_DEFS = $(CHANNEL_DEFS) -DHAVE_INET_NTOP
|
||||
NETBEANS_LIB = WSock32.lib Ws2_32.lib
|
||||
!endif
|
||||
|
||||
# Set which version of the CRT to use
|
||||
!if defined(USE_MSVCRT)
|
||||
# CVARS = $(cvarsdll)
|
||||
# !elseif defined(MULTITHREADED)
|
||||
# CVARS = $(cvarsmt)
|
||||
!else
|
||||
# CVARS = $(cvars)
|
||||
# CVARS = $(cvarsmt)
|
||||
!endif
|
||||
|
||||
# need advapi32.lib for GetUserName()
|
||||
# need shell32.lib for ExtractIcon()
|
||||
# need netapi32.lib for NetUserEnum()
|
||||
@@ -526,7 +507,7 @@ CON_LIB = $(CON_LIB) /DELAYLOAD:comdlg32.dll /DELAYLOAD:ole32.dll DelayImp.lib
|
||||
#VIMRCLOC = somewhere
|
||||
#VIMRUNTIMEDIR = somewhere
|
||||
|
||||
CFLAGS = -c /W3 /GF /nologo $(CVARS) -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
|
||||
CFLAGS = -c /W3 /GF /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 \
|
||||
$(CSCOPE_DEFS) $(TERM_DEFS) $(SOUND_DEFS) $(NETBEANS_DEFS) $(CHANNEL_DEFS) \
|
||||
$(NBDEBUG_DEFS) $(XPM_DEFS) $(SOD_DEFS) $(SOD_INC) \
|
||||
$(DEFINES) -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER)
|
||||
@@ -560,68 +541,50 @@ CPUNR = sse2
|
||||
!endif
|
||||
|
||||
# Convert processor ID to MVC-compatible number
|
||||
!if $(MSVC_MAJOR) < 8
|
||||
! if "$(CPUNR)" == "i586"
|
||||
CPUARG = /G5
|
||||
! elseif "$(CPUNR)" == "i686"
|
||||
CPUARG = /G6
|
||||
! elseif "$(CPUNR)" == "sse"
|
||||
CPUARG = /G6 /arch:SSE
|
||||
! elseif "$(CPUNR)" == "sse2"
|
||||
CPUARG = /G7 /arch:SSE2
|
||||
! elseif "$(CPUNR)" == "avx" || "$(CPUNR)" == "avx2"
|
||||
! message AVX/AVX2 Instruction Sets are not supported by Visual C++ v$(MSVC_MAJOR)
|
||||
! message Falling back to SSE2
|
||||
CPUARG = /G7 /arch:SSE2
|
||||
! elseif "$(CPUNR)" == "any"
|
||||
CPUARG =
|
||||
! endif
|
||||
!else
|
||||
# IA32/SSE/SSE2 are only supported on x86
|
||||
! if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && ("$(CPUNR)" == "i586" || "$(CPUNR)" == "i686" || "$(CPUNR)" == "any")
|
||||
!if "$(ASSEMBLY_ARCHITECTURE)" == "i386" && ("$(CPUNR)" == "i586" || "$(CPUNR)" == "i686" || "$(CPUNR)" == "any")
|
||||
# VC<11 generates fp87 code by default
|
||||
! if $(MSVC_MAJOR) < 11
|
||||
! if $(MSVC_MAJOR) < 11
|
||||
CPUARG =
|
||||
# VC>=11 needs explicit instructions to generate fp87 code
|
||||
! else
|
||||
! else
|
||||
CPUARG = /arch:IA32
|
||||
! endif
|
||||
! elseif "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "sse"
|
||||
! endif
|
||||
!elseif "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "sse"
|
||||
CPUARG = /arch:SSE
|
||||
! elseif "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "sse2"
|
||||
!elseif "$(ASSEMBLY_ARCHITECTURE)" == "i386" && "$(CPUNR)" == "sse2"
|
||||
CPUARG = /arch:SSE2
|
||||
! elseif "$(CPUNR)" == "avx"
|
||||
!elseif "$(CPUNR)" == "avx"
|
||||
# AVX is only supported by VC 10 and up
|
||||
! if $(MSVC_MAJOR) < 10
|
||||
! message AVX Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR)
|
||||
! if "$(ASSEMBLY_ARCHITECTURE)" == "i386"
|
||||
! message Falling back to SSE2
|
||||
! if $(MSVC_MAJOR) < 10
|
||||
! message AVX Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR)
|
||||
! if "$(ASSEMBLY_ARCHITECTURE)" == "i386"
|
||||
! message Falling back to SSE2
|
||||
CPUARG = /arch:SSE2
|
||||
! else
|
||||
CPUARG =
|
||||
! endif
|
||||
! else
|
||||
CPUARG = /arch:AVX
|
||||
! endif
|
||||
! elseif "$(CPUNR)" == "avx2"
|
||||
# AVX is only supported by VC 10 and up
|
||||
! if $(MSVC_MAJOR) < 10
|
||||
! message AVX2 Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR)
|
||||
! if "$(ASSEMBLY_ARCHITECTURE)" == "i386"
|
||||
! message Falling back to SSE2
|
||||
CPUARG = /arch:SSE2
|
||||
! else
|
||||
CPUARG =
|
||||
! endif
|
||||
! endif
|
||||
! else
|
||||
CPUARG = /arch:AVX
|
||||
! endif
|
||||
!elseif "$(CPUNR)" == "avx2"
|
||||
# AVX is only supported by VC 10 and up
|
||||
! if $(MSVC_MAJOR) < 10
|
||||
! message AVX2 Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR)
|
||||
! if "$(ASSEMBLY_ARCHITECTURE)" == "i386"
|
||||
! message Falling back to SSE2
|
||||
CPUARG = /arch:SSE2
|
||||
! else
|
||||
CPUARG =
|
||||
! endif
|
||||
# AVX2 is only supported by VC 12U2 and up
|
||||
# 180030501 is the full version number for Visual Studio 2013/VC 12 Update 2
|
||||
! elseif $(MSVC_FULL) < 180030501
|
||||
! message AVX2 Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR)-$(MSVC_FULL)
|
||||
! message Falling back to AVX
|
||||
! elseif $(MSVC_FULL) < 180030501
|
||||
! message AVX2 Instruction Set is not supported by Visual C++ v$(MSVC_MAJOR)-$(MSVC_FULL)
|
||||
! message Falling back to AVX
|
||||
CPUARG = /arch:AVX
|
||||
! else
|
||||
! else
|
||||
CPUARG = /arch:AVX2
|
||||
! endif
|
||||
! endif
|
||||
!endif
|
||||
|
||||
@@ -689,26 +652,19 @@ OPTFLAG = /O2
|
||||
OPTFLAG = /Ox
|
||||
! endif
|
||||
|
||||
! if $(MSVC_MAJOR) >= 8
|
||||
# Use link time code generation if not worried about size
|
||||
! if "$(OPTIMIZE)" != "SPACE"
|
||||
! if "$(OPTIMIZE)" != "SPACE"
|
||||
OPTFLAG = $(OPTFLAG) /GL
|
||||
! endif
|
||||
! endif
|
||||
|
||||
# (/Wp64 is deprecated in VC9 and generates an obnoxious warning.)
|
||||
! if ($(MSVC_MAJOR) == 7) || ($(MSVC_MAJOR) == 8)
|
||||
CFLAGS = $(CFLAGS) $(WP64CHECK)
|
||||
! endif
|
||||
|
||||
CFLAGS = $(CFLAGS) $(OPTFLAG) -DNDEBUG $(CPUARG)
|
||||
RCFLAGS = $(rcflags) $(rcvars) -DNDEBUG
|
||||
RCFLAGS = -DNDEBUG
|
||||
! ifdef USE_MSVCRT
|
||||
CFLAGS = $(CFLAGS) /MD
|
||||
LIBC = msvcrt.lib
|
||||
! else
|
||||
LIBC = libcmt.lib
|
||||
CFLAGS = $(CFLAGS) /Zl /MT
|
||||
LIBC = libcmt.lib
|
||||
! endif
|
||||
|
||||
!else # DEBUG
|
||||
@@ -718,19 +674,15 @@ VIM = vimd
|
||||
DEBUGINFO = /ZI
|
||||
! endif
|
||||
CFLAGS = $(CFLAGS) -D_DEBUG -DDEBUG /Od
|
||||
RCFLAGS = $(rcflags) $(rcvars) -D_DEBUG -DDEBUG
|
||||
# The /fixed:no is needed for Quantify. Assume not 4.? as unsupported in VC4.0.
|
||||
! if $(MSVC_MAJOR) == 4
|
||||
LIBC =
|
||||
! else
|
||||
RCFLAGS = -D_DEBUG -DDEBUG
|
||||
# The /fixed:no is needed for Quantify.
|
||||
LIBC = /fixed:no
|
||||
! endif
|
||||
! ifdef USE_MSVCRT
|
||||
CFLAGS = $(CFLAGS) /MDd
|
||||
LIBC = $(LIBC) msvcrtd.lib
|
||||
! else
|
||||
LIBC = $(LIBC) libcmtd.lib
|
||||
CFLAGS = $(CFLAGS) /Zl /MTd
|
||||
LIBC = $(LIBC) libcmtd.lib
|
||||
! endif
|
||||
|
||||
!endif # DEBUG
|
||||
@@ -739,11 +691,9 @@ CFLAGS = $(CFLAGS) /Zl /MTd
|
||||
RCFLAGS = $(RCFLAGS) /D_USING_V110_SDK71_
|
||||
!endif
|
||||
|
||||
!if $(MSVC_MAJOR) >= 8
|
||||
# Visual Studio 2005 has 'deprecated' many of the standard CRT functions
|
||||
CFLAGS_DEPR = /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
||||
CFLAGS = $(CFLAGS) $(CFLAGS_DEPR)
|
||||
!endif
|
||||
|
||||
!include Make_all.mak
|
||||
!include testdir\Make_all.mak
|
||||
@@ -799,7 +749,7 @@ OBJ = \
|
||||
$(OUTDIR)\hashtab.obj \
|
||||
$(OUTDIR)\help.obj \
|
||||
$(OUTDIR)\highlight.obj \
|
||||
$(OBJDIR)\if_cscope.obj \
|
||||
$(OUTDIR)\if_cscope.obj \
|
||||
$(OUTDIR)\indent.obj \
|
||||
$(OUTDIR)\insexpand.obj \
|
||||
$(OUTDIR)\json.obj \
|
||||
@@ -1331,10 +1281,8 @@ LINKARGS2 = $(CON_LIB) $(GUI_LIB) $(NODEFAULTLIB) $(LIBC) $(OLE_LIB) \
|
||||
|
||||
# Report link time code generation progress if used.
|
||||
!ifdef NODEBUG
|
||||
! if $(MSVC_MAJOR) >= 8
|
||||
! if "$(OPTIMIZE)" != "SPACE"
|
||||
! if "$(OPTIMIZE)" != "SPACE"
|
||||
LINKARGS1 = $(LINKARGS1) /LTCG:STATUS
|
||||
! endif
|
||||
! endif
|
||||
!endif
|
||||
|
||||
|
||||
@@ -1519,7 +1519,10 @@ aucmd_prepbuf(
|
||||
p_acd = FALSE;
|
||||
#endif
|
||||
|
||||
// no redrawing and don't set the window title
|
||||
++RedrawingDisabled;
|
||||
(void)win_split_ins(0, WSP_TOP, aucmd_win, 0);
|
||||
--RedrawingDisabled;
|
||||
(void)win_comp_pos(); // recompute window positions
|
||||
p_ea = save_ea;
|
||||
#ifdef FEAT_AUTOCHDIR
|
||||
|
||||
+11
-1
@@ -1918,6 +1918,11 @@ get_literal(int noReduceKeys)
|
||||
if ((nc == ESC || nc == CSI) && !noReduceKeys)
|
||||
nc = decodeModifyOtherKeys(nc);
|
||||
|
||||
if ((mod_mask & ~MOD_MASK_SHIFT) != 0)
|
||||
// A character with non-Shift modifiers should not be a valid
|
||||
// character for i_CTRL-V_digit.
|
||||
break;
|
||||
|
||||
#ifdef FEAT_CMDL_INFO
|
||||
if (!(State & CMDLINE) && MB_BYTE2LEN_CHECK(nc) == 1)
|
||||
add_to_showcmd(nc);
|
||||
@@ -1995,7 +2000,11 @@ get_literal(int noReduceKeys)
|
||||
--allow_keys;
|
||||
#endif
|
||||
if (nc)
|
||||
{
|
||||
vungetc(nc);
|
||||
// A character typed with i_CTRL-V_digit cannot have modifiers.
|
||||
mod_mask = 0;
|
||||
}
|
||||
got_int = FALSE; // CTRL-C typed after CTRL-V is not an interrupt
|
||||
return cc;
|
||||
}
|
||||
@@ -4452,7 +4461,8 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
||||
break;
|
||||
|
||||
case PASTE_EX:
|
||||
if (gap != NULL && ga_grow(gap, idx) == OK)
|
||||
// add one for the NUL that is going to be appended
|
||||
if (gap != NULL && ga_grow(gap, idx + 1) == OK)
|
||||
{
|
||||
mch_memmove((char *)gap->ga_data + gap->ga_len,
|
||||
buf, (size_t)idx);
|
||||
|
||||
+6
-1
@@ -2723,6 +2723,8 @@ EXTERN char e_invalid_command_after_export[]
|
||||
INIT(= N_("E1043: Invalid command after :export"));
|
||||
EXTERN char e_export_with_invalid_argument[]
|
||||
INIT(= N_("E1044: Export with invalid argument"));
|
||||
// E1045 not used
|
||||
// E1046 not used
|
||||
EXTERN char e_syntax_error_in_import_str[]
|
||||
INIT(= N_("E1047: Syntax error in import: %s"));
|
||||
EXTERN char e_item_not_found_in_script_str[]
|
||||
@@ -2791,6 +2793,7 @@ EXTERN char e_missing_argument_type_for_str[]
|
||||
// E1080 unused
|
||||
EXTERN char e_cannot_unlet_str[]
|
||||
INIT(= N_("E1081: Cannot unlet %s"));
|
||||
// E1082 unused
|
||||
EXTERN char e_missing_backtick[]
|
||||
INIT(= N_("E1083: Missing backtick"));
|
||||
EXTERN char e_cannot_delete_vim9_script_function_str[]
|
||||
@@ -2911,6 +2914,7 @@ EXTERN char e_for_argument_must_be_sequence_of_lists[]
|
||||
INIT(= N_("E1140: :for argument must be a sequence of lists"));
|
||||
EXTERN char e_indexable_type_required[]
|
||||
INIT(= N_("E1141: Indexable type required"));
|
||||
// E1142 unused
|
||||
EXTERN char e_empty_expression_str[]
|
||||
INIT(= N_("E1143: Empty expression: \"%s\""));
|
||||
EXTERN char e_command_str_not_followed_by_white_space_str[]
|
||||
@@ -2971,7 +2975,8 @@ EXTERN char e_argument_name_shadows_existing_variable_str[]
|
||||
INIT(= N_("E1167: Argument name shadows existing variable: %s"));
|
||||
EXTERN char e_argument_already_declared_in_script_str[]
|
||||
INIT(= N_("E1168: Argument already declared in the script: %s"));
|
||||
// E1169 unused
|
||||
EXTERN char e_expression_too_recursive_str[]
|
||||
INIT(= N_("E1169: Expression too recursive: %s"));
|
||||
EXTERN char e_cannot_use_hash_curly_to_start_comment[]
|
||||
INIT(= N_("E1170: Cannot use #{ to start a comment"));
|
||||
EXTERN char e_missing_end_block[]
|
||||
|
||||
+18
@@ -3526,6 +3526,7 @@ eval7(
|
||||
char_u *start_leader, *end_leader;
|
||||
int ret = OK;
|
||||
char_u *alias;
|
||||
static int recurse = 0;
|
||||
|
||||
/*
|
||||
* Initialise variable so that clear_tv() can't mistake this for a
|
||||
@@ -3552,6 +3553,21 @@ eval7(
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
// Limit recursion to 1000 levels. At least at 10000 we run out of stack
|
||||
// and crash. With MSVC the stack is smaller.
|
||||
if (recurse ==
|
||||
#ifdef _MSC_VER
|
||||
300
|
||||
#else
|
||||
1000
|
||||
#endif
|
||||
)
|
||||
{
|
||||
semsg(_(e_expression_too_recursive_str), *arg);
|
||||
return FAIL;
|
||||
}
|
||||
++recurse;
|
||||
|
||||
switch (**arg)
|
||||
{
|
||||
/*
|
||||
@@ -3781,6 +3797,8 @@ eval7(
|
||||
*/
|
||||
if (ret == OK && evaluate && end_leader > start_leader)
|
||||
ret = eval7_leader(rettv, FALSE, start_leader, &end_leader);
|
||||
|
||||
--recurse;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
+46
-7
@@ -371,17 +371,25 @@ eval_charconvert(
|
||||
char_u *fname_to)
|
||||
{
|
||||
int err = FALSE;
|
||||
sctx_T saved_sctx = current_sctx;
|
||||
sctx_T *ctx;
|
||||
|
||||
set_vim_var_string(VV_CC_FROM, enc_from, -1);
|
||||
set_vim_var_string(VV_CC_TO, enc_to, -1);
|
||||
set_vim_var_string(VV_FNAME_IN, fname_from, -1);
|
||||
set_vim_var_string(VV_FNAME_OUT, fname_to, -1);
|
||||
ctx = get_option_sctx("charconvert");
|
||||
if (ctx != NULL)
|
||||
current_sctx = *ctx;
|
||||
|
||||
if (eval_to_bool(p_ccv, &err, NULL, FALSE))
|
||||
err = TRUE;
|
||||
|
||||
set_vim_var_string(VV_CC_FROM, NULL, -1);
|
||||
set_vim_var_string(VV_CC_TO, NULL, -1);
|
||||
set_vim_var_string(VV_FNAME_IN, NULL, -1);
|
||||
set_vim_var_string(VV_FNAME_OUT, NULL, -1);
|
||||
current_sctx = saved_sctx;
|
||||
|
||||
if (err)
|
||||
return FAIL;
|
||||
@@ -393,13 +401,21 @@ eval_charconvert(
|
||||
eval_printexpr(char_u *fname, char_u *args)
|
||||
{
|
||||
int err = FALSE;
|
||||
sctx_T saved_sctx = current_sctx;
|
||||
sctx_T *ctx;
|
||||
|
||||
set_vim_var_string(VV_FNAME_IN, fname, -1);
|
||||
set_vim_var_string(VV_CMDARG, args, -1);
|
||||
ctx = get_option_sctx("printexpr");
|
||||
if (ctx != NULL)
|
||||
current_sctx = *ctx;
|
||||
|
||||
if (eval_to_bool(p_pexpr, &err, NULL, FALSE))
|
||||
err = TRUE;
|
||||
|
||||
set_vim_var_string(VV_FNAME_IN, NULL, -1);
|
||||
set_vim_var_string(VV_CMDARG, NULL, -1);
|
||||
current_sctx = saved_sctx;
|
||||
|
||||
if (err)
|
||||
{
|
||||
@@ -481,12 +497,17 @@ eval_spell_expr(char_u *badword, char_u *expr)
|
||||
typval_T rettv;
|
||||
list_T *list = NULL;
|
||||
char_u *p = skipwhite(expr);
|
||||
sctx_T saved_sctx = current_sctx;
|
||||
sctx_T *ctx;
|
||||
|
||||
// Set "v:val" to the bad word.
|
||||
prepare_vimvar(VV_VAL, &save_val);
|
||||
set_vim_var_string(VV_VAL, badword, -1);
|
||||
if (p_verbose == 0)
|
||||
++emsg_off;
|
||||
ctx = get_option_sctx("spellsuggest");
|
||||
if (ctx != NULL)
|
||||
current_sctx = *ctx;
|
||||
|
||||
if (eval1(&p, &rettv, &EVALARG_EVALUATE) == OK)
|
||||
{
|
||||
@@ -500,6 +521,7 @@ eval_spell_expr(char_u *badword, char_u *expr)
|
||||
--emsg_off;
|
||||
clear_tv(get_vim_var_tv(VV_VAL));
|
||||
restore_vimvar(VV_VAL, &save_val);
|
||||
current_sctx = saved_sctx;
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -4660,27 +4682,44 @@ copy_callback(callback_T *dest, callback_T *src)
|
||||
void
|
||||
expand_autload_callback(callback_T *cb)
|
||||
{
|
||||
char_u *name;
|
||||
char_u *p;
|
||||
imported_T *import;
|
||||
|
||||
if (!in_vim9script() || cb->cb_name == NULL || !cb->cb_free_name)
|
||||
if (!in_vim9script() || cb->cb_name == NULL
|
||||
|| (!cb->cb_free_name
|
||||
&& (cb->cb_partial == NULL || cb->cb_partial->pt_name == NULL)))
|
||||
return;
|
||||
p = vim_strchr(cb->cb_name, '.');
|
||||
if (cb->cb_partial != NULL)
|
||||
name = cb->cb_partial->pt_name;
|
||||
else
|
||||
name = cb->cb_name;
|
||||
p = vim_strchr(name, '.');
|
||||
if (p == NULL)
|
||||
return;
|
||||
import = find_imported(cb->cb_name, p - cb->cb_name, FALSE, NULL);
|
||||
import = find_imported(name, p - name, FALSE, NULL);
|
||||
if (import != NULL && SCRIPT_ID_VALID(import->imp_sid))
|
||||
{
|
||||
scriptitem_T *si = SCRIPT_ITEM(import->imp_sid);
|
||||
|
||||
if (si->sn_autoload_prefix != NULL)
|
||||
{
|
||||
char_u *name = concat_str(si->sn_autoload_prefix, p + 1);
|
||||
char_u *newname = concat_str(si->sn_autoload_prefix, p + 1);
|
||||
|
||||
if (name != NULL)
|
||||
if (newname != NULL)
|
||||
{
|
||||
vim_free(cb->cb_name);
|
||||
cb->cb_name = name;
|
||||
if (cb->cb_partial != NULL)
|
||||
{
|
||||
if (cb->cb_name == cb->cb_partial->pt_name)
|
||||
cb->cb_name = newname;
|
||||
vim_free(cb->cb_partial->pt_name);
|
||||
cb->cb_partial->pt_name = newname;
|
||||
}
|
||||
else
|
||||
{
|
||||
vim_free(cb->cb_name);
|
||||
cb->cb_name = newname;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -866,6 +866,8 @@ ex_copy(linenr_T line1, linenr_T line2, linenr_T n)
|
||||
}
|
||||
|
||||
appended_lines_mark(n, count);
|
||||
if (VIsual_active)
|
||||
check_pos(curbuf, &VIsual);
|
||||
|
||||
msgmore((long)count);
|
||||
}
|
||||
|
||||
@@ -1722,12 +1722,6 @@ comment_start(char_u *p, int starts_with_colon UNUSED)
|
||||
*
|
||||
* This function may be called recursively!
|
||||
*/
|
||||
#if (_MSC_VER == 1200)
|
||||
/*
|
||||
* Avoid optimisation bug in VC++ version 6.0
|
||||
*/
|
||||
#pragma optimize( "g", off )
|
||||
#endif
|
||||
static char_u *
|
||||
do_one_cmd(
|
||||
char_u **cmdlinep,
|
||||
@@ -2654,9 +2648,6 @@ doend:
|
||||
|
||||
return ea.nextcmd;
|
||||
}
|
||||
#if (_MSC_VER == 1200)
|
||||
#pragma optimize( "", on )
|
||||
#endif
|
||||
|
||||
static char ex_error_buf[MSG_BUF_LEN];
|
||||
|
||||
|
||||
+1
-1
@@ -1513,7 +1513,7 @@ init_ccline(int firstc, int indent)
|
||||
ccline.cmdindent = (firstc > 0 ? indent : 0);
|
||||
|
||||
// alloc initial ccline.cmdbuff
|
||||
alloc_cmdbuff(exmode_active ? 250 : indent + 1);
|
||||
alloc_cmdbuff(indent + 50);
|
||||
if (ccline.cmdbuff == NULL)
|
||||
return FAIL;
|
||||
ccline.cmdlen = ccline.cmdpos = 0;
|
||||
|
||||
+1
-2
@@ -638,8 +638,7 @@
|
||||
|| (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
|
||||
|| defined(FEAT_GUI_MACVIM) \
|
||||
|| defined(FEAT_GUI_HAIKU) \
|
||||
|| (defined(FEAT_GUI_MSWIN) \
|
||||
&& (!defined(_MSC_VER) || _MSC_VER > 1020)))
|
||||
|| defined(FEAT_GUI_MSWIN))
|
||||
# define FEAT_GUI_TABLINE
|
||||
#endif
|
||||
|
||||
|
||||
+75
-359
@@ -206,28 +206,18 @@ gui_mch_set_rendering_options(char_u *s)
|
||||
// Some parameters for dialog boxes. All in pixels.
|
||||
#define DLG_PADDING_X 10
|
||||
#define DLG_PADDING_Y 10
|
||||
#define DLG_OLD_STYLE_PADDING_X 5
|
||||
#define DLG_OLD_STYLE_PADDING_Y 5
|
||||
#define DLG_VERT_PADDING_X 4 // For vertical buttons
|
||||
#define DLG_VERT_PADDING_Y 4
|
||||
#define DLG_ICON_WIDTH 34
|
||||
#define DLG_ICON_HEIGHT 34
|
||||
#define DLG_MIN_WIDTH 150
|
||||
#define DLG_FONT_NAME "MS Sans Serif"
|
||||
#define DLG_FONT_NAME "MS Shell Dlg"
|
||||
#define DLG_FONT_POINT_SIZE 8
|
||||
#define DLG_MIN_MAX_WIDTH 400
|
||||
#define DLG_MIN_MAX_HEIGHT 400
|
||||
|
||||
#define DLG_NONBUTTON_CONTROL 5000 // First ID of non-button controls
|
||||
|
||||
#ifndef WM_XBUTTONDOWN // For Win2K / winME ONLY
|
||||
# define WM_XBUTTONDOWN 0x020B
|
||||
# define WM_XBUTTONUP 0x020C
|
||||
# define WM_XBUTTONDBLCLK 0x020D
|
||||
# define MK_XBUTTON1 0x0020
|
||||
# define MK_XBUTTON2 0x0040
|
||||
#endif
|
||||
|
||||
#ifndef WM_DPICHANGED
|
||||
# define WM_DPICHANGED 0x02E0
|
||||
#endif
|
||||
@@ -290,10 +280,6 @@ typedef int COLORREF;
|
||||
typedef int HCURSOR;
|
||||
#endif
|
||||
|
||||
#ifndef GET_X_LPARAM
|
||||
# define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
|
||||
#endif
|
||||
|
||||
static void _OnPaint(HWND hwnd);
|
||||
static void fill_rect(const RECT *rcp, HBRUSH hbr, COLORREF color);
|
||||
static void clear_rect(RECT *rcp);
|
||||
@@ -968,9 +954,6 @@ _OnMouseButtonDown(
|
||||
button = MOUSE_RIGHT;
|
||||
else if (s_uMsg == WM_XBUTTONDOWN || s_uMsg == WM_XBUTTONDBLCLK)
|
||||
{
|
||||
#ifndef GET_XBUTTON_WPARAM
|
||||
# define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
|
||||
#endif
|
||||
button = ((GET_XBUTTON_WPARAM(s_wParam) == 1) ? MOUSE_X1 : MOUSE_X2);
|
||||
}
|
||||
else if (s_uMsg == WM_CAPTURECHANGED)
|
||||
@@ -1512,6 +1495,20 @@ update_scrollbar_size(void)
|
||||
gui.scrollbar_height = pGetSystemMetricsForDpi(SM_CYHSCROLL, s_dpi);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the average character size of a font.
|
||||
*/
|
||||
static void
|
||||
GetAverageFontSize(HDC hdc, SIZE *size)
|
||||
{
|
||||
// GetTextMetrics() may not return the right value in tmAveCharWidth
|
||||
// for some fonts. Do our own average computation.
|
||||
GetTextExtentPoint(hdc,
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
||||
52, size);
|
||||
size->cx = (size->cx / 26 + 1) / 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the character size of a font.
|
||||
*/
|
||||
@@ -1525,13 +1522,9 @@ GetFontSize(GuiFont font)
|
||||
TEXTMETRIC tm;
|
||||
|
||||
GetTextMetrics(hdc, &tm);
|
||||
// GetTextMetrics() may not return the right value in tmAveCharWidth
|
||||
// for some fonts. Do our own average computation.
|
||||
GetTextExtentPoint(hdc,
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
||||
52, &size);
|
||||
gui.char_width = (size.cx / 26 + 1) / 2 + tm.tmOverhang;
|
||||
GetAverageFontSize(hdc, &size);
|
||||
|
||||
gui.char_width = size.cx + tm.tmOverhang;
|
||||
gui.char_height = tm.tmHeight + p_linespace;
|
||||
|
||||
SelectFont(hdc, hfntOld);
|
||||
@@ -2440,10 +2433,6 @@ gui_mch_show_toolbar(int showit)
|
||||
|
||||
if (showit)
|
||||
{
|
||||
# ifndef TB_SETUNICODEFORMAT
|
||||
// For older compilers. We assume this never changes.
|
||||
# define TB_SETUNICODEFORMAT 0x2005
|
||||
# endif
|
||||
// Enable unicode support
|
||||
SendMessage(s_toolbarhwnd, TB_SETUNICODEFORMAT, (WPARAM)TRUE,
|
||||
(LPARAM)0);
|
||||
@@ -2577,10 +2566,6 @@ gui_mch_update_tabline(void)
|
||||
if (s_tabhwnd == NULL)
|
||||
return;
|
||||
|
||||
# ifndef CCM_SETUNICODEFORMAT
|
||||
// For older compilers. We assume this never changes.
|
||||
# define CCM_SETUNICODEFORMAT 0x2005
|
||||
# endif
|
||||
// Enable unicode support
|
||||
SendMessage(s_tabhwnd, CCM_SETUNICODEFORMAT, (WPARAM)TRUE, (LPARAM)0);
|
||||
|
||||
@@ -3410,10 +3395,6 @@ gui_mch_init_font(char_u *font_name, int fontset UNUSED)
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifndef WPF_RESTORETOMAXIMIZED
|
||||
# define WPF_RESTORETOMAXIMIZED 2 // just in case someone doesn't have it
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return TRUE if the GUI window is maximized, filling the whole screen.
|
||||
* Also return TRUE if the window is snapped.
|
||||
@@ -3897,113 +3878,6 @@ _OnScroll(
|
||||
# include "xpm_w32.h"
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
/*
|
||||
* Add a lot of missing defines.
|
||||
* They are not always missing, we need the #ifndef's.
|
||||
*/
|
||||
# ifndef IsMinimized
|
||||
# define IsMinimized(hwnd) IsIconic(hwnd)
|
||||
# endif
|
||||
# ifndef IsMaximized
|
||||
# define IsMaximized(hwnd) IsZoomed(hwnd)
|
||||
# endif
|
||||
# ifndef SelectFont
|
||||
# define SelectFont(hdc, hfont) ((HFONT)SelectObject((hdc), (HGDIOBJ)(HFONT)(hfont)))
|
||||
# endif
|
||||
# ifndef GetStockBrush
|
||||
# define GetStockBrush(i) ((HBRUSH)GetStockObject(i))
|
||||
# endif
|
||||
# ifndef DeleteBrush
|
||||
# define DeleteBrush(hbr) DeleteObject((HGDIOBJ)(HBRUSH)(hbr))
|
||||
# endif
|
||||
|
||||
# ifndef HANDLE_WM_RBUTTONDBLCLK
|
||||
# define HANDLE_WM_RBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_MBUTTONUP
|
||||
# define HANDLE_WM_MBUTTONUP(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_MBUTTONDBLCLK
|
||||
# define HANDLE_WM_MBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_LBUTTONDBLCLK
|
||||
# define HANDLE_WM_LBUTTONDBLCLK(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), TRUE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_RBUTTONDOWN
|
||||
# define HANDLE_WM_RBUTTONDOWN(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_MOUSEMOVE
|
||||
# define HANDLE_WM_MOUSEMOVE(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_RBUTTONUP
|
||||
# define HANDLE_WM_RBUTTONUP(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_MBUTTONDOWN
|
||||
# define HANDLE_WM_MBUTTONDOWN(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_LBUTTONUP
|
||||
# define HANDLE_WM_LBUTTONUP(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_LBUTTONDOWN
|
||||
# define HANDLE_WM_LBUTTONDOWN(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), FALSE, (int)(short)LOWORD(lParam), (int)(short)HIWORD(lParam), (UINT)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_SYSCHAR
|
||||
# define HANDLE_WM_SYSCHAR(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (TCHAR)(wParam), (int)(short)LOWORD(lParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_ACTIVATEAPP
|
||||
# define HANDLE_WM_ACTIVATEAPP(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (BOOL)(wParam), (DWORD)(lParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_WINDOWPOSCHANGING
|
||||
# define HANDLE_WM_WINDOWPOSCHANGING(hwnd, wParam, lParam, fn) \
|
||||
(LRESULT)(DWORD)(BOOL)(fn)((hwnd), (LPWINDOWPOS)(lParam))
|
||||
# endif
|
||||
# ifndef HANDLE_WM_VSCROLL
|
||||
# define HANDLE_WM_VSCROLL(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (HWND)(lParam), (UINT)(LOWORD(wParam)), (int)(short)HIWORD(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_SETFOCUS
|
||||
# define HANDLE_WM_SETFOCUS(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (HWND)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_KILLFOCUS
|
||||
# define HANDLE_WM_KILLFOCUS(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (HWND)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_HSCROLL
|
||||
# define HANDLE_WM_HSCROLL(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (HWND)(lParam), (UINT)(LOWORD(wParam)), (int)(short)HIWORD(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_DROPFILES
|
||||
# define HANDLE_WM_DROPFILES(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (HDROP)(wParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_CHAR
|
||||
# define HANDLE_WM_CHAR(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (TCHAR)(wParam), (int)(short)LOWORD(lParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_SYSDEADCHAR
|
||||
# define HANDLE_WM_SYSDEADCHAR(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (TCHAR)(wParam), (int)(short)LOWORD(lParam)), 0L)
|
||||
# endif
|
||||
# ifndef HANDLE_WM_DEADCHAR
|
||||
# define HANDLE_WM_DEADCHAR(hwnd, wParam, lParam, fn) \
|
||||
((fn)((hwnd), (TCHAR)(wParam), (int)(short)LOWORD(lParam)), 0L)
|
||||
# endif
|
||||
#endif // __MINGW32__
|
||||
|
||||
|
||||
// Some parameters for tearoff menus. All in pixels.
|
||||
#define TEAROFF_PADDING_X 2
|
||||
@@ -4013,106 +3887,15 @@ _OnScroll(
|
||||
#define TEAROFF_COLUMN_PADDING 3 // # spaces to pad column with.
|
||||
|
||||
|
||||
// For the Intellimouse:
|
||||
#ifndef WM_MOUSEWHEEL
|
||||
# define WM_MOUSEWHEEL 0x20a
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FEAT_BEVAL_GUI
|
||||
# define ID_BEVAL_TOOLTIP 200
|
||||
# define BEVAL_TEXT_LEN MAXPATHL
|
||||
|
||||
# if (defined(_MSC_VER) && _MSC_VER < 1300) || !defined(MAXULONG_PTR)
|
||||
// Work around old versions of basetsd.h which wrongly declares
|
||||
// UINT_PTR as unsigned long.
|
||||
# undef UINT_PTR
|
||||
# define UINT_PTR UINT
|
||||
# endif
|
||||
|
||||
static BalloonEval *cur_beval = NULL;
|
||||
static UINT_PTR BevalTimerId = 0;
|
||||
static DWORD LastActivity = 0;
|
||||
|
||||
|
||||
typedef struct tagNMTTDISPINFO_NEW
|
||||
{
|
||||
NMHDR hdr;
|
||||
LPSTR lpszText;
|
||||
char szText[80];
|
||||
HINSTANCE hinst;
|
||||
UINT uFlags;
|
||||
LPARAM lParam;
|
||||
} NMTTDISPINFO_NEW;
|
||||
|
||||
typedef struct tagTOOLINFOW_NEW
|
||||
{
|
||||
UINT cbSize;
|
||||
UINT uFlags;
|
||||
HWND hwnd;
|
||||
UINT_PTR uId;
|
||||
RECT rect;
|
||||
HINSTANCE hinst;
|
||||
LPWSTR lpszText;
|
||||
LPARAM lParam;
|
||||
void *lpReserved;
|
||||
} TOOLINFOW_NEW;
|
||||
|
||||
typedef struct tagNMTTDISPINFOW_NEW
|
||||
{
|
||||
NMHDR hdr;
|
||||
LPWSTR lpszText;
|
||||
WCHAR szText[80];
|
||||
HINSTANCE hinst;
|
||||
UINT uFlags;
|
||||
LPARAM lParam;
|
||||
} NMTTDISPINFOW_NEW;
|
||||
|
||||
|
||||
# ifndef TTM_SETMAXTIPWIDTH
|
||||
# define TTM_SETMAXTIPWIDTH (WM_USER+24)
|
||||
# endif
|
||||
|
||||
# ifndef TTF_DI_SETITEM
|
||||
# define TTF_DI_SETITEM 0x8000
|
||||
# endif
|
||||
|
||||
# ifndef TTN_GETDISPINFO
|
||||
# define TTN_GETDISPINFO (TTN_FIRST - 0)
|
||||
# endif
|
||||
|
||||
#endif // defined(FEAT_BEVAL_GUI)
|
||||
|
||||
#if defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)
|
||||
// Older MSVC compilers don't have LPNMTTDISPINFO[AW] thus we need to define
|
||||
// it here if LPNMTTDISPINFO isn't defined.
|
||||
// MinGW doesn't define LPNMTTDISPINFO but typedefs it. Thus we need to check
|
||||
// _MSC_VER.
|
||||
# if !defined(LPNMTTDISPINFO) && defined(_MSC_VER)
|
||||
typedef struct tagNMTTDISPINFOA {
|
||||
NMHDR hdr;
|
||||
LPSTR lpszText;
|
||||
char szText[80];
|
||||
HINSTANCE hinst;
|
||||
UINT uFlags;
|
||||
LPARAM lParam;
|
||||
} NMTTDISPINFOA, *LPNMTTDISPINFOA;
|
||||
# define LPNMTTDISPINFO LPNMTTDISPINFOA
|
||||
|
||||
typedef struct tagNMTTDISPINFOW {
|
||||
NMHDR hdr;
|
||||
LPWSTR lpszText;
|
||||
WCHAR szText[80];
|
||||
HINSTANCE hinst;
|
||||
UINT uFlags;
|
||||
LPARAM lParam;
|
||||
} NMTTDISPINFOW, *LPNMTTDISPINFOW;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef TTN_GETDISPINFOW
|
||||
# define TTN_GETDISPINFOW (TTN_FIRST - 10)
|
||||
#endif
|
||||
|
||||
// Local variables:
|
||||
|
||||
@@ -4160,7 +3943,6 @@ static int dialog_default_button = -1;
|
||||
// Intellimouse support
|
||||
static int mouse_scroll_lines = 0;
|
||||
|
||||
static int s_usenewlook; // emulate W95/NT4 non-bold dialogs
|
||||
#ifdef FEAT_TOOLBAR
|
||||
static void initialise_toolbar(void);
|
||||
static void update_toolbar_size(void);
|
||||
@@ -4279,19 +4061,6 @@ gui_mswin_get_menu_height(
|
||||
static void
|
||||
init_mouse_wheel(void)
|
||||
{
|
||||
|
||||
#ifndef SPI_GETWHEELSCROLLLINES
|
||||
# define SPI_GETWHEELSCROLLLINES 104
|
||||
#endif
|
||||
#ifndef SPI_SETWHEELSCROLLLINES
|
||||
# define SPI_SETWHEELSCROLLLINES 105
|
||||
#endif
|
||||
|
||||
#define VMOUSEZ_CLASSNAME "MouseZ" // hidden wheel window class
|
||||
#define VMOUSEZ_TITLE "Magellan MSWHEEL" // hidden wheel window title
|
||||
#define VMSH_MOUSEWHEEL "MSWHEEL_ROLLMSG"
|
||||
#define VMSH_SCROLL_LINES "MSH_SCROLL_LINES_MSG"
|
||||
|
||||
mouse_scroll_lines = 3; // reasonable default
|
||||
|
||||
// if NT 4.0+ (or Win98) get scroll lines directly from system
|
||||
@@ -5522,12 +5291,6 @@ gui_mch_init(void)
|
||||
#endif
|
||||
|
||||
#ifdef FEAT_EVAL
|
||||
# if !defined(_MSC_VER) || (_MSC_VER < 1400)
|
||||
// Define HandleToLong for old MS and non-MS compilers if not defined.
|
||||
# ifndef HandleToLong
|
||||
# define HandleToLong(h) ((long)(intptr_t)(h))
|
||||
# endif
|
||||
# endif
|
||||
// set the v:windowid variable
|
||||
set_vim_var_nr(VV_WINDOWID, HandleToLong(s_hwnd));
|
||||
#endif
|
||||
@@ -6974,20 +6737,13 @@ gui_mch_dialog(
|
||||
}
|
||||
else
|
||||
# endif
|
||||
font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
VARIABLE_PITCH, DLG_FONT_NAME);
|
||||
if (s_usenewlook)
|
||||
{
|
||||
oldFont = SelectFont(hdc, font);
|
||||
dlgPaddingX = DLG_PADDING_X;
|
||||
dlgPaddingY = DLG_PADDING_Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
oldFont = SelectFont(hdc, GetStockObject(SYSTEM_FONT));
|
||||
dlgPaddingX = DLG_OLD_STYLE_PADDING_X;
|
||||
dlgPaddingY = DLG_OLD_STYLE_PADDING_Y;
|
||||
}
|
||||
font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, VARIABLE_PITCH, DLG_FONT_NAME);
|
||||
|
||||
oldFont = SelectFont(hdc, font);
|
||||
dlgPaddingX = DLG_PADDING_X;
|
||||
dlgPaddingY = DLG_PADDING_Y;
|
||||
|
||||
GetTextMetrics(hdc, &fontInfo);
|
||||
fontHeight = fontInfo.tmHeight;
|
||||
|
||||
@@ -7148,10 +6904,7 @@ gui_mch_dialog(
|
||||
dlgwidth = DLG_MIN_WIDTH; // Don't allow a really thin dialog!
|
||||
|
||||
// start to fill in the dlgtemplate information. addressing by WORDs
|
||||
if (s_usenewlook)
|
||||
lStyle = DS_MODALFRAME | WS_CAPTION |DS_3DLOOK| WS_VISIBLE |DS_SETFONT;
|
||||
else
|
||||
lStyle = DS_MODALFRAME | WS_CAPTION |DS_3DLOOK| WS_VISIBLE;
|
||||
lStyle = DS_MODALFRAME | WS_CAPTION | DS_3DLOOK | WS_VISIBLE | DS_SETFONT;
|
||||
|
||||
add_long(lStyle);
|
||||
add_long(0); // (lExtendedStyle)
|
||||
@@ -7193,26 +6946,23 @@ gui_mch_dialog(
|
||||
: (LPSTR)("Vim "VIM_VERSION_MEDIUM)), TRUE);
|
||||
p += nchar;
|
||||
|
||||
if (s_usenewlook)
|
||||
{
|
||||
// do the font, since DS_3DLOOK doesn't work properly
|
||||
// do the font, since DS_3DLOOK doesn't work properly
|
||||
# ifdef USE_SYSMENU_FONT
|
||||
if (use_lfSysmenu)
|
||||
{
|
||||
// point size
|
||||
*p++ = -MulDiv(lfSysmenu.lfHeight, 72,
|
||||
GetDeviceCaps(hdc, LOGPIXELSY));
|
||||
wcscpy(p, lfSysmenu.lfFaceName);
|
||||
nchar = (int)wcslen(lfSysmenu.lfFaceName) + 1;
|
||||
}
|
||||
else
|
||||
# endif
|
||||
{
|
||||
*p++ = DLG_FONT_POINT_SIZE; // point size
|
||||
nchar = nCopyAnsiToWideChar(p, DLG_FONT_NAME, FALSE);
|
||||
}
|
||||
p += nchar;
|
||||
if (use_lfSysmenu)
|
||||
{
|
||||
// point size
|
||||
*p++ = -MulDiv(lfSysmenu.lfHeight, 72,
|
||||
GetDeviceCaps(hdc, LOGPIXELSY));
|
||||
wcscpy(p, lfSysmenu.lfFaceName);
|
||||
nchar = (int)wcslen(lfSysmenu.lfFaceName) + 1;
|
||||
}
|
||||
else
|
||||
# endif
|
||||
{
|
||||
*p++ = DLG_FONT_POINT_SIZE; // point size
|
||||
nchar = nCopyAnsiToWideChar(p, DLG_FONT_NAME, FALSE);
|
||||
}
|
||||
p += nchar;
|
||||
|
||||
buttonYpos = msgheight + 2 * dlgPaddingY;
|
||||
|
||||
@@ -7555,23 +7305,20 @@ tearoff_callback(
|
||||
|
||||
|
||||
/*
|
||||
* Decide whether to use the "new look" (small, non-bold font) or the "old
|
||||
* look" (big, clanky font) for dialogs, and work out a few values for use
|
||||
* later accordingly.
|
||||
* Computes the dialog base units based on the current dialog font.
|
||||
* We don't use the GetDialogBaseUnits() API, because we don't use the
|
||||
* (old-style) system font.
|
||||
*/
|
||||
static void
|
||||
get_dialog_font_metrics(void)
|
||||
{
|
||||
HDC hdc;
|
||||
HFONT hfontTools = 0;
|
||||
DWORD dlgFontSize;
|
||||
SIZE size;
|
||||
#ifdef USE_SYSMENU_FONT
|
||||
LOGFONTW lfSysmenu;
|
||||
#endif
|
||||
|
||||
s_usenewlook = FALSE;
|
||||
|
||||
#ifdef USE_SYSMENU_FONT
|
||||
if (gui_w32_get_menu_font(&lfSysmenu) == OK)
|
||||
hfontTools = CreateFontIndirectW(&lfSysmenu);
|
||||
@@ -7580,31 +7327,13 @@ get_dialog_font_metrics(void)
|
||||
hfontTools = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, VARIABLE_PITCH, DLG_FONT_NAME);
|
||||
|
||||
if (hfontTools)
|
||||
{
|
||||
hdc = GetDC(s_hwnd);
|
||||
SelectObject(hdc, hfontTools);
|
||||
/*
|
||||
* GetTextMetrics() doesn't return the right value in
|
||||
* tmAveCharWidth, so we have to figure out the dialog base units
|
||||
* ourselves.
|
||||
*/
|
||||
GetTextExtentPoint(hdc,
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",
|
||||
52, &size);
|
||||
ReleaseDC(s_hwnd, hdc);
|
||||
hdc = GetDC(s_hwnd);
|
||||
SelectObject(hdc, hfontTools);
|
||||
GetAverageFontSize(hdc, &size);
|
||||
ReleaseDC(s_hwnd, hdc);
|
||||
|
||||
s_dlgfntwidth = (WORD)((size.cx / 26 + 1) / 2);
|
||||
s_dlgfntheight = (WORD)size.cy;
|
||||
s_usenewlook = TRUE;
|
||||
}
|
||||
|
||||
if (!s_usenewlook)
|
||||
{
|
||||
dlgFontSize = GetDialogBaseUnits(); // fall back to big old system
|
||||
s_dlgfntwidth = LOWORD(dlgFontSize);
|
||||
s_dlgfntheight = HIWORD(dlgFontSize);
|
||||
}
|
||||
s_dlgfntwidth = (WORD)size.cx;
|
||||
s_dlgfntheight = (WORD)size.cy;
|
||||
}
|
||||
|
||||
#if defined(FEAT_MENU) && defined(FEAT_TEAROFF)
|
||||
@@ -7683,12 +7412,10 @@ gui_mch_tearoff(
|
||||
}
|
||||
else
|
||||
# endif
|
||||
font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
VARIABLE_PITCH, DLG_FONT_NAME);
|
||||
if (s_usenewlook)
|
||||
oldFont = SelectFont(hdc, font);
|
||||
else
|
||||
oldFont = SelectFont(hdc, GetStockObject(SYSTEM_FONT));
|
||||
font = CreateFont(-DLG_FONT_POINT_SIZE, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, VARIABLE_PITCH, DLG_FONT_NAME);
|
||||
|
||||
oldFont = SelectFont(hdc, font);
|
||||
|
||||
// Calculate width of a single space. Used for padding columns to the
|
||||
// right width.
|
||||
@@ -7745,10 +7472,7 @@ gui_mch_tearoff(
|
||||
dlgwidth += 2 * TEAROFF_PADDING_X + TEAROFF_BUTTON_PAD_X;
|
||||
|
||||
// start to fill in the dlgtemplate information. addressing by WORDs
|
||||
if (s_usenewlook)
|
||||
lStyle = DS_MODALFRAME | WS_CAPTION| WS_SYSMENU |DS_SETFONT| WS_VISIBLE;
|
||||
else
|
||||
lStyle = DS_MODALFRAME | WS_CAPTION| WS_SYSMENU | WS_VISIBLE;
|
||||
lStyle = DS_MODALFRAME | WS_CAPTION | WS_SYSMENU | DS_SETFONT | WS_VISIBLE;
|
||||
|
||||
lExtendedStyle = WS_EX_TOOLWINDOW|WS_EX_STATICEDGE;
|
||||
*p++ = LOWORD(lStyle);
|
||||
@@ -7778,26 +7502,23 @@ gui_mch_tearoff(
|
||||
: (LPSTR)("Vim "VIM_VERSION_MEDIUM)), TRUE);
|
||||
p += nchar;
|
||||
|
||||
if (s_usenewlook)
|
||||
{
|
||||
// do the font, since DS_3DLOOK doesn't work properly
|
||||
// do the font, since DS_3DLOOK doesn't work properly
|
||||
# ifdef USE_SYSMENU_FONT
|
||||
if (use_lfSysmenu)
|
||||
{
|
||||
// point size
|
||||
*p++ = -MulDiv(lfSysmenu.lfHeight, 72,
|
||||
GetDeviceCaps(hdc, LOGPIXELSY));
|
||||
wcscpy(p, lfSysmenu.lfFaceName);
|
||||
nchar = (int)wcslen(lfSysmenu.lfFaceName) + 1;
|
||||
}
|
||||
else
|
||||
# endif
|
||||
{
|
||||
*p++ = DLG_FONT_POINT_SIZE; // point size
|
||||
nchar = nCopyAnsiToWideChar(p, DLG_FONT_NAME, FALSE);
|
||||
}
|
||||
p += nchar;
|
||||
if (use_lfSysmenu)
|
||||
{
|
||||
// point size
|
||||
*p++ = -MulDiv(lfSysmenu.lfHeight, 72,
|
||||
GetDeviceCaps(hdc, LOGPIXELSY));
|
||||
wcscpy(p, lfSysmenu.lfFaceName);
|
||||
nchar = (int)wcslen(lfSysmenu.lfFaceName) + 1;
|
||||
}
|
||||
else
|
||||
# endif
|
||||
{
|
||||
*p++ = DLG_FONT_POINT_SIZE; // point size
|
||||
nchar = nCopyAnsiToWideChar(p, DLG_FONT_NAME, FALSE);
|
||||
}
|
||||
p += nchar;
|
||||
|
||||
/*
|
||||
* Loop over all the items in the menu.
|
||||
@@ -7945,11 +7666,6 @@ gui_mch_tearoff(
|
||||
#if defined(FEAT_TOOLBAR) || defined(PROTO)
|
||||
# include "gui_w32_rc.h"
|
||||
|
||||
// This not defined in older SDKs
|
||||
# ifndef TBSTYLE_FLAT
|
||||
# define TBSTYLE_FLAT 0x0800
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Create the toolbar, initially unpopulated.
|
||||
* (just like the menu, there are no defaults, it's all
|
||||
@@ -8463,10 +8179,10 @@ gui_mch_destroy_sign(void *sign)
|
||||
static void
|
||||
make_tooltip(BalloonEval *beval, char *text, POINT pt)
|
||||
{
|
||||
TOOLINFOW_NEW *pti;
|
||||
RECT rect;
|
||||
TOOLINFOW *pti;
|
||||
RECT rect;
|
||||
|
||||
pti = alloc(sizeof(TOOLINFOW_NEW));
|
||||
pti = alloc(sizeof(TOOLINFOW));
|
||||
if (pti == NULL)
|
||||
return;
|
||||
|
||||
@@ -8478,7 +8194,7 @@ make_tooltip(BalloonEval *beval, char *text, POINT pt)
|
||||
SetWindowPos(beval->balloon, HWND_TOPMOST, 0, 0, 0, 0,
|
||||
SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
|
||||
|
||||
pti->cbSize = sizeof(TOOLINFOW_NEW);
|
||||
pti->cbSize = sizeof(TOOLINFOW);
|
||||
pti->uFlags = TTF_SUBCLASS;
|
||||
pti->hwnd = beval->target;
|
||||
pti->hinst = 0; // Don't use string resources
|
||||
@@ -8670,7 +8386,7 @@ Handle_WM_Notify(HWND hwnd UNUSED, LPNMHDR pnmh)
|
||||
case TTN_GETDISPINFO:
|
||||
{
|
||||
// if you get there then we have new common controls
|
||||
NMTTDISPINFO_NEW *info = (NMTTDISPINFO_NEW *)pnmh;
|
||||
NMTTDISPINFO *info = (NMTTDISPINFO *)pnmh;
|
||||
info->lpszText = (LPSTR)info->lParam;
|
||||
info->uFlags |= TTF_DI_SETITEM;
|
||||
}
|
||||
@@ -8678,7 +8394,7 @@ Handle_WM_Notify(HWND hwnd UNUSED, LPNMHDR pnmh)
|
||||
case TTN_GETDISPINFOW:
|
||||
{
|
||||
// if we get here then we have new common controls
|
||||
NMTTDISPINFOW_NEW *info = (NMTTDISPINFOW_NEW *)pnmh;
|
||||
NMTTDISPINFOW *info = (NMTTDISPINFOW *)pnmh;
|
||||
info->lpszText = (LPWSTR)info->lParam;
|
||||
info->uFlags |= TTF_DI_SETITEM;
|
||||
}
|
||||
|
||||
+2
-7
@@ -838,11 +838,6 @@ cs_create_connection(int i)
|
||||
HANDLE stdin_rd, stdout_rd;
|
||||
HANDLE stdout_wr, stdin_wr;
|
||||
BOOL created;
|
||||
# if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
|
||||
# define OPEN_OH_ARGTYPE intptr_t
|
||||
# else
|
||||
# define OPEN_OH_ARGTYPE long
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(UNIX)
|
||||
@@ -1037,11 +1032,11 @@ err_closing:
|
||||
CloseHandle(pi.hThread);
|
||||
|
||||
// TODO - tidy up after failure to create files on pipe handles.
|
||||
if (((fd = _open_osfhandle((OPEN_OH_ARGTYPE)stdin_wr,
|
||||
if (((fd = _open_osfhandle((intptr_t)stdin_wr,
|
||||
_O_TEXT|_O_APPEND)) < 0)
|
||||
|| ((csinfo[i].to_fp = _fdopen(fd, "w")) == NULL))
|
||||
PERROR(_("cs_create_connection: fdopen for to_fp failed"));
|
||||
if (((fd = _open_osfhandle((OPEN_OH_ARGTYPE)stdout_rd,
|
||||
if (((fd = _open_osfhandle((intptr_t)stdout_rd,
|
||||
_O_TEXT|_O_RDONLY)) < 0)
|
||||
|| ((csinfo[i].fr_fp = _fdopen(fd, "r")) == NULL))
|
||||
PERROR(_("cs_create_connection: fdopen for fr_fp failed"));
|
||||
|
||||
@@ -30,13 +30,6 @@ extern HWND vim_parent_hwnd;
|
||||
# define FINAL
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1300) || !defined(MAXULONG_PTR)
|
||||
/* Work around old versions of basetsd.h which wrongly declares
|
||||
* UINT_PTR as unsigned long */
|
||||
# undef UINT_PTR
|
||||
# define UINT_PTR UINT
|
||||
#endif
|
||||
|
||||
#include "if_ole.h" // Interface definitions
|
||||
#include "iid_ole.c" // UUID definitions (compile here)
|
||||
|
||||
|
||||
@@ -32,11 +32,6 @@
|
||||
# define RUBYEXTERN extern
|
||||
#endif
|
||||
|
||||
// suggested by Ariya Mizutani
|
||||
#if (_MSC_VER == 1200)
|
||||
# undef _WIN32_WINNT
|
||||
#endif
|
||||
|
||||
#ifdef DYNAMIC_RUBY
|
||||
/*
|
||||
* This is tricky. In ruby.h there is (inline) function rb_class_of()
|
||||
|
||||
+2
-2
@@ -166,9 +166,9 @@
|
||||
# define mch_access(n, p) access((n), (p))
|
||||
# endif
|
||||
|
||||
// Use 64-bit fstat function if available.
|
||||
// Use 64-bit fstat function on MS-Windows.
|
||||
// NOTE: This condition is the same as for the stat_T type.
|
||||
# if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
|
||||
# ifdef MSWIN
|
||||
# define mch_fstat(n, p) _fstat64((n), (p))
|
||||
# else
|
||||
# define mch_fstat(n, p) fstat((n), (p))
|
||||
|
||||
+4
-1
@@ -1262,12 +1262,15 @@ textpos2screenpos(
|
||||
if (col >= wp->w_width)
|
||||
col = -1;
|
||||
if (col >= 0 && row + rowoff <= wp->w_height)
|
||||
{
|
||||
coloff = col - scol + wp->w_wincol + 1;
|
||||
row += W_WINROW(wp);
|
||||
}
|
||||
else
|
||||
// character is left, right or below of the window
|
||||
row = rowoff = scol = ccol = ecol = 0;
|
||||
}
|
||||
*rowp = W_WINROW(wp) + row + rowoff;
|
||||
*rowp = row + rowoff;
|
||||
*scolp = scol + coloff;
|
||||
*ccolp = ccol + coloff;
|
||||
*ecolp = ecol + coloff;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
rem To be used on MS-Windows when using the Visual C++ Toolkit 2003
|
||||
rem See INSTALLpc.txt for information.
|
||||
|
||||
set PATH=%SystemRoot%\Microsoft.NET\Framework\v1.1.4322;%PATH%
|
||||
call "%VCToolkitInstallDir%vcvars32.bat"
|
||||
set MSVCVer=7.1
|
||||
|
||||
rem The platform SDK can be installed elsewhere, adjust the path.
|
||||
call "%ProgramFiles%\Microsoft Platform SDK\SetEnv.Cmd"
|
||||
rem call "e:\Microsoft Platform SDK\SetEnv.Cmd"
|
||||
|
||||
set LIB=%ProgramFiles%\Microsoft Visual Studio .NET 2003\Vc7\lib;%LIB%
|
||||
+940
-937
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -2348,8 +2348,7 @@ ambw_end:
|
||||
# ifdef FEAT_POSTSCRIPT
|
||||
varp == &p_pexpr ||
|
||||
# endif
|
||||
FALSE
|
||||
)
|
||||
varp == &p_ccv)
|
||||
{
|
||||
char_u **p_opt = NULL;
|
||||
char_u *name;
|
||||
@@ -2388,6 +2387,8 @@ ambw_end:
|
||||
if (varp == &p_pexpr) // 'printexpr'
|
||||
p_opt = &p_pexpr;
|
||||
# endif
|
||||
if (varp == &p_ccv) // 'charconvert'
|
||||
p_opt = &p_ccv;
|
||||
|
||||
if (p_opt != NULL)
|
||||
{
|
||||
|
||||
+12
-27
@@ -429,23 +429,15 @@ slash_adjust(char_u *p)
|
||||
}
|
||||
}
|
||||
|
||||
// Use 64-bit stat functions if available.
|
||||
#ifdef HAVE_STAT64
|
||||
# undef stat
|
||||
# undef _stat
|
||||
# undef _wstat
|
||||
# undef _fstat
|
||||
# define stat _stat64
|
||||
# define _stat _stat64
|
||||
# define _wstat _wstat64
|
||||
# define _fstat _fstat64
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
|
||||
# define OPEN_OH_ARGTYPE intptr_t
|
||||
#else
|
||||
# define OPEN_OH_ARGTYPE long
|
||||
#endif
|
||||
// Use 64-bit stat functions.
|
||||
#undef stat
|
||||
#undef _stat
|
||||
#undef _wstat
|
||||
#undef _fstat
|
||||
#define stat _stat64
|
||||
#define _stat _stat64
|
||||
#define _wstat _wstat64
|
||||
#define _fstat _fstat64
|
||||
|
||||
static int
|
||||
wstat_symlink_aware(const WCHAR *name, stat_T *stp)
|
||||
@@ -487,7 +479,7 @@ wstat_symlink_aware(const WCHAR *name, stat_T *stp)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = _open_osfhandle((OPEN_OH_ARGTYPE)h, _O_RDONLY);
|
||||
fd = _open_osfhandle((intptr_t)h, _O_RDONLY);
|
||||
n = _fstat(fd, (struct _stat *)stp);
|
||||
if ((n == 0) && (attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
stp->st_mode = (stp->st_mode & ~S_IFREG) | S_IFDIR;
|
||||
@@ -881,7 +873,7 @@ mch_libcall(
|
||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
if (GetExceptionCode() == EXCEPTION_STACK_OVERFLOW)
|
||||
RESETSTKOFLW();
|
||||
_resetstkoflw();
|
||||
fRunTimeLinkSuccess = 0;
|
||||
}
|
||||
# endif
|
||||
@@ -1043,14 +1035,7 @@ swap_me(COLORREF colorref)
|
||||
return colorref;
|
||||
}
|
||||
|
||||
// Attempt to make this work for old and new compilers
|
||||
# if !defined(_WIN64) && (!defined(_MSC_VER) || _MSC_VER < 1300)
|
||||
# define PDP_RETVAL BOOL
|
||||
# else
|
||||
# define PDP_RETVAL INT_PTR
|
||||
# endif
|
||||
|
||||
static PDP_RETVAL CALLBACK
|
||||
static INT_PTR CALLBACK
|
||||
PrintDlgProc(
|
||||
HWND hDlg,
|
||||
UINT message,
|
||||
|
||||
+11
-2
@@ -868,10 +868,11 @@ sig_tstp SIGDEFARG(sigarg)
|
||||
signal(SIGTSTP, ignore_sigtstp ? SIG_IGN : SIG_DFL);
|
||||
raise(sigarg);
|
||||
}
|
||||
else
|
||||
got_tstp = TRUE;
|
||||
|
||||
// this is not required on all systems, but it doesn't hurt anybody
|
||||
signal(SIGTSTP, (RETSIGTYPE (*)())sig_tstp);
|
||||
got_tstp = TRUE;
|
||||
SIGRETURN;
|
||||
}
|
||||
#endif
|
||||
@@ -1377,7 +1378,14 @@ set_signals(void)
|
||||
|
||||
#ifdef SIGTSTP
|
||||
// See mch_init() for the conditions under which we ignore SIGTSTP.
|
||||
signal(SIGTSTP, ignore_sigtstp ? SIG_IGN : (RETSIGTYPE (*)())sig_tstp);
|
||||
// In the GUI default TSTP processing is OK.
|
||||
// Checking both gui.in_use and gui.starting because gui.in_use is not set
|
||||
// at this point (set after menus are displayed), but gui.starting is set.
|
||||
signal(SIGTSTP, ignore_sigtstp ? SIG_IGN
|
||||
# ifdef FEAT_GUI
|
||||
: gui.in_use || gui.starting ? SIG_DFL
|
||||
# endif
|
||||
: (RETSIGTYPE (*)())sig_tstp);
|
||||
#endif
|
||||
#if defined(SIGCONT)
|
||||
signal(SIGCONT, sigcont_handler);
|
||||
@@ -6436,6 +6444,7 @@ select_eintr:
|
||||
if (got_tstp && !in_mch_suspend)
|
||||
{
|
||||
exarg_T ea;
|
||||
|
||||
ea.forceit = TRUE;
|
||||
ex_stop(&ea);
|
||||
got_tstp = FALSE;
|
||||
|
||||
@@ -2690,13 +2690,6 @@ static HICON g_hOrigIcon = NULL;
|
||||
static HICON g_hVimIcon = NULL;
|
||||
static BOOL g_fCanChangeIcon = FALSE;
|
||||
|
||||
// ICON* are not defined in VC++ 4.0
|
||||
# ifndef ICON_SMALL
|
||||
# define ICON_SMALL 0
|
||||
# endif
|
||||
# ifndef ICON_BIG
|
||||
# define ICON_BIG 1
|
||||
# endif
|
||||
/*
|
||||
* GetConsoleIcon()
|
||||
* Description:
|
||||
@@ -7464,88 +7457,6 @@ mch_copy_file_attribute(char_u *from, char_u *to)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(MYRESETSTKOFLW) || defined(PROTO)
|
||||
/*
|
||||
* Recreate a destroyed stack guard page in win32.
|
||||
* Written by Benjamin Peterson.
|
||||
*/
|
||||
|
||||
// These magic numbers are from the MS header files
|
||||
# define MIN_STACK_WINNT 2
|
||||
|
||||
/*
|
||||
* This function does the same thing as _resetstkoflw(), which is only
|
||||
* available in DevStudio .net and later.
|
||||
* Returns 0 for failure, 1 for success.
|
||||
*/
|
||||
int
|
||||
myresetstkoflw(void)
|
||||
{
|
||||
BYTE *pStackPtr;
|
||||
BYTE *pGuardPage;
|
||||
BYTE *pStackBase;
|
||||
BYTE *pLowestPossiblePage;
|
||||
MEMORY_BASIC_INFORMATION mbi;
|
||||
SYSTEM_INFO si;
|
||||
DWORD nPageSize;
|
||||
DWORD dummy;
|
||||
|
||||
// We need to know the system page size.
|
||||
GetSystemInfo(&si);
|
||||
nPageSize = si.dwPageSize;
|
||||
|
||||
// ...and the current stack pointer
|
||||
pStackPtr = (BYTE*)_alloca(1);
|
||||
|
||||
// ...and the base of the stack.
|
||||
if (VirtualQuery(pStackPtr, &mbi, sizeof mbi) == 0)
|
||||
return 0;
|
||||
pStackBase = (BYTE*)mbi.AllocationBase;
|
||||
|
||||
// ...and the page that's min_stack_req pages away from stack base; this is
|
||||
// the lowest page we could use.
|
||||
pLowestPossiblePage = pStackBase + MIN_STACK_WINNT * nPageSize;
|
||||
|
||||
{
|
||||
// We want the first committed page in the stack Start at the stack
|
||||
// base and move forward through memory until we find a committed block.
|
||||
BYTE *pBlock = pStackBase;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (VirtualQuery(pBlock, &mbi, sizeof mbi) == 0)
|
||||
return 0;
|
||||
|
||||
pBlock += mbi.RegionSize;
|
||||
|
||||
if (mbi.State & MEM_COMMIT)
|
||||
break;
|
||||
}
|
||||
|
||||
// mbi now describes the first committed block in the stack.
|
||||
if (mbi.Protect & PAGE_GUARD)
|
||||
return 1;
|
||||
|
||||
// decide where the guard page should start
|
||||
if ((long_u)(mbi.BaseAddress) < (long_u)pLowestPossiblePage)
|
||||
pGuardPage = pLowestPossiblePage;
|
||||
else
|
||||
pGuardPage = (BYTE*)mbi.BaseAddress;
|
||||
|
||||
// allocate the guard page
|
||||
if (!VirtualAlloc(pGuardPage, nPageSize, MEM_COMMIT, PAGE_READWRITE))
|
||||
return 0;
|
||||
|
||||
// apply the guard attribute to the page
|
||||
if (!VirtualProtect(pGuardPage, nPageSize, PAGE_READWRITE | PAGE_GUARD,
|
||||
&dummy))
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* The command line arguments in UTF-16
|
||||
|
||||
+5
-22
@@ -47,13 +47,8 @@
|
||||
|
||||
#define FEAT_SHORTCUT // resolve shortcuts
|
||||
|
||||
#if (!defined(_MSC_VER) || _MSC_VER > 1020)
|
||||
/*
|
||||
* Access Control List (actually security info).
|
||||
* MSVC has acl stuff only in 5.0, not in 4.2, don't know about 4.3.
|
||||
*/
|
||||
# define HAVE_ACL
|
||||
#endif
|
||||
// Access Control List (actually security info).
|
||||
#define HAVE_ACL
|
||||
|
||||
#define USE_FNAME_CASE // adjust case of file names
|
||||
#if !defined(FEAT_CLIPBOARD)
|
||||
@@ -134,17 +129,11 @@
|
||||
# define IO_REPARSE_TAG_SYMLINK 0xA000000C
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#ifdef _MSC_VER
|
||||
// Support for __try / __except. All versions of MSVC are
|
||||
// expected to have this. Any other compilers that support it?
|
||||
# define HAVE_TRY_EXCEPT 1
|
||||
# include <malloc.h> // for _resetstkoflw()
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||
# define RESETSTKOFLW _resetstkoflw
|
||||
# else
|
||||
# define RESETSTKOFLW myresetstkoflw
|
||||
# define MYRESETSTKOFLW
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -154,14 +143,8 @@
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1000)
|
||||
// Use the new debugging tools in Visual C++ 4.x
|
||||
# include <crtdbg.h>
|
||||
# define ASSERT(f) _ASSERT(f)
|
||||
# else
|
||||
# include <assert.h>
|
||||
# define ASSERT(f) assert(f)
|
||||
# endif
|
||||
# include <crtdbg.h>
|
||||
# define ASSERT(f) _ASSERT(f)
|
||||
|
||||
# define TRACE Trace
|
||||
# define TRACE0(sz) Trace(_T("%s"), _T(sz))
|
||||
|
||||
+3042
-3015
File diff suppressed because it is too large
Load Diff
+6508
-3602
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,6 @@ Comment[es]=Edita archivos de texto
|
||||
Comment[et]=Redigeeri tekstifaile
|
||||
Comment[eu]=Editatu testu-fitxategiak
|
||||
Comment[fa]=ویرایش پروندههای متنی
|
||||
Comment[fi]=Muokkaa tekstitiedostoja
|
||||
Comment[ga]=Eagar comhad Téacs
|
||||
Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
|
||||
Comment[he]=ערוך קבצי טקסט
|
||||
|
||||
+3676
-3382
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,6 @@ Comment[es]=Edita archivos de texto
|
||||
Comment[et]=Redigeeri tekstifaile
|
||||
Comment[eu]=Editatu testu-fitxategiak
|
||||
Comment[fa]=ویرایش پروندههای متنی
|
||||
Comment[fi]=Muokkaa tekstitiedostoja
|
||||
Comment[ga]=Eagar comhad Téacs
|
||||
Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
|
||||
Comment[he]=ערוך קבצי טקסט
|
||||
|
||||
@@ -64,7 +64,6 @@ int mch_access(char *n, int p);
|
||||
int mch_open(const char *name, int flags, int mode);
|
||||
FILE *mch_fopen(const char *name, const char *mode);
|
||||
int mch_copy_file_attribute(char_u *from, char_u *to);
|
||||
int myresetstkoflw(void);
|
||||
int get_cmd_argsW(char ***argvp);
|
||||
void free_cmd_argsW(void);
|
||||
void used_file_arg(char *name, int literal, int full_path, int diff_mode);
|
||||
|
||||
@@ -8,7 +8,7 @@ char_u *deref_func_name(char_u *name, int *lenp, partial_T **partialp, type_T **
|
||||
void emsg_funcname(char *ermsg, char_u *name);
|
||||
int get_func_tv(char_u *name, int len, typval_T *rettv, char_u **arg, evalarg_T *evalarg, funcexe_T *funcexe);
|
||||
char_u *fname_trans_sid(char_u *name, char_u *fname_buf, char_u **tofree, int *error);
|
||||
ufunc_T *find_func_even_dead(char_u *name, int is_global);
|
||||
ufunc_T *find_func_even_dead(char_u *name, int flags);
|
||||
ufunc_T *find_func(char_u *name, int is_global);
|
||||
int func_is_global(ufunc_T *ufunc);
|
||||
int func_name_refcount(char_u *name);
|
||||
|
||||
@@ -23,6 +23,7 @@ int generate_PUSHCHANNEL(cctx_T *cctx, channel_T *channel);
|
||||
int generate_PUSHJOB(cctx_T *cctx, job_T *job);
|
||||
int generate_PUSHBLOB(cctx_T *cctx, blob_T *blob);
|
||||
int generate_PUSHFUNC(cctx_T *cctx, char_u *name, type_T *type);
|
||||
int generate_AUTOLOAD(cctx_T *cctx, char_u *name, type_T *type);
|
||||
int generate_GETITEM(cctx_T *cctx, int index, int with_op);
|
||||
int generate_SLICE(cctx_T *cctx, int count);
|
||||
int generate_CHECKLEN(cctx_T *cctx, int min_len, int more_OK);
|
||||
|
||||
+1
-1
@@ -1474,7 +1474,7 @@ yank_copy_line(struct block_def *bd, long y_idx, int exclude_trailing_space)
|
||||
{
|
||||
int s = bd->textlen + bd->endspaces;
|
||||
|
||||
while (VIM_ISWHITE(*(bd->textstart + s - 1)) && s > 0)
|
||||
while (s > 0 && VIM_ISWHITE(*(bd->textstart + s - 1)))
|
||||
{
|
||||
s = s - (*mb_head_off)(bd->textstart, bd->textstart + s - 1) - 1;
|
||||
pnew--;
|
||||
|
||||
@@ -4,9 +4,10 @@ source check.vim
|
||||
CheckFeature conceal
|
||||
|
||||
source screendump.vim
|
||||
CheckScreendump
|
||||
|
||||
func Test_conceal_two_windows()
|
||||
CheckScreendump
|
||||
|
||||
let code =<< trim [CODE]
|
||||
let lines = ["one one one one one", "two |hidden| here", "three |hidden| three"]
|
||||
call setline(1, lines)
|
||||
@@ -111,6 +112,8 @@ func Test_conceal_two_windows()
|
||||
endfunc
|
||||
|
||||
func Test_conceal_with_cursorline()
|
||||
CheckScreendump
|
||||
|
||||
" Opens a help window, where 'conceal' is set, switches to the other window
|
||||
" where 'cursorline' needs to be updated when the cursor moves.
|
||||
let code =<< trim [CODE]
|
||||
@@ -138,6 +141,8 @@ func Test_conceal_with_cursorline()
|
||||
endfunc
|
||||
|
||||
func Test_conceal_resize_term()
|
||||
CheckScreendump
|
||||
|
||||
let code =<< trim [CODE]
|
||||
call setline(1, '`one` `two` `three` `four` `five`, the backticks should be concealed')
|
||||
setl cocu=n cole=3
|
||||
|
||||
@@ -124,7 +124,7 @@ func Test_screenpos()
|
||||
\ 'col': wincol + 7,
|
||||
\ 'curscol': wincol + 7,
|
||||
\ 'endcol': wincol + 7}, winid->screenpos(line('$'), 8))
|
||||
call assert_equal({'row': winrow - 1, 'col': 0, 'curscol': 0, 'endcol': 0},
|
||||
call assert_equal({'row': 0, 'col': 0, 'curscol': 0, 'endcol': 0},
|
||||
\ winid->screenpos(line('$'), 22))
|
||||
|
||||
close
|
||||
|
||||
@@ -1073,14 +1073,16 @@ func Test_edit_DROP()
|
||||
endfunc
|
||||
|
||||
func Test_edit_CTRL_V()
|
||||
CheckFeature ebcdic
|
||||
CheckNotFeature ebcdic
|
||||
|
||||
new
|
||||
call setline(1, ['abc'])
|
||||
call cursor(2, 1)
|
||||
|
||||
" force some redraws
|
||||
set showmode showcmd
|
||||
"call test_override_char_avail(1)
|
||||
call test_override('ALL', 1)
|
||||
call test_override('char_avail', 1)
|
||||
|
||||
call feedkeys("A\<c-v>\<c-n>\<c-v>\<c-l>\<c-v>\<c-b>\<esc>", 'tnix')
|
||||
call assert_equal(["abc\x0e\x0c\x02"], getline(1, '$'))
|
||||
|
||||
@@ -1093,8 +1095,19 @@ func Test_edit_CTRL_V()
|
||||
set norl
|
||||
endif
|
||||
|
||||
call test_override('ALL', 0)
|
||||
set noshowmode showcmd
|
||||
call test_override('char_avail', 0)
|
||||
|
||||
" No modifiers should be applied to the char typed using i_CTRL-V_digit.
|
||||
call feedkeys(":append\<CR>\<C-V>76c\<C-V>76\<C-F2>\<C-V>u3c0j\<C-V>u3c0\<M-F3>\<CR>.\<CR>", 'tnix')
|
||||
call assert_equal('LcL<C-F2>πjπ<M-F3>', getline(2))
|
||||
|
||||
if has('osx')
|
||||
" A char with a modifier should not be a valid char for i_CTRL-V_digit.
|
||||
call feedkeys("o\<C-V>\<D-j>\<C-V>\<D-1>\<C-V>\<D-o>\<C-V>\<D-x>\<C-V>\<D-u>", 'tnix')
|
||||
call assert_equal('<D-j><D-1><D-o><D-x><D-u>', getline(3))
|
||||
endif
|
||||
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -590,4 +590,9 @@ func Test_curly_assignment()
|
||||
unlet g:gvar
|
||||
endfunc
|
||||
|
||||
func Test_deep_recursion()
|
||||
" this was running out of stack
|
||||
call assert_fails("exe 'if ' .. repeat('(', 1002)", 'E1169: Expression too recursive: ((')
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -241,4 +241,14 @@ func Test_ex_mode_count_overflow()
|
||||
call delete('Xexmodescript')
|
||||
endfunc
|
||||
|
||||
func Test_ex_mode_large_indent()
|
||||
new
|
||||
set ts=500 ai
|
||||
call setline(1, "\t")
|
||||
exe "normal gQi\<CR>."
|
||||
set ts=8 noai
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -190,40 +190,51 @@ let s:filename_checks = {
|
||||
\ 'freebasic': ['file.fb'],
|
||||
\ 'fsharp': ['file.fs', 'file.fsi', 'file.fsx'],
|
||||
\ 'fstab': ['fstab', 'mtab'],
|
||||
\ 'fusion': ['file.fusion'],
|
||||
\ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'],
|
||||
\ 'gdb': ['.gdbinit', 'gdbinit'],
|
||||
\ 'gdresource': ['file.tscn', 'file.tres'],
|
||||
\ 'gdscript': ['file.gd'],
|
||||
\ 'gdmo': ['file.mo', 'file.gdmo'],
|
||||
\ 'gedcom': ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'],
|
||||
\ 'gemtext': ['file.gmi', 'file.gemini'],
|
||||
\ 'gift': ['file.gift'],
|
||||
\ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG', 'NOTES_EDITMSG', 'EDIT_DESCRIPTION'],
|
||||
\ 'gitconfig': ['file.git/config', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', '/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'],
|
||||
\ 'gitconfig': ['file.git/config', 'file.git/config.worktree', 'file.git/worktrees/x/config.worktree', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', '/usr/local/etc/gitconfig', '/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'],
|
||||
\ 'gitolite': ['gitolite.conf', '/gitolite-admin/conf/file', 'any/gitolite-admin/conf/file'],
|
||||
\ 'gitrebase': ['git-rebase-todo'],
|
||||
\ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
|
||||
\ 'gkrellmrc': ['gkrellmrc', 'gkrellmrc_x'],
|
||||
\ 'glsl': ['file.glsl'],
|
||||
\ 'gnash': ['gnashrc', '.gnashrc', 'gnashpluginrc', '.gnashpluginrc'],
|
||||
\ 'gnuplot': ['file.gpi'],
|
||||
\ 'gnuplot': ['file.gpi', '.gnuplot'],
|
||||
\ 'go': ['file.go'],
|
||||
\ 'gomod': ['go.mod'],
|
||||
\ 'gowork': ['go.work'],
|
||||
\ 'gp': ['file.gp', '.gprc'],
|
||||
\ 'gpg': ['/.gnupg/options', '/.gnupg/gpg.conf', '/usr/any/gnupg/options.skel', 'any/.gnupg/gpg.conf', 'any/.gnupg/options', 'any/usr/any/gnupg/options.skel'],
|
||||
\ 'grads': ['file.gs'],
|
||||
\ 'graphql': ['file.graphql', 'file.graphqls', 'file.gql'],
|
||||
\ 'gretl': ['file.gretl'],
|
||||
\ 'groovy': ['file.gradle', 'file.groovy'],
|
||||
\ 'group': ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak', '/etc/group', '/etc/group-', '/etc/group.edit', '/etc/gshadow', '/etc/gshadow-', '/etc/gshadow.edit', '/var/backups/group.bak', '/var/backups/gshadow.bak'],
|
||||
\ 'grub': ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'],
|
||||
\ 'gsp': ['file.gsp'],
|
||||
\ 'gtkrc': ['.gtkrc', 'gtkrc', '.gtkrc-file', 'gtkrc-file'],
|
||||
\ 'hack': ['file.hack', 'file.hackpartial'],
|
||||
\ 'haml': ['file.haml'],
|
||||
\ 'hamster': ['file.hsm'],
|
||||
\ 'handlebars': ['file.hbs'],
|
||||
\ 'haskell': ['file.hs', 'file.hsc', 'file.hs-boot', 'file.hsig'],
|
||||
\ 'haste': ['file.ht'],
|
||||
\ 'hastepreproc': ['file.htpp'],
|
||||
\ 'hb': ['file.hb'],
|
||||
\ 'hcl': ['file.hcl'],
|
||||
\ 'hercules': ['file.vc', 'file.ev', 'file.sum', 'file.errsum'],
|
||||
\ 'heex': ['file.heex'],
|
||||
\ 'hex': ['file.hex', 'file.h32'],
|
||||
\ 'hgcommit': ['hg-editor-file.txt'],
|
||||
\ 'hjson': ['file.hjson'],
|
||||
\ 'hog': ['file.hog', 'snort.conf', 'vision.conf'],
|
||||
\ 'hollywood': ['file.hws'],
|
||||
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
|
||||
@@ -265,6 +276,7 @@ let s:filename_checks = {
|
||||
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
|
||||
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file'],
|
||||
\ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.babelrc', '.eslintrc', '.prettierrc', '.firebaserc', 'file.slnf'],
|
||||
\ 'json5': ['file.json5'],
|
||||
\ 'jsonc': ['file.jsonc'],
|
||||
\ 'jsp': ['file.jsp'],
|
||||
\ 'julia': ['file.jl'],
|
||||
@@ -278,6 +290,7 @@ let s:filename_checks = {
|
||||
\ 'latte': ['file.latte', 'file.lte'],
|
||||
\ 'ld': ['file.ld'],
|
||||
\ 'ldif': ['file.ldif'],
|
||||
\ 'ledger': ['file.ldg', 'file.ledger', 'file.journal'],
|
||||
\ 'less': ['file.less'],
|
||||
\ 'lex': ['file.lex', 'file.l', 'file.lxx', 'file.l++'],
|
||||
\ 'lftp': ['lftp.conf', '.lftprc', 'anylftp/rc', 'lftp/rc', 'some-lftp/rc'],
|
||||
@@ -352,6 +365,7 @@ let s:filename_checks = {
|
||||
\ 'netrc': ['.netrc'],
|
||||
\ 'nginx': ['file.nginx', 'nginxfile.conf', 'filenginx.conf', 'any/etc/nginx/file', 'any/usr/local/nginx/conf/file', 'any/nginx/file.conf'],
|
||||
\ 'ninja': ['file.ninja'],
|
||||
\ 'nix': ['file.nix'],
|
||||
\ 'nqc': ['file.nqc'],
|
||||
\ 'nroff': ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],
|
||||
\ 'nsis': ['file.nsi', 'file.nsh'],
|
||||
@@ -394,6 +408,7 @@ let s:filename_checks = {
|
||||
\ 'ppd': ['file.ppd'],
|
||||
\ 'ppwiz': ['file.it', 'file.ih'],
|
||||
\ 'privoxy': ['file.action'],
|
||||
\ 'prisma': ['file.prisma'],
|
||||
\ 'proc': ['file.pc'],
|
||||
\ 'procmail': ['.procmail', '.procmailrc'],
|
||||
\ 'prolog': ['file.pdb'],
|
||||
@@ -404,10 +419,12 @@ let s:filename_checks = {
|
||||
\ 'ps1xml': ['file.ps1xml'],
|
||||
\ 'psf': ['file.psf'],
|
||||
\ 'psl': ['file.psl'],
|
||||
\ 'pug': ['file.pug'],
|
||||
\ 'puppet': ['file.pp'],
|
||||
\ 'pyret': ['file.arr'],
|
||||
\ 'pyrex': ['file.pyx', 'file.pxd'],
|
||||
\ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi', 'SConstruct'],
|
||||
\ 'ql': ['file.ql', 'file.qll'],
|
||||
\ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg', 'baseq2/file.cfg', 'id1/file.cfg', 'quake1/file.cfg', 'some-baseq2/file.cfg', 'some-id1/file.cfg', 'some-quake1/file.cfg'],
|
||||
\ 'radiance': ['file.rad', 'file.mat'],
|
||||
\ 'raku': ['file.pm6', 'file.p6', 'file.t6', 'file.pod6', 'file.raku', 'file.rakumod', 'file.rakudoc', 'file.rakutest'],
|
||||
@@ -489,6 +506,7 @@ let s:filename_checks = {
|
||||
\ 'stata': ['file.ado', 'file.do', 'file.imata', 'file.mata'],
|
||||
\ 'stp': ['file.stp'],
|
||||
\ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers', 'any/etc/sudoers.d/file'],
|
||||
\ 'surface': ['file.sface'],
|
||||
\ 'svg': ['file.svg'],
|
||||
\ 'svn': ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'],
|
||||
\ 'swift': ['file.swift'],
|
||||
@@ -502,8 +520,10 @@ let s:filename_checks = {
|
||||
\ 'taskdata': ['pending.data', 'completed.data', 'undo.data'],
|
||||
\ 'taskedit': ['file.task'],
|
||||
\ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc'],
|
||||
\ 'teal': ['file.tl'],
|
||||
\ 'teraterm': ['file.ttl'],
|
||||
\ 'terminfo': ['file.ti'],
|
||||
\ 'terraform': ['file.tfvars'],
|
||||
\ 'tex': ['file.latex', 'file.sty', 'file.dtx', 'file.ltx', 'file.bbl'],
|
||||
\ 'texinfo': ['file.texinfo', 'file.texi', 'file.txi'],
|
||||
\ 'texmf': ['texmf.cnf'],
|
||||
@@ -511,6 +531,7 @@ let s:filename_checks = {
|
||||
\ 'tf': ['file.tf', '.tfrc', 'tfrc'],
|
||||
\ 'tidy': ['.tidyrc', 'tidyrc', 'tidy.conf'],
|
||||
\ 'tilde': ['file.t.html'],
|
||||
\ 'tla': ['file.tla'],
|
||||
\ 'tli': ['file.tli'],
|
||||
\ 'tmux': ['tmuxfile.conf', '.tmuxfile.conf', '.tmux-file.conf', '.tmux.conf', 'tmux-file.conf', 'tmux.conf', 'tmux.conf.local'],
|
||||
\ 'toml': ['file.toml', 'Gopkg.lock', 'Pipfile', '/home/user/.cargo/config'],
|
||||
@@ -571,6 +592,7 @@ let s:filename_checks = {
|
||||
\ 'xslt': ['file.xsl', 'file.xslt'],
|
||||
\ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
|
||||
\ 'yaml': ['file.yaml', 'file.yml'],
|
||||
\ 'yang': ['file.yang'],
|
||||
\ 'raml': ['file.raml'],
|
||||
\ 'z8a': ['file.z8a'],
|
||||
\ 'zig': ['file.zig'],
|
||||
@@ -1169,6 +1191,10 @@ func Test_foam_file()
|
||||
|
||||
call delete('0', 'rf')
|
||||
call delete('0.orig', 'rf')
|
||||
call delete('Xfile1Dict')
|
||||
call delete('Xfile1Dict.something')
|
||||
call delete('XfileProperties')
|
||||
call delete('XfileProperties.something')
|
||||
filetype off
|
||||
endfunc
|
||||
|
||||
|
||||
@@ -1630,6 +1630,32 @@ func Test_setbufvar_options()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_setbufvar_keep_window_title()
|
||||
CheckRunVimInTerminal
|
||||
if !has('title') || empty(&t_ts)
|
||||
throw "Skipped: can't get/set title"
|
||||
endif
|
||||
|
||||
let lines =<< trim END
|
||||
set title
|
||||
edit Xa.txt
|
||||
let g:buf = bufadd('Xb.txt')
|
||||
inoremap <F2> <C-R>=setbufvar(g:buf, '&autoindent', 1) ?? ''<CR>
|
||||
END
|
||||
call writefile(lines, 'Xsetbufvar')
|
||||
let buf = RunVimInTerminal('-S Xsetbufvar', {})
|
||||
call WaitForAssert({-> assert_match('Xa.txt', term_gettitle(buf))}, 1000)
|
||||
|
||||
call term_sendkeys(buf, "i\<F2>")
|
||||
call TermWait(buf)
|
||||
call term_sendkeys(buf, "\<Esc>")
|
||||
call TermWait(buf)
|
||||
call assert_match('Xa.txt', term_gettitle(buf))
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xsetbufvar')
|
||||
endfunc
|
||||
|
||||
func Test_redo_in_nested_functions()
|
||||
nnoremap g. :set opfunc=Operator<CR>g@
|
||||
function Operator( type, ... )
|
||||
@@ -2308,7 +2334,6 @@ endfunc
|
||||
|
||||
func Test_state()
|
||||
CheckRunVimInTerminal
|
||||
let g:test_is_flaky = 1
|
||||
|
||||
let getstate = ":echo 'state: ' .. g:state .. '; mode: ' .. g:mode\<CR>"
|
||||
|
||||
|
||||
@@ -373,6 +373,7 @@ func Test_fileinfo_after_echo()
|
||||
" clean up
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xtest_fileinfo_after_echo')
|
||||
call delete('b.txt')
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -90,6 +90,9 @@ func Test_paste_ex_mode()
|
||||
unlet! foo
|
||||
call feedkeys("Qlet foo=\"\<Esc>[200~foo\<CR>bar\<Esc>[201~\"\<CR>vi\<CR>", 'xt')
|
||||
call assert_equal("foo\rbar", foo)
|
||||
|
||||
" pasting more than 40 bytes
|
||||
exe "norm Q\<PasteStart>0000000000000000000000000000000000000000000000000000000000000000000000\<C-C>"
|
||||
endfunc
|
||||
|
||||
func Test_paste_onechar()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
" Test the :disassemble command, and compilation as a side effect
|
||||
|
||||
source check.vim
|
||||
source vim9.vim
|
||||
|
||||
func NotCompiled()
|
||||
echo "not"
|
||||
@@ -286,21 +287,35 @@ def s:ScriptFuncPush()
|
||||
enddef
|
||||
|
||||
def Test_disassemble_push()
|
||||
var res = execute('disass s:ScriptFuncPush')
|
||||
assert_match('<SNR>\d*_ScriptFuncPush.*' ..
|
||||
'localbool = true.*' ..
|
||||
' PUSH true.*' ..
|
||||
'localspec = v:none.*' ..
|
||||
' PUSH v:none.*' ..
|
||||
'localblob = 0z1234.*' ..
|
||||
' PUSHBLOB 0z1234.*',
|
||||
res)
|
||||
if has('float')
|
||||
assert_match('<SNR>\d*_ScriptFuncPush.*' ..
|
||||
'localfloat = 1.234.*' ..
|
||||
' PUSHF 1.234.*',
|
||||
res)
|
||||
endif
|
||||
mkdir('Xdir/autoload', 'p')
|
||||
var save_rtp = &rtp
|
||||
exe 'set rtp^=' .. getcwd() .. '/Xdir'
|
||||
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
END
|
||||
writefile(lines, 'Xdir/autoload/autoscript.vim')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import autoload 'autoscript.vim'
|
||||
|
||||
def s:AutoloadFunc()
|
||||
&operatorfunc = autoscript.Opfunc
|
||||
enddef
|
||||
|
||||
var res = execute('disass s:AutoloadFunc')
|
||||
assert_match('<SNR>\d*_AutoloadFunc.*' ..
|
||||
'&operatorfunc = autoscript.Opfunc\_s*' ..
|
||||
'0 AUTOLOAD autoscript#Opfunc\_s*' ..
|
||||
'1 STOREFUNCOPT &operatorfunc\_s*' ..
|
||||
'2 RETURN void',
|
||||
res)
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
delete('Xdir', 'rf')
|
||||
&rtp = save_rtp
|
||||
enddef
|
||||
|
||||
def s:ScriptFuncStore()
|
||||
|
||||
@@ -673,6 +673,74 @@ def Test_use_autoload_import_in_insert_completion()
|
||||
&rtp = save_rtp
|
||||
enddef
|
||||
|
||||
def Test_use_autoload_import_partial_in_opfunc()
|
||||
mkdir('Xdir/autoload', 'p')
|
||||
var save_rtp = &rtp
|
||||
exe 'set rtp^=' .. getcwd() .. '/Xdir'
|
||||
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
export def Opfunc(..._)
|
||||
g:opfunc_called = 'yes'
|
||||
enddef
|
||||
END
|
||||
writefile(lines, 'Xdir/autoload/opfunc.vim')
|
||||
|
||||
new
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import autoload 'opfunc.vim'
|
||||
nnoremap <expr> <F3> TheFunc()
|
||||
def TheFunc(): string
|
||||
&operatorfunc = function('opfunc.Opfunc', [0])
|
||||
return 'g@'
|
||||
enddef
|
||||
feedkeys("\<F3>l", 'xt')
|
||||
assert_equal('yes', g:opfunc_called)
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
set opfunc=
|
||||
bwipe!
|
||||
delete('Xdir', 'rf')
|
||||
nunmap <F3>
|
||||
&rtp = save_rtp
|
||||
enddef
|
||||
|
||||
def Test_set_opfunc_to_autoload_func_directly()
|
||||
mkdir('Xdir/autoload', 'p')
|
||||
var save_rtp = &rtp
|
||||
exe 'set rtp^=' .. getcwd() .. '/Xdir'
|
||||
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
export def Opfunc(..._)
|
||||
g:opfunc_called = 'yes'
|
||||
enddef
|
||||
END
|
||||
writefile(lines, 'Xdir/autoload/opfunc.vim')
|
||||
|
||||
new
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import autoload 'opfunc.vim'
|
||||
nnoremap <expr> <F3> TheFunc()
|
||||
def TheFunc(): string
|
||||
&operatorfunc = opfunc.Opfunc
|
||||
return 'g@'
|
||||
enddef
|
||||
feedkeys("\<F3>l", 'xt')
|
||||
assert_equal('yes', g:opfunc_called)
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
set opfunc=
|
||||
bwipe!
|
||||
delete('Xdir', 'rf')
|
||||
nunmap <F3>
|
||||
&rtp = save_rtp
|
||||
enddef
|
||||
|
||||
def Test_use_autoload_import_in_fold_expression()
|
||||
mkdir('Xdir/autoload', 'p')
|
||||
var save_rtp = &rtp
|
||||
@@ -757,6 +825,7 @@ def Run_Test_import_in_diffexpr()
|
||||
diffoff!
|
||||
bwipe!
|
||||
bwipe!
|
||||
delete('Xdiffexpr')
|
||||
enddef
|
||||
|
||||
def Test_import_in_patchexpr()
|
||||
@@ -843,7 +912,7 @@ def Test_import_in_includeexpr()
|
||||
bwipe!
|
||||
bwipe!
|
||||
set includeexpr=
|
||||
delete('Xinclude')
|
||||
delete('Xinclude.vim')
|
||||
delete('Xthisfile')
|
||||
enddef
|
||||
|
||||
@@ -874,6 +943,127 @@ def Test_import_in_indentexpr()
|
||||
delete('Xindenter')
|
||||
enddef
|
||||
|
||||
func Test_import_in_printexpr()
|
||||
CheckFeature postscript
|
||||
call Run_Test_import_in_printexpr()
|
||||
endfunc
|
||||
|
||||
def Run_Test_import_in_printexpr()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
export def PrintFile(): bool
|
||||
g:printed = 'yes'
|
||||
delete('v:fname_in')
|
||||
return false
|
||||
enddef
|
||||
END
|
||||
writefile(lines, 'Xprint.vim')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xprint.vim'
|
||||
set printexpr=Xprint.PrintFile()
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
help
|
||||
hardcopy dummy args
|
||||
assert_equal('yes', g:printed)
|
||||
|
||||
delete('Xprint.vim')
|
||||
set printexpr=
|
||||
enddef
|
||||
|
||||
def Test_import_in_charconvert()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
export def MakeUpper(): bool
|
||||
var data = readfile(v:fname_in)
|
||||
map(data, 'toupper(v:val)')
|
||||
writefile(data, v:fname_out)
|
||||
return false # success
|
||||
enddef
|
||||
END
|
||||
writefile(lines, 'Xconvert.vim')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xconvert.vim' as conv
|
||||
set charconvert=conv.MakeUpper()
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
writefile(['one', 'two'], 'Xfile')
|
||||
new Xfile
|
||||
write ++enc=ucase Xfile1
|
||||
assert_equal(['ONE', 'TWO'], readfile('Xfile1'))
|
||||
|
||||
delete('Xfile')
|
||||
delete('Xfile1')
|
||||
delete('Xconvert.vim')
|
||||
bwipe!
|
||||
set charconvert&
|
||||
enddef
|
||||
|
||||
func Test_import_in_spellsuggest_expr()
|
||||
CheckFeature spell
|
||||
call Run_Test_import_in_spellsuggest_expr()
|
||||
endfunc
|
||||
|
||||
def Run_Test_import_in_spellsuggest_expr()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
export def MySuggest(): list<any>
|
||||
return [['Fox', 8], ['Fop', 9]]
|
||||
enddef
|
||||
END
|
||||
writefile(lines, 'Xsuggest.vim')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xsuggest.vim' as sugg
|
||||
set spell spellsuggest=expr:sugg.MySuggest()
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
set verbose=1 # report errors
|
||||
call assert_equal(['Fox', 'Fop'], spellsuggest('Fo', 2))
|
||||
|
||||
delete('Xsuggest.vim')
|
||||
set nospell spellsuggest& verbose=0
|
||||
enddef
|
||||
|
||||
def Test_export_shadows_global_function()
|
||||
mkdir('Xdir/autoload', 'p')
|
||||
var save_rtp = &rtp
|
||||
exe 'set rtp^=' .. getcwd() .. '/Xdir'
|
||||
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
export def Shadow(): string
|
||||
return 'Shadow()'
|
||||
enddef
|
||||
END
|
||||
writefile(lines, 'Xdir/autoload/shadow.vim')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
|
||||
def g:Shadow(): string
|
||||
return 'global'
|
||||
enddef
|
||||
|
||||
import autoload 'shadow.vim'
|
||||
assert_equal('Shadow()', shadow.Shadow())
|
||||
END
|
||||
CheckScriptSuccess(lines)
|
||||
|
||||
delfunc g:Shadow
|
||||
bwipe!
|
||||
delete('Xdir', 'rf')
|
||||
&rtp = save_rtp
|
||||
enddef
|
||||
|
||||
def Test_export_fails()
|
||||
CheckScriptFailure(['export var some = 123'], 'E1042:')
|
||||
CheckScriptFailure(['vim9script', 'export var g:some'], 'E1022:')
|
||||
@@ -1837,7 +2027,7 @@ def Test_autoload_name_wring()
|
||||
writefile(lines, 'Xscriptname.vim')
|
||||
CheckScriptFailure(lines, 'E1263:')
|
||||
|
||||
delete('Xscriptname')
|
||||
delete('Xscriptname.vim')
|
||||
enddef
|
||||
|
||||
def Test_import_autoload_postponed()
|
||||
|
||||
@@ -1247,6 +1247,13 @@ func Test_visual_put_blockedit_zy_and_zp()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func Test_visual_block_yank_zy()
|
||||
new
|
||||
" this was reading before the start of the line
|
||||
exe "norm o\<C-T>\<Esc>\<C-V>zy"
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
func Test_visual_block_with_virtualedit()
|
||||
CheckScreendump
|
||||
|
||||
@@ -1328,5 +1335,31 @@ func Test_visual_exchange_windows()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" this was leaving the end of the Visual area beyond the end of a line
|
||||
func Test_visual_ex_copy_line()
|
||||
new
|
||||
call setline(1, ["aaa", "bbbbbbbbbxbb"])
|
||||
/x
|
||||
exe "normal ggvjfxO"
|
||||
t0
|
||||
normal gNU
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" This was leaving the end of the Visual area beyond the end of a line.
|
||||
" Set 'undolevels' to start a new undo block.
|
||||
func Test_visual_undo_deletes_last_line()
|
||||
new
|
||||
call setline(1, ["aaa", "ccc", "dyd"])
|
||||
set undolevels=100
|
||||
exe "normal obbbbbbbbbxbb\<Esc>"
|
||||
set undolevels=100
|
||||
/y
|
||||
exe "normal ggvjfxO"
|
||||
undo
|
||||
normal gNU
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
+3
-17
@@ -1022,14 +1022,6 @@ get8ctime(FILE *fd)
|
||||
return n;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if (_MSC_VER <= 1200)
|
||||
// This line is required for VC6 without the service pack. Also see the
|
||||
// matching #pragma below.
|
||||
# pragma optimize("", off)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Write time_T to file "fd" in 8 bytes.
|
||||
* Returns FAIL when the write failed.
|
||||
@@ -1068,22 +1060,16 @@ time_to_bytes(time_T the_time, char_u *buf)
|
||||
buf[bi++] = 0;
|
||||
else
|
||||
{
|
||||
#if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4
|
||||
# if defined(SIZEOF_TIME_T) && SIZEOF_TIME_T > 4
|
||||
c = (int)(wtime >> (i * 8));
|
||||
#else
|
||||
# else
|
||||
c = (int)((long_u)wtime >> (i * 8));
|
||||
#endif
|
||||
# endif
|
||||
buf[bi++] = c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# if (_MSC_VER <= 1200)
|
||||
# pragma optimize("", on)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -3029,6 +3029,8 @@ u_undo_end(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (VIsual_active)
|
||||
check_pos(curbuf, &VIsual);
|
||||
|
||||
smsg_attr_keep(0, _("%ld %s; %s #%ld %s"),
|
||||
u_oldcount < 0 ? -u_oldcount : u_oldcount,
|
||||
|
||||
+18
-9
@@ -1941,16 +1941,18 @@ find_func_with_prefix(char_u *name, int sid)
|
||||
|
||||
/*
|
||||
* Find a function by name, return pointer to it in ufuncs.
|
||||
* When "is_global" is true don't find script-local or imported functions.
|
||||
* When "flags" has FFED_IS_GLOBAL don't find script-local or imported
|
||||
* functions.
|
||||
* When "flags" has "FFED_NO_GLOBAL" don't find global functions.
|
||||
* Return NULL for unknown function.
|
||||
*/
|
||||
ufunc_T *
|
||||
find_func_even_dead(char_u *name, int is_global)
|
||||
find_func_even_dead(char_u *name, int flags)
|
||||
{
|
||||
hashitem_T *hi;
|
||||
ufunc_T *func;
|
||||
|
||||
if (!is_global)
|
||||
if ((flags & FFED_IS_GLOBAL) == 0)
|
||||
{
|
||||
int find_script_local = in_vim9script() && eval_isnamec1(*name)
|
||||
&& (name[1] != ':' || *name == 's');
|
||||
@@ -1965,10 +1967,13 @@ find_func_even_dead(char_u *name, int is_global)
|
||||
}
|
||||
}
|
||||
|
||||
hi = hash_find(&func_hashtab,
|
||||
if ((flags & FFED_NO_GLOBAL) == 0)
|
||||
{
|
||||
hi = hash_find(&func_hashtab,
|
||||
STRNCMP(name, "g:", 2) == 0 ? name + 2 : name);
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
return HI2UF(hi);
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
return HI2UF(hi);
|
||||
}
|
||||
|
||||
// Find autoload function if this is an autoload script.
|
||||
return find_func_with_prefix(name[0] == 's' && name[1] == ':'
|
||||
@@ -1983,7 +1988,7 @@ find_func_even_dead(char_u *name, int is_global)
|
||||
ufunc_T *
|
||||
find_func(char_u *name, int is_global)
|
||||
{
|
||||
ufunc_T *fp = find_func_even_dead(name, is_global);
|
||||
ufunc_T *fp = find_func_even_dead(name, is_global ? FFED_IS_GLOBAL : 0);
|
||||
|
||||
if (fp != NULL && (fp->uf_flags & FC_DEAD) == 0)
|
||||
return fp;
|
||||
@@ -2354,7 +2359,7 @@ func_clear_free(ufunc_T *fp, int force)
|
||||
int
|
||||
copy_func(char_u *lambda, char_u *global, ectx_T *ectx)
|
||||
{
|
||||
ufunc_T *ufunc = find_func_even_dead(lambda, TRUE);
|
||||
ufunc_T *ufunc = find_func_even_dead(lambda, FFED_IS_GLOBAL);
|
||||
ufunc_T *fp = NULL;
|
||||
|
||||
if (ufunc == NULL)
|
||||
@@ -4464,6 +4469,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
|
||||
hashtab_T *ht;
|
||||
char_u *find_name = name;
|
||||
int var_conflict = FALSE;
|
||||
int ffed_flags = is_global ? FFED_IS_GLOBAL : 0;
|
||||
|
||||
v = find_var(name, &ht, TRUE);
|
||||
if (v != NULL && (in_vim9script() || v->di_tv.v_type == VAR_FUNC))
|
||||
@@ -4481,6 +4487,9 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
|
||||
v = find_var(find_name, &ht, TRUE);
|
||||
if (v != NULL)
|
||||
var_conflict = TRUE;
|
||||
// Only check if the function already exists in the script,
|
||||
// global functions can be shadowed.
|
||||
ffed_flags |= FFED_NO_GLOBAL;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4508,7 +4517,7 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
|
||||
goto erret;
|
||||
}
|
||||
|
||||
fp = find_func_even_dead(find_name, is_global);
|
||||
fp = find_func_even_dead(find_name, ffed_flags);
|
||||
if (vim9script)
|
||||
{
|
||||
char_u *uname = untrans_function_name(name);
|
||||
|
||||
@@ -765,6 +765,76 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
4221,
|
||||
/**/
|
||||
4220,
|
||||
/**/
|
||||
4219,
|
||||
/**/
|
||||
4218,
|
||||
/**/
|
||||
4217,
|
||||
/**/
|
||||
4216,
|
||||
/**/
|
||||
4215,
|
||||
/**/
|
||||
4214,
|
||||
/**/
|
||||
4213,
|
||||
/**/
|
||||
4212,
|
||||
/**/
|
||||
4211,
|
||||
/**/
|
||||
4210,
|
||||
/**/
|
||||
4209,
|
||||
/**/
|
||||
4208,
|
||||
/**/
|
||||
4207,
|
||||
/**/
|
||||
4206,
|
||||
/**/
|
||||
4205,
|
||||
/**/
|
||||
4204,
|
||||
/**/
|
||||
4203,
|
||||
/**/
|
||||
4202,
|
||||
/**/
|
||||
4201,
|
||||
/**/
|
||||
4200,
|
||||
/**/
|
||||
4199,
|
||||
/**/
|
||||
4198,
|
||||
/**/
|
||||
4197,
|
||||
/**/
|
||||
4196,
|
||||
/**/
|
||||
4195,
|
||||
/**/
|
||||
4194,
|
||||
/**/
|
||||
4193,
|
||||
/**/
|
||||
4192,
|
||||
/**/
|
||||
4191,
|
||||
/**/
|
||||
4190,
|
||||
/**/
|
||||
4189,
|
||||
/**/
|
||||
4188,
|
||||
/**/
|
||||
4187,
|
||||
/**/
|
||||
4186,
|
||||
/**/
|
||||
|
||||
@@ -353,15 +353,8 @@ typedef __int64 long_i;
|
||||
# define SCANF_DECIMAL_LONG_U "%llu"
|
||||
# define PRINTF_HEX_LONG_U "0x%llx"
|
||||
#else
|
||||
// Microsoft-specific. The __w64 keyword should be specified on any typedefs
|
||||
// that change size between 32-bit and 64-bit platforms. For any such type,
|
||||
// __w64 should appear only on the 32-bit definition of the typedef.
|
||||
// Define __w64 as an empty token for everything but MSVC 7.x or later.
|
||||
# if !defined(_MSC_VER) || (_MSC_VER < 1300)
|
||||
# define __w64
|
||||
# endif
|
||||
typedef unsigned long __w64 long_u;
|
||||
typedef long __w64 long_i;
|
||||
typedef unsigned long long_u;
|
||||
typedef long long_i;
|
||||
# define SCANF_HEX_LONG_U "%lx"
|
||||
# define SCANF_DECIMAL_LONG_U "%lu"
|
||||
# define PRINTF_HEX_LONG_U "0x%lx"
|
||||
@@ -384,7 +377,7 @@ typedef long __w64 long_i;
|
||||
* We assume that when fseeko() is available then ftello() is too.
|
||||
* Note that Windows has different function names.
|
||||
*/
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
|
||||
#ifdef MSWIN
|
||||
typedef __int64 off_T;
|
||||
# ifdef __MINGW32__
|
||||
# define vim_lseek lseek64
|
||||
@@ -2173,9 +2166,8 @@ typedef struct
|
||||
typedef int Clipboard_T; // This is required for the prototypes.
|
||||
#endif
|
||||
|
||||
// Use 64-bit stat structure if available.
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1300)) || defined(__MINGW32__)
|
||||
# define HAVE_STAT64
|
||||
// Use 64-bit stat structure on MS-Windows.
|
||||
#ifdef MSWIN
|
||||
typedef struct _stat64 stat_T;
|
||||
#else
|
||||
typedef struct stat stat_T;
|
||||
@@ -2810,4 +2802,8 @@ long elapsed(DWORD start_tick);
|
||||
#define VSE_SHELL 1 // escape for a shell command
|
||||
#define VSE_BUFFER 2 // escape for a ":buffer" command
|
||||
|
||||
// Flags used by find_func_even_dead()
|
||||
#define FFED_IS_GLOBAL 1 // "g:" was used
|
||||
#define FFED_NO_GLOBAL 2 // only check for script-local functions
|
||||
|
||||
#endif // VIM__H
|
||||
|
||||
@@ -92,6 +92,8 @@ typedef enum {
|
||||
ISN_NEWLIST, // push list from stack items, size is isn_arg.number
|
||||
ISN_NEWDICT, // push dict from stack items, size is isn_arg.number
|
||||
|
||||
ISN_AUTOLOAD, // get item from autoload import, function or variable
|
||||
|
||||
// function call
|
||||
ISN_BCALL, // call builtin function isn_arg.bfunc
|
||||
ISN_DCALL, // call def function isn_arg.dfunc
|
||||
|
||||
+1
-1
@@ -332,7 +332,7 @@ check_defined(char_u *p, size_t len, cctx_T *cctx, int is_arg)
|
||||
&& (lookup_local(p, len, NULL, cctx) == OK
|
||||
|| arg_exists(p, len, NULL, NULL, NULL, cctx) == OK))
|
||||
|| find_imported(p, len, FALSE, cctx) != NULL
|
||||
|| (ufunc = find_func_even_dead(p, FALSE)) != NULL)
|
||||
|| (ufunc = find_func_even_dead(p, 0)) != NULL)
|
||||
{
|
||||
// A local or script-local function can shadow a global function.
|
||||
if (ufunc == NULL || ((ufunc->uf_flags & FC_DEAD) == 0
|
||||
|
||||
+689
-590
File diff suppressed because it is too large
Load Diff
+3
-2
@@ -307,11 +307,12 @@ compile_load_scriptvar(
|
||||
char_u *auto_name = concat_str(si->sn_autoload_prefix, exp_name);
|
||||
|
||||
// autoload script must be loaded later, access by the autoload
|
||||
// name.
|
||||
// name. If a '(' follows it must be a function. Otherwise we
|
||||
// don't know, it can be "script.Func".
|
||||
if (cc == '(' || paren_follows_after_expr)
|
||||
res = generate_PUSHFUNC(cctx, auto_name, &t_func_any);
|
||||
else
|
||||
res = generate_LOAD(cctx, ISN_LOADG, 0, auto_name, &t_any);
|
||||
res = generate_AUTOLOAD(cctx, auto_name, &t_any);
|
||||
vim_free(auto_name);
|
||||
done = TRUE;
|
||||
}
|
||||
|
||||
+19
-1
@@ -743,6 +743,23 @@ generate_PUSHFUNC(cctx_T *cctx, char_u *name, type_T *type)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate an ISN_AUTOLOAD instruction.
|
||||
*/
|
||||
int
|
||||
generate_AUTOLOAD(cctx_T *cctx, char_u *name, type_T *type)
|
||||
{
|
||||
isn_T *isn;
|
||||
|
||||
RETURN_OK_IF_SKIP(cctx);
|
||||
if ((isn = generate_instr_type(cctx, ISN_AUTOLOAD, type)) == NULL)
|
||||
return FAIL;
|
||||
isn->isn_arg.string = vim_strsave(name);
|
||||
if (isn->isn_arg.string == NULL)
|
||||
return FAIL;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate an ISN_GETITEM instruction with "index".
|
||||
* "with_op" is TRUE for "+=" and other operators, the stack has the current
|
||||
@@ -1929,6 +1946,7 @@ delete_instr(isn_T *isn)
|
||||
{
|
||||
switch (isn->isn_type)
|
||||
{
|
||||
case ISN_AUTOLOAD:
|
||||
case ISN_DEF:
|
||||
case ISN_EXEC:
|
||||
case ISN_EXECRANGE:
|
||||
@@ -2050,7 +2068,7 @@ delete_instr(isn_T *isn)
|
||||
case ISN_NEWFUNC:
|
||||
{
|
||||
char_u *lambda = isn->isn_arg.newfunc.nf_lambda;
|
||||
ufunc_T *ufunc = find_func_even_dead(lambda, TRUE);
|
||||
ufunc_T *ufunc = find_func_even_dead(lambda, FFED_IS_GLOBAL);
|
||||
|
||||
if (ufunc != NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user