Merge remote-tracking branch 'vim/master'

This commit is contained in:
Yee Cheng Chin
2025-02-18 20:27:53 -08:00
44 changed files with 1681 additions and 1173 deletions
+1
View File
@@ -406,6 +406,7 @@ runtime/keymap/armenian-eastern_utf-8.vim @blinskey
runtime/keymap/armenian-western_utf-8.vim @blinskey
runtime/keymap/russian-typograph.vim @RestorerZ
runtime/keymap/tamil_tscii.vim @yegappan
runtime/keymap/ukrainian-enhanced.vim @Dolfost
runtime/lang/menu_en_gb.latin1.vim @mrdubya
runtime/lang/menu_ru_ru.cp1251.vim @RestorerZ
runtime/lang/menu_ru_ru.koi8-r.vim @RestorerZ
+3 -2
View File
@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 06
*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3008,7 +3008,8 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
When {expr3} is omitted then "force" is assumed.
{expr1} is changed when {expr2} is not empty. If necessary
make a copy of {expr1} first.
make a copy of {expr1} first or use |extendnew()| to return a
new List/Dictionary.
{expr2} remains unchanged.
When {expr1} is locked and {expr2} is not empty the operation
fails.
+6 -1
View File
@@ -1,4 +1,4 @@
*insert.txt* For Vim version 9.1. Last change: 2024 Dec 31
*insert.txt* For Vim version 9.1. Last change: 2025 Feb 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -657,6 +657,11 @@ CTRL-N (next), and CTRL-P (previous).
To get the current completion information, |complete_info()| can be used.
Also see the 'infercase' option if you want to adjust the case of the match.
When inserting a selected candidate word from the |popup-menu|, the part of
the candidate word that does not match the query is highlighted using
|hl-ComplMatchIns|. If fuzzy is enabled in 'completopt', highlighting will not
be applied.
*complete_CTRL-E*
When completion is active you can use CTRL-E to stop it and go back to the
originally typed text. The CTRL-E will not be inserted.
+1 -10
View File
@@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Feb 08
*options.txt* For Vim version 9.1. Last change: 2025 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8652,15 +8652,6 @@ A jump table for the options with a short description can be found at |Q_op|.
When on, uses |highlight-guifg| and |highlight-guibg| attributes in
the terminal (thus using 24-bit color).
Will automatically be enabled, if Vim detects that it runs in a
capable terminal (when the terminal supports the RGB terminfo
capability or when the number of colors |t_Co| supported by the
terminal is 0x1000000, e.g. with $TERM=xterm-direct). Due to the async
nature of querying the terminal, enabling this automatically is
noticable. Use >
set notermguicolors
< to explicitly disable.
Requires a ISO-8613-3 compatible terminal. If setting this option
does not work (produces a colorless UI) reading |xterm-true-color|
might help.
-2
View File
@@ -41583,8 +41583,6 @@ Adjusted default values ~
increased to 12pt to accomodate modern high-dpi monitors
- the default value of the 'keyprotocol' option has been updated and support
for the ghostty terminal emulator (using kitty protocol) has been added
- 'termguicolors' is automatically enabled if the terminal supports the RGB
terminfo capability or supports 0x1000000 colors
*changed-9.2*
Changed~
+11 -22
View File
@@ -1,4 +1,4 @@
*vim9class.txt* For Vim version 9.1. Last change: 2025 Feb 11
*vim9class.txt* For Vim version 9.1. Last change: 2025 Feb 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -52,7 +52,6 @@ An interface is used to specify properties of an object:
The class hierarchy allows for single inheritance. Otherwise interfaces are
to be used where needed.
Class modeling ~
You can model classes any way you like. Keep in mind what you are building,
@@ -122,7 +121,6 @@ using the object name followed by a dot following by the member: >
A class name cannot be used as an expression. A class name cannot be used in
the left-hand-side of an assignment.
Object variable write access ~
*read-only-variable*
Now try to change an object variable directly: >
@@ -626,13 +624,15 @@ once. They can appear in any order, although this order is recommended: >
extends ClassName
implements InterfaceName, OtherInterface
specifies SomeInterface
< *E1355* *E1369*
<
The "specifies" feature is currently not implemented.
*E1355* *E1369*
Each variable and method name can be used only once. It is not possible to
define a method with the same name and different type of arguments. It is not
possible to use a public and protected member variable with the same name. An
object variable name used in a super class cannot be reused in a child class.
Object Variable Initialization ~
If the type of a variable is not explicitly specified in a class, then it is
@@ -689,13 +689,12 @@ A class can implement one or more interfaces. The "implements" keyword can
only appear once *E1350* . Multiple interfaces can be specified, separated by
commas. Each interface name can appear only once. *E1351*
A class defining an interface ~
*specifies*
A class can declare its interface, the object variables and methods, with a
named interface. This avoids the need for separately specifying the
interface, which is often done in many languages, especially Java.
TODO: This is currently not implemented.
Items in a class ~
*E1318* *E1325* *E1388*
@@ -736,25 +735,25 @@ Some of the builtin functions like |empty()|, |len()| and |string()| can be
used with an object. An object can implement a method with the same name as
these builtin functions to return an object-specific value.
*E1412*
*E1412*
The following builtin methods are supported:
*object-empty()*
*object-empty()*
empty() Invoked by the |empty()| function to check whether an object is
empty. If this method is missing, then true is returned. This
method should not accept any arguments and must return a boolean.
*object-len()*
*object-len()*
len() Invoked by the |len()| function to return the length of an
object. If this method is missing in the class, then an error is
given and zero is returned. This method should not accept any
arguments and must return a number.
*object-string()*
*object-string()*
string() Invoked by the |string()| function to get a textual
representation of an object. Also used by the |:echo| command
for an object. If this method is missing in the class, then a
built-in default textual representation is used. This method
should not accept any arguments and must return a string.
*E1413*
*E1413*
A class method cannot be used as a builtin method.
Defining an interface ~
@@ -786,7 +785,6 @@ An interface can only be defined in a |Vim9| script file. *E1342*
An interface cannot "implement" another interface but it can "extend" another
interface. *E1381*
null object ~
When a variable is declared to have the type of an object, but it is not
@@ -795,7 +793,6 @@ does not know what class was supposed to be used. Vim then cannot check if
a variable name is correct and you will get a "Using a null object" error,
even when the variable name is invalid. *E1360* *E1362*
Default constructor ~
*default-constructor*
In case you define a class without a new() method, one will be automatically
@@ -1118,7 +1115,6 @@ For |Vim9| script using the same method name for all constructors seemed like
the right choice, and by calling it new() the relation between the caller and
the method being called is obvious.
No overloading of the constructor ~
In Vim script, both legacy and |Vim9| script, there is no overloading of
@@ -1139,7 +1135,6 @@ That way multiple constructors with different arguments are possible, while it
is very easy to see which constructor is being used. And the type of
arguments can be properly checked.
No overloading of methods ~
Same reasoning as for the constructor: It is often not obvious what type
@@ -1148,7 +1143,6 @@ actually being called. Better just give the methods a different name, then
type checking will make sure it works as you intended. This rules out
polymorphism, which we don't really need anyway.
Single inheritance and interfaces ~
Some languages support multiple inheritance. Although that can be useful in
@@ -1164,7 +1158,6 @@ it will be checked if that change was also changed. The mechanism to assume a
class implements an interface just because the methods happen to match is
brittle and leads to obscure problems, let's not do that.
Using "this.variable" everywhere ~
The object variables in various programming languages can often be accessed in
@@ -1183,7 +1176,6 @@ variables. Simple and consistent. When looking at the code inside a class
it's also directly clear which variable references are object variables and
which aren't.
Using class variables ~
Using "static variable" to declare a class variable is very common, nothing
@@ -1197,7 +1189,6 @@ the class. This has two problems: The class name can be rather long, taking
up quite a bit of space, and when the class is renamed all these places need
to be changed too.
Declaring object and class variables ~
The main choice is whether to use "var" as with variable declarations.
@@ -1251,7 +1242,6 @@ function declaration syntax for class/object variables and methods. Vim9 also
reuses the general function declaration syntax for methods. So, for the sake
of consistency, we require "var" in these declarations.
Using "ClassName.new()" to construct an object ~
Many languages use the "new" operator to create an object, which is actually
@@ -1315,7 +1305,6 @@ An alternative would have been using the "protected" keyword, just like
"public" changes the access in the other direction. Well, that's just to
reduce the number of keywords.
No private object variables ~
Some languages provide several ways to control access to object variables.
+87
View File
@@ -0,0 +1,87 @@
" Vim Keymap file for ukrainian characters MS Windows enhanced variant.
" This file is based on russian-jcukenwin.vim by Artem Chuprina <ran@ran.pp.ru>.
" Keymap has been originally created by Ivan Korneliuk <vansha@gmail.com>.
" Maintainer: Vladyslav Rehan <rehanvladyslav@gmail.com>
" Last Changed: 2025 feb 13
scriptencoding utf-8
let b:keymap_name = "uk"
loadkeymap
~ RIGHT SINGLE QUOTATION MARK
` ' APOSTROPHE
F А CYRILLIC CAPITAL LETTER A
< Б CYRILLIC CAPITAL LETTER BE
D В CYRILLIC CAPITAL LETTER VE
U Г CYRILLIC CAPITAL LETTER GHE
| Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN
L Д CYRILLIC CAPITAL LETTER DE
T Е CYRILLIC CAPITAL LETTER IE
: Ж CYRILLIC CAPITAL LETTER ZHE
P З CYRILLIC CAPITAL LETTER ZE
B И CYRILLIC CAPITAL LETTER I
S І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
} Ї CYRILLIC CAPITAL LETTER YI
Q Й CYRILLIC CAPITAL LETTER SHORT I
R К CYRILLIC CAPITAL LETTER KA
K Л CYRILLIC CAPITAL LETTER EL
V М CYRILLIC CAPITAL LETTER EM
Y Н CYRILLIC CAPITAL LETTER EN
J О CYRILLIC CAPITAL LETTER O
G П CYRILLIC CAPITAL LETTER PE
H Р CYRILLIC CAPITAL LETTER ER
C С CYRILLIC CAPITAL LETTER ES
N Т CYRILLIC CAPITAL LETTER TE
E У CYRILLIC CAPITAL LETTER U
A Ф CYRILLIC CAPITAL LETTER EF
{ Х CYRILLIC CAPITAL LETTER HA
W Ц CYRILLIC CAPITAL LETTER TSE
X Ч CYRILLIC CAPITAL LETTER CHE
I Ш CYRILLIC CAPITAL LETTER SHA
O Щ CYRILLIC CAPITAL LETTER SHCHA
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
\" Є CYRILLIC CAPITAL LETTER UKRAINIAN IE
> Ю CYRILLIC CAPITAL LETTER YU
Z Я CYRILLIC CAPITAL LETTER YA
f а CYRILLIC SMALL LETTER A
, б CYRILLIC SMALL LETTER BE
d в CYRILLIC SMALL LETTER VE
u г CYRILLIC SMALL LETTER GHE
\\ ґ CYRILLIC SMALL LETTER GHE WITH UPTURN
l д CYRILLIC SMALL LETTER DE
t е CYRILLIC SMALL LETTER IE
; ж CYRILLIC SMALL LETTER ZHE
p з CYRILLIC SMALL LETTER ZE
b и CYRILLIC SMALL LETTER I
s і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
] ї CYRILLIC SMALL LETTER YI
q й CYRILLIC SMALL LETTER SHORT I
r к CYRILLIC SMALL LETTER KA
k л CYRILLIC SMALL LETTER EL
v м CYRILLIC SMALL LETTER EM
y н CYRILLIC SMALL LETTER EN
j о CYRILLIC SMALL LETTER O
g п CYRILLIC SMALL LETTER PE
h р CYRILLIC SMALL LETTER ER
c с CYRILLIC SMALL LETTER ES
n т CYRILLIC SMALL LETTER TE
e у CYRILLIC SMALL LETTER U
a ф CYRILLIC SMALL LETTER EF
[ х CYRILLIC SMALL LETTER HA
w ц CYRILLIC SMALL LETTER TSE
x ч CYRILLIC SMALL LETTER CHE
i ш CYRILLIC SMALL LETTER SHA
o щ CYRILLIC SMALL LETTER SHCHA
m ь CYRILLIC SMALL LETTER SOFT SIGN
' є CYRILLIC SMALL LETTER UKRAINIAN IE
. ю CYRILLIC SMALL LETTER YU
z я CYRILLIC SMALL LETTER YA
@ " QUOTATION MARK
# № NUMERO SIGN
$ ; SEMICOLON
^ : COLON
& ? QUESTION MARK
/ . FULL STOP
? , COMMA
+237 -277
View File
@@ -19,7 +19,7 @@ if &cp || exists("g:loaded_netrw")
finish
endif
let g:loaded_netrw = "v176"
let g:loaded_netrw = "v177"
if !has("patch-9.1.1054") && !has('nvim')
echoerr 'netrw needs Vim v9.1.1054'
@@ -45,109 +45,104 @@ setl cpo&vim
" netrw#ErrorMsg(s:NOTE | s:WARNING | s:ERROR,["message1","message2",...],error-number)
" (this function can optionally take a list of messages)
" Dec 2, 2019 : max errnum currently is 106
fun! netrw#ErrorMsg(level,msg,errnum)
" call Dfunc("netrw#ErrorMsg(level=".a:level." msg<".a:msg."> errnum=".a:errnum.") g:netrw_use_errorwindow=".g:netrw_use_errorwindow)
function! netrw#ErrorMsg(level, msg, errnum)
if a:level < g:netrw_errorlvl
return
endif
if a:level < g:netrw_errorlvl
" call Dret("netrw#ErrorMsg : suppressing level=".a:level." since g:netrw_errorlvl=".g:netrw_errorlvl)
return
endif
if a:level == 1
let level= "**warning** (netrw) "
elseif a:level == 2
let level= "**error** (netrw) "
else
let level= "**note** (netrw) "
endif
" call Decho("level=".level,'~'.expand("<slnum>"))
if g:netrw_use_errorwindow == 2 && exists("*popup_atcursor")
" use popup window
if type(a:msg) == 3
let msg = [level]+a:msg
if a:level == 1
let level = "**warning** (netrw) "
elseif a:level == 2
let level = "**error** (netrw) "
else
let msg= level.a:msg
let level = "**note** (netrw) "
endif
let s:popuperr_id = popup_atcursor(msg,{})
let s:popuperr_text= ""
elseif g:netrw_use_errorwindow
" (default) netrw creates a one-line window to show error/warning
" messages (reliably displayed)
" record current window number
let s:winBeforeErr= winnr()
" call Decho("s:winBeforeErr=".s:winBeforeErr,'~'.expand("<slnum>"))
if g:netrw_use_errorwindow == 2 && exists("*popup_atcursor")
" use popup window
if type(a:msg) == 3
let msg = [level]+a:msg
else
let msg = level.a:msg
endif
let s:popuperr_id = popup_atcursor(msg, {})
let s:popuperr_text = ""
elseif has('nvim')
call v:lua.vim.notify(level . a:msg, a:level + 2)
elseif g:netrw_use_errorwindow
" (default) netrw creates a one-line window to show error/warning
" messages (reliably displayed)
" record current window number
let s:winBeforeErr = winnr()
" call Decho("s:winBeforeErr=".s:winBeforeErr,'~'.expand("<slnum>"))
" getting messages out reliably is just plain difficult!
" This attempt splits the current window, creating a one line window.
if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0
" call Decho("write to NetrwMessage buffer",'~'.expand("<slnum>"))
exe bufwinnr("NetrwMessage")."wincmd w"
" call Decho("setl ma noro",'~'.expand("<slnum>"))
setl ma noro
if type(a:msg) == 3
for msg in a:msg
NetrwKeepj call setline(line("$")+1,level.msg)
endfor
else
NetrwKeepj call setline(line("$")+1,level.a:msg)
endif
NetrwKeepj $
else
" call Decho("create a NetrwMessage buffer window",'~'.expand("<slnum>"))
bo 1split
sil! call s:NetrwEnew()
sil! NetrwKeepj call s:NetrwOptionsSafe(1)
setl bt=nofile
NetrwKeepj file NetrwMessage
" call Decho("setl ma noro",'~'.expand("<slnum>"))
setl ma noro
if type(a:msg) == 3
for msg in a:msg
NetrwKeepj call setline(line("$")+1,level.msg)
endfor
else
NetrwKeepj call setline(line("$"),level.a:msg)
endif
NetrwKeepj $
endif
" call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr(),'~'.expand("<slnum>"))
if &fo !~ '[ta]'
syn clear
syn match netrwMesgNote "^\*\*note\*\*"
syn match netrwMesgWarning "^\*\*warning\*\*"
syn match netrwMesgError "^\*\*error\*\*"
hi link netrwMesgWarning WarningMsg
hi link netrwMesgError Error
endif
" call Decho("setl noma ro bh=wipe",'~'.expand("<slnum>"))
setl ro nomod noma bh=wipe
" getting messages out reliably is just plain difficult!
" This attempt splits the current window, creating a one line window.
if bufexists("NetrwMessage") && bufwinnr("NetrwMessage") > 0
" call Decho("write to NetrwMessage buffer",'~'.expand("<slnum>"))
exe bufwinnr("NetrwMessage")."wincmd w"
" call Decho("setl ma noro",'~'.expand("<slnum>"))
setl ma noro
if type(a:msg) == 3
for msg in a:msg
NetrwKeepj call setline(line("$")+1,level.msg)
endfor
else
NetrwKeepj call setline(line("$")+1,level.a:msg)
endif
NetrwKeepj $
else
" call Decho("create a NetrwMessage buffer window",'~'.expand("<slnum>"))
bo 1split
sil! call s:NetrwEnew()
sil! NetrwKeepj call s:NetrwOptionsSafe(1)
setl bt=nofile
NetrwKeepj file NetrwMessage
" call Decho("setl ma noro",'~'.expand("<slnum>"))
setl ma noro
if type(a:msg) == 3
for msg in a:msg
NetrwKeepj call setline(line("$")+1,level.msg)
endfor
else
NetrwKeepj call setline(line("$"),level.a:msg)
endif
NetrwKeepj $
endif
" call Decho("wrote msg<".level.a:msg."> to NetrwMessage win#".winnr(),'~'.expand("<slnum>"))
if &fo !~ '[ta]'
syn clear
syn match netrwMesgNote "^\*\*note\*\*"
syn match netrwMesgWarning "^\*\*warning\*\*"
syn match netrwMesgError "^\*\*error\*\*"
hi link netrwMesgWarning WarningMsg
hi link netrwMesgError Error
endif
" call Decho("setl noma ro bh=wipe",'~'.expand("<slnum>"))
setl ro nomod noma bh=wipe
" (optional) netrw will show messages using echomsg. Even if the
" message doesn't appear, at least it'll be recallable via :messages
" redraw!
if a:level == s:WARNING
echohl WarningMsg
elseif a:level == s:ERROR
echohl Error
endif
else
" (optional) netrw will show messages using echomsg. Even if the
" message doesn't appear, at least it'll be recallable via :messages
" redraw!
if a:level == s:WARNING
echohl WarningMsg
elseif a:level == s:ERROR
echohl Error
if type(a:msg) == 3
for msg in a:msg
unsilent echomsg level.msg
endfor
else
unsilent echomsg level.a:msg
endif
echohl None
endif
if type(a:msg) == 3
for msg in a:msg
unsilent echomsg level.msg
endfor
else
unsilent echomsg level.a:msg
endif
" call Decho("echomsg ***netrw*** ".a:msg,'~'.expand("<slnum>"))
echohl None
endif
" call Dret("netrw#ErrorMsg")
endfun
endfunction
" ---------------------------------------------------------------------
" s:NetrwInit: initializes variables if they haven't been defined {{{2
@@ -523,11 +518,9 @@ call s:NetrwInit("g:netrw_sort_by" , "name") " alternatives: date
call s:NetrwInit("g:netrw_sort_options" , "")
call s:NetrwInit("g:netrw_sort_direction", "normal") " alternative: reverse (z y x ...)
if !exists("g:netrw_sort_sequence")
if has("unix")
let g:netrw_sort_sequence= '[\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$'
else
let g:netrw_sort_sequence= '[\/]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,\.swp$,\.bak$,\~$'
endif
let g:netrw_sort_sequence = !empty(&suffixes)
\ ? printf('[\/]$,*,\%(%s\)[*@]\=$', &suffixes->split(',')->map('escape(v:val, ".*$~")')->join('\|'))
\ : '[\/]$,*'
endif
call s:NetrwInit("g:netrw_special_syntax" , 0)
call s:NetrwInit("g:netrw_ssh_browse_reject", '^total\s\+\d\+$')
@@ -4893,7 +4886,7 @@ fun! s:NetrwBrowseUpDir(islocal)
endfun
" ---------------------------------------------------------------------
" netrw#BrowseX: (implements "x" and "gx") executes a special "viewer" script or program for the {{{2
" netrw#BrowseX: (implements "x") executes a special "viewer" script or program for the {{{2
" given filename; typically this means given their extension.
" 0=local, 1=remote
fun! netrw#BrowseX(fname,remote)
@@ -4995,17 +4988,6 @@ fun! netrw#BrowseX(fname,remote)
let &aw= awkeep
endfun
" ---------------------------------------------------------------------
" netrw#BrowseXVis: used by gx in visual mode to select a file for browsing {{{2
fun! netrw#BrowseXVis()
let dict={}
let dict.a=[getreg('a'), getregtype('a')]
norm! gv"ay
let gxfile= @a
call s:RestoreRegister(dict)
call netrw#BrowseX(gxfile,netrw#CheckIfRemote(gxfile))
endfun
" ---------------------------------------------------------------------
" s:NetrwBufRename: renames a buffer without the side effect of retaining an unlisted buffer having the old name {{{2
" Using the file command on a "[No Name]" buffer does not seem to cause the old "[No Name]" buffer
@@ -5315,30 +5297,32 @@ endfun
" ---------------------------------------------------------------------
" s:NetrwHome: this function determines a "home" for saving bookmarks and history {{{2
function! s:NetrwHome()
if has('nvim')
let home = netrw#own#JoinPath(stdpath('state'), 'netrw')
elseif exists("g:netrw_home")
let home = expand(g:netrw_home)
else
let home = expand("$MYVIMDIR")->substitute("/$", "", "")
endif
" insure that the home directory exists
if g:netrw_dirhistmax > 0 && !isdirectory(s:NetrwFile(home))
if exists("g:netrw_mkdir")
call system(g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home)))
if has('nvim')
let home = netrw#own#PathJoin(stdpath('state'), 'netrw')
elseif exists('g:netrw_home')
let home = expand(g:netrw_home)
elseif exists('$MYVIMDIR')
let home = expand('$MYVIMDIR')->substitute('/$', '', '')
else
call mkdir(home)
let home = netrw#own#PathJoin(expand('~'), '.vim')
endif
endif
" Normalize directory if on Windows
if has("win32")
let home = substitute(home, '/', '\\', 'g')
endif
" insure that the home directory exists
if g:netrw_dirhistmax > 0 && !isdirectory(s:NetrwFile(home))
if exists("g:netrw_mkdir")
call system(g:netrw_mkdir." ".s:ShellEscape(s:NetrwFile(home)))
else
call mkdir(home)
endif
endif
let g:netrw_home = home
return home
" Normalize directory if on Windows
if has("win32")
let home = substitute(home, '/', '\\', 'g')
endif
let g:netrw_home = home
return home
endfunction
" ---------------------------------------------------------------------
@@ -6350,7 +6334,7 @@ fun! s:NetrwMarkFileCopy(islocal,...)
endif
" copy marked files while within the same directory (ie. allow renaming)
if s:StripTrailingSlash(simplify(s:netrwmftgt)) == s:StripTrailingSlash(simplify(b:netrw_curdir))
if simplify(s:netrwmftgt) ==# simplify(b:netrw_curdir)
if len(s:netrwmarkfilelist_{bufnr('%')}) == 1
" only one marked file
" call Decho("case: only one marked file",'~'.expand("<slnum>"))
@@ -10237,131 +10221,124 @@ endfun
" ---------------------------------------------------------------------
" s:NetrwLocalRm: {{{2
fun! s:NetrwLocalRm(path) range
if !exists("w:netrw_bannercnt")
let w:netrw_bannercnt= b:netrw_bannercnt
endif
function! s:NetrwLocalRm(path) range
if !exists("w:netrw_bannercnt")
let w:netrw_bannercnt = b:netrw_bannercnt
endif
" preparation for removing multiple files/directories
let ykeep = @@
let ret = 0
let all = 0
let svpos = winsaveview()
" preparation for removing multiple files/directories
let ykeep = @@
let ret = 0
let all = 0
let svpos = winsaveview()
if exists("s:netrwmarkfilelist_{bufnr('%')}")
" remove all marked files
for fname in s:netrwmarkfilelist_{bufnr("%")}
let ok= s:NetrwLocalRmFile(a:path,fname,all)
if ok =~# 'q\%[uit]' || ok == "no"
break
elseif ok =~# '^a\%[ll]$'
let all= 1
endif
endfor
call s:NetrwUnMarkFile(1)
if exists("s:netrwmarkfilelist_{bufnr('%')}")
" remove all marked files
for fname in s:netrwmarkfilelist_{bufnr("%")}
let ok = s:NetrwLocalRmFile(a:path, fname, all)
if ok =~# '^a\%[ll]$'
let all = 1
elseif ok =~# "n\%[o]"
break
endif
endfor
call s:NetrwUnMarkFile(1)
else
" remove (multiple) files and directories
else
" remove (multiple) files and directories
let keepsol= &l:sol
setl nosol
let ctr = a:firstline
while ctr <= a:lastline
exe "NetrwKeepj ".ctr
let keepsol = &l:sol
setl nosol
let ctr = a:firstline
while ctr <= a:lastline
exe "NetrwKeepj ".ctr
" sanity checks
if line(".") < w:netrw_bannercnt
let ctr= ctr + 1
continue
endif
let curword= s:NetrwGetWord()
if curword == "./" || curword == "../"
let ctr= ctr + 1
continue
endif
let ok= s:NetrwLocalRmFile(a:path,curword,all)
if ok =~# 'q\%[uit]' || ok == "no"
break
elseif ok =~# '^a\%[ll]$'
let all= 1
endif
let ctr= ctr + 1
endwhile
let &l:sol= keepsol
endif
" sanity checks
if line(".") < w:netrw_bannercnt
let ctr = ctr + 1
continue
endif
" refresh the directory
if bufname("%") != "NetrwMessage"
NetrwKeepj call s:NetrwRefresh(1,s:NetrwBrowseChgDir(1,'./',0))
NetrwKeepj call winrestview(svpos)
endif
let @@= ykeep
endfun
let curword = s:NetrwGetWord()
if curword == "./" || curword == "../"
let ctr = ctr + 1
continue
endif
let ok = s:NetrwLocalRmFile(a:path, curword, all)
if ok =~# '^a\%[ll]$'
let all = 1
elseif ok =~# "n\%[o]"
break
endif
let ctr = ctr + 1
endwhile
let &l:sol = keepsol
endif
" refresh the directory
if bufname("%") != "NetrwMessage"
NetrwKeepj call s:NetrwRefresh(1, s:NetrwBrowseChgDir(1, './', 0))
NetrwKeepj call winrestview(svpos)
endif
let @@= ykeep
endfunction
" ---------------------------------------------------------------------
" s:NetrwLocalRmFile: remove file fname given the path {{{2
" Give confirmation prompt unless all==1
fun! s:NetrwLocalRmFile(path,fname,all)
" call Dfunc("s:NetrwLocalRmFile(path<".a:path."> fname<".a:fname."> all=".a:all)
function! s:NetrwLocalRmFile(path, fname, all)
let all = a:all
let ok = ""
let dir = 0
NetrwKeepj norm! 0
let rmfile = s:NetrwFile(s:ComposePath(a:path, escape(a:fname, '\\')))->fnamemodify(':.')
let all= a:all
let ok = ""
NetrwKeepj norm! 0
let rmfile= s:NetrwFile(s:ComposePath(a:path,escape(a:fname, '\\')))
" call Decho("rmfile<".rmfile.">",'~'.expand("<slnum>"))
" if not a directory
if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$')
let msg = "Confirm deletion of file <%s> [{y(es)},n(o),a(ll)]: "
else
let msg = "Confirm *recursive* deletion of directory <%s> [{y(es)},n(o),a(ll)]: "
let dir = 1
endif
if rmfile !~ '^"' && (rmfile =~ '@$' || rmfile !~ '[\/]$')
" attempt to remove file
" call Decho("attempt to remove file<".rmfile.">",'~'.expand("<slnum>"))
" Ask confirmation
if !all
echohl Statement
call inputsave()
let ok= input("Confirm deletion of file <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
call inputrestore()
echohl NONE
if ok == ""
let ok="no"
endif
" call Decho("response: ok<".ok.">",'~'.expand("<slnum>"))
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
" call Decho("response: ok<".ok."> (after sub)",'~'.expand("<slnum>"))
if ok =~# '^a\%[ll]$'
let all= 1
endif
echohl Statement
call inputsave()
let ok = input(printf(msg, rmfile))
call inputrestore()
echohl NONE
if ok =~# '^a\%[ll]$' || ok =~# '^y\%[es]$'
let all = 1
else
let ok = 'no'
endif
endif
if all || ok =~# '^y\%[es]$' || ok == ""
let ret= s:NetrwDelete(rmfile)
" call Decho("errcode=".v:shell_error." ret=".ret,'~'.expand("<slnum>"))
if !dir && (all || empty(ok))
" This works because delete return 0 if successful
if s:NetrwDelete(rmfile)
call netrw#ErrorMsg(s:ERROR, printf("unable to delete <%s>!", rmfile), 103)
else
" Remove file only if there are no pending changes
execute printf('silent! bwipeout %s', rmfile)
endif
elseif dir && (all || empty(ok))
" Remove trailing /
let rmfile = substitute(rmfile, '[\/]$', '', 'e')
if delete(rmfile, "rf")
call netrw#ErrorMsg(s:ERROR, printf("unable to delete directory <%s>!", rmfile), 103)
endif
endif
else
" attempt to remove directory
if !all
echohl Statement
call inputsave()
let ok= input("Confirm *recursive* deletion of directory <".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
call inputrestore()
let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
if ok == ""
let ok="no"
endif
if ok =~# '^a\%[ll]$'
let all= 1
endif
endif
let rmfile= substitute(rmfile,'[\/]$','','e')
if all || ok =~# '^y\%[es]$' || ok == ""
if delete(rmfile,"rf")
call netrw#ErrorMsg(s:ERROR,"unable to delete directory <".rmfile.">!",103)
endif
endif
endif
" call Dret("s:NetrwLocalRmFile ".ok)
return ok
endfun
return ok
endfunction
" =====================================================================
" Support Functions: {{{1
@@ -10483,13 +10460,6 @@ fun! netrw#WinPath(path)
return path
endfun
" ---------------------------------------------------------------------
" s:StripTrailingSlash: removes trailing slashes from a path {{{2
fun! s:StripTrailingSlash(path)
" remove trailing slash
return substitute(a:path, '[/\\]$', '', 'g')
endfun
" ---------------------------------------------------------------------
" s:NetrwBadd: adds marked files to buffer list or vice versa {{{2
" cb : bl2mf=0 add marked files to buffer list
@@ -10611,9 +10581,9 @@ fun! s:FileReadable(fname)
" call Dfunc("s:FileReadable(fname<".a:fname.">)")
if g:netrw_cygwin
let ret= filereadable(s:NetrwFile(substitute(a:fname,g:netrw_cygdrive.'/\(.\)','\1:/','')))
let ret = filereadable(s:NetrwFile(substitute(a:fname,g:netrw_cygdrive.'/\(.\)','\1:/','')))
else
let ret= filereadable(s:NetrwFile(a:fname))
let ret = filereadable(s:NetrwFile(a:fname))
endif
" call Dret("s:FileReadable ".ret)
@@ -10872,31 +10842,24 @@ endfun
" Uses Steve Hall's idea to insure that Windows paths stay
" acceptable. No effect on Unix paths.
" Examples of use: let result= s:NetrwDelete(path)
fun! s:NetrwDelete(path)
" call Dfunc("s:NetrwDelete(path<".a:path.">)")
function! s:NetrwDelete(path)
let path = netrw#WinPath(a:path)
let path = netrw#WinPath(a:path)
if !g:netrw_cygwin && has("win32")
if exists("+shellslash")
let sskeep= &shellslash
setl noshellslash
let result = delete(path)
let &shellslash = sskeep
if !g:netrw_cygwin && has("win32") && exists("+shellslash")
let sskeep = &shellslash
setl noshellslash
let result = delete(path)
let &shellslash = sskeep
else
" call Decho("exe let result= ".a:cmd."('".path."')",'~'.expand("<slnum>"))
let result= delete(path)
let result = delete(path)
endif
else
" call Decho("let result= delete(".path.")",'~'.expand("<slnum>"))
let result= delete(path)
endif
if result < 0
NetrwKeepj call netrw#ErrorMsg(s:WARNING,"delete(".path.") failed!",71)
endif
" call Dret("s:NetrwDelete ".result)
return result
endfun
if result < 0
NetrwKeepj call netrw#ErrorMsg(s:WARNING, "delete(".path.") failed!", 71)
endif
return result
endfunction
" ---------------------------------------------------------------------
" s:NetrwBufRemover: removes a buffer that: {{{2s
@@ -11650,7 +11613,7 @@ fun! s:UserMaps(islocal,funcname)
endif
endfun
" Deprecated: {{{
" Deprecated: {{{1
function! netrw#Launch(args)
call netrw#own#Deprecate('netrw#Launch', 'v180', {'vim': 'dist#vim9#Launch', 'nvim': 'vim.system'})
@@ -11665,14 +11628,11 @@ function! netrw#Open(file)
endfunction
" }}}
" ==========================
" Settings Restoration: {{{1
" ==========================
let &cpo= s:keepcpo
unlet s:keepcpo
" ===============
" Modelines: {{{1
" ===============
" }}}
" vim:ts=8 sts=4 sw=4 et fdm=marker
+17 -9
View File
@@ -2,12 +2,14 @@
" THIS FUNCTIONS DON'T COMMIT TO ANY BACKWARDS COMPATABILITY. SO CHANGES AND
" BREAKAGES IF USED OUTSIDE OF NETRW.VIM ARE EXPECTED.
" General: {{{
let s:deprecation_msgs = []
function! netrw#own#Deprecate(name, version, alternatives)
" If running on neovim use vim.deprecate
if has('nvim')
let s:alternative = a:alternatives->get('nvim', v:null)
call luaeval('vim.deprecate(unpack(_A)) and nil', [a:name, s:alternative, a:version, "netrw", v:false])
call v:lua.vim.deprecate(a:name, s:alternative, a:version, "netrw", v:false)
return
endif
@@ -27,8 +29,20 @@ function! netrw#own#Deprecate(name, version, alternatives)
call add(s:deprecation_msgs, a:name)
endfunction
function! netrw#own#Open(file) abort
if has('nvim')
call luaeval('vim.ui.open(_A[1]) and nil', [a:file])
else
call dist#vim9#Open(a:file)
endif
endfunction
" }}}
" Path Utilities: {{{
let s:slash = &shellslash ? '/' : '\'
function! netrw#own#JoinPath(...)
function! netrw#own#PathJoin(...)
let path = ""
for arg in a:000
@@ -42,12 +56,6 @@ function! netrw#own#JoinPath(...)
return path
endfunction
function! netrw#own#Open(file) abort
if has('nvim')
call luaeval('vim.ui.open(_A[1]) and nil', [a:file])
else
call dist#vim9#Open(a:file)
endif
endfunction
" }}}
" vim:ts=8 sts=4 sw=4 et fdm=marker
+1 -1
View File
@@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwSettings")
finish
endif
let g:loaded_netrwSettings = "v176"
let g:loaded_netrwSettings = "v177"
" NetrwSettings: {{{
+1 -1
View File
@@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwPlugin")
finish
endif
let g:loaded_netrwPlugin = "v176"
let g:loaded_netrwPlugin = "v177"
let s:keepcpo = &cpo
set cpo&vim
+21 -24
View File
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Feb 13
" Last Change: 2025 Feb 16
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -199,7 +199,6 @@ syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimC
syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
syn case match
" All vimCommands are contained by vimIsCommand. {{{2
@@ -360,7 +359,7 @@ syn match vim9LambdaOperatorComment contained "#.*" skipwhite skipempty nextgrou
syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncScope,vimFuncSID,Tag
syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncScope,vimFuncSID,Tag
syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimInsert,vimConst,vimLet,vimSearch
syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Block,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9LhsVariable,vim9LhsVariableList,vim9LhsRegister,vim9Search,@vimSpecialVar
@@ -630,7 +629,10 @@ syn match vimCommentError contained +".*+
syn match vimEnvvar "\$\I\i*"
syn match vimEnvvar "\${\I\i*}"
" In-String Specials: {{{2
" Strings {{{2
" =======
" In-String Specials:
" Try to catch strings, if nothing else matches (therefore it must precede the others!)
" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside [])
syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1
@@ -643,8 +645,6 @@ syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPat
syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend
syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend
"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont
syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
syn match vimEscape contained "\\."
" syn match vimEscape contained +\\[befnrt\"]+
@@ -685,9 +685,6 @@ syn match vimSubstFlags contained "[&cegiIlnpr#]\+"
syn match vimSubstDelim contained "\\"
syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4
" 'String': {{{2
syn match vimString "[^(,]'[^']\{-}\zs'"
" Marks, Registers, Addresses, Filters: {{{2
syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
syn match vimMark "'[[\]{}()<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
@@ -875,22 +872,22 @@ syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
" ======================
syn case ignore
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
syn match vimNotation '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
syn match vimNotation '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
syn match vimNotation contained '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
syn match vimNotation contained '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
syn match vimBracket contained "[\\<>]"
syn case match
@@ -916,7 +913,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
endif
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=@vimExprList,vimNotation
syn match vimNotFunc "\%#=1\<\%(if\|el\%[seif]\|retu\%[rn]\|while\)\>" skipwhite nextgroup=@vimExprList,vimNotation
" Match: {{{2
" =====
@@ -1,20 +1,20 @@
>"+0#0000e05#ffffff0| |K|e|y| |n|o|t|a|t|i|o|n| +0#0000000&@60
@75
|<+0#e000e06&|S|p|a|c|e|>| +0#0000000&@67
|<+0#e000e06&|T|a|b|>| +0#0000000&@69
|<+0#e000e06&|T|a|b|>| +0#0000000&@69
|<+0#e000e06&|N|L|>| +0#0000000&@70
|<+0#e000e06&|N|e|w|L|i|n|e|>| +0#0000000&@65
|<+0#e000e06&|L|i|n|e|F|e@1|d|>| +0#0000000&@64
|<+0#e000e06&|L|F|>| +0#0000000&@70
|<+0#e000e06&|C|R|>| +0#0000000&@70
|<+0#e000e06&|R|e|t|u|r|n|>| +0#0000000&@66
|<+0#e000e06&|E|n|t|e|r|>| +0#0000000&@67
|<+0#e000e06&|B|S|>| +0#0000000&@70
|<+0#e000e06&|B|a|c|k|S|p|a|c|e|>| +0#0000000&@63
|<+0#e000e06&|E|s|c|>| +0#0000000&@69
|<+0#e000e06&|C|S|I|>| +0#0000000&@69
|<+0#e000e06&|x|C|S|I|>| +0#0000000&@68
|<+0#e000e06&|B|a|r|>| +0#0000000&@69
|<+0#e000e06&|B|s|l|a|s|h|>| +0#0000000&@66
|m+0#af5f00255&|a|p| +0#0000000&|f|o@1| @67
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|p|a|c|e|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|T|a|b|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|T|a|b|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|N|L|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|N|e|w|L|i|n|e|>| +0#0000000&@57
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|i|n|e|F|e@1|d|>| +0#0000000&@56
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|F|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|R|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|e|t|u|r|n|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|E|n|t|e|r|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|S|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|a|c|k|S|p|a|c|e|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|E|s|c|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|S|I|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|C|S|I|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|a|r|>| +0#0000000&@61
@57|1|,|1| @10|T|o|p|
@@ -1,20 +1,20 @@
|<+0#e000e06#ffffff0|B|a|c|k|S|p|a|c|e|>| +0#0000000&@63
|<+0#e000e06&|E|s|c|>| +0#0000000&@69
|<+0#e000e06&|C|S|I|>| +0#0000000&@69
|<+0#e000e06&|x|C|S|I|>| +0#0000000&@68
|<+0#e000e06&|B|a|r|>| +0#0000000&@69
><+0#e000e06&|B|s|l|a|s|h|>| +0#0000000&@66
|<+0#e000e06&|D|e|l|>| +0#0000000&@69
|<+0#e000e06&|D|e|l|e|t|e|>| +0#0000000&@66
|<+0#e000e06&|k|D|e|l|>| +0#0000000&@68
|<+0#e000e06&|U|p|>| +0#0000000&@70
|<+0#e000e06&|D|o|w|n|>| +0#0000000&@68
|<+0#e000e06&|L|e|f|t|>| +0#0000000&@68
|<+0#e000e06&|R|i|g|h|t|>| +0#0000000&@67
|<+0#e000e06&|x|U|p|>| +0#0000000&@69
|<+0#e000e06&|x|D|o|w|n|>| +0#0000000&@67
|<+0#e000e06&|x|L|e|f|t|>| +0#0000000&@67
|<+0#e000e06&|x|R|i|g|h|t|>| +0#0000000&@66
|<+0#e000e06&|P|a|s|t|e|S|t|a|r|t|>| +0#0000000&@62
|<+0#e000e06&|P|a|s|t|e|E|n|d|>| +0#0000000&@64
@57|1|9|,|1| @10|9|%|
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|S|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|a|c|k|S|p|a|c|e|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|E|s|c|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|S|I|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|C|S|I|>| +0#0000000&@60
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|a|r|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|B|s|l|a|s|h|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|e|l|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|e|l|e|t|e|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|D|e|l|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|U|p|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|o|w|n|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|i|g|h|t|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|U|p|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|D|o|w|n|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|L|e|f|t|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|R|i|g|h|t|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|s|t|e|S|t|a|r|t|>| +0#0000000&@54
@57|1|9|,|7| @10|8|%|
@@ -1,20 +1,20 @@
|<+0#e000e06#ffffff0|P|a|s|t|e|E|n|d|>| +0#0000000&@64
|<+0#e000e06&|F|1|>| +0#0000000&@70
|<+0#e000e06&|F|2|>| +0#0000000&@70
|<+0#e000e06&|F|3|>| +0#0000000&@70
|<+0#e000e06&|F|4|>| +0#0000000&@70
><+0#e000e06&|F|5|>| +0#0000000&@70
|<+0#e000e06&|F|6|>| +0#0000000&@70
|<+0#e000e06&|F|7|>| +0#0000000&@70
|<+0#e000e06&|F|8|>| +0#0000000&@70
|<+0#e000e06&|F|9|>| +0#0000000&@70
|<+0#e000e06&|F|1|0|>| +0#0000000&@69
|<+0#e000e06&|F|1@1|>| +0#0000000&@69
|<+0#e000e06&|F|1|2|>| +0#0000000&@69
|<+0#e000e06&|F|1|3|>| +0#0000000&@69
|<+0#e000e06&|F|1|4|>| +0#0000000&@69
|<+0#e000e06&|F|1|5|>| +0#0000000&@69
|<+0#e000e06&|F|1|6|>| +0#0000000&@69
|<+0#e000e06&|F|1|7|>| +0#0000000&@69
|<+0#e000e06&|F|1|8|>| +0#0000000&@69
@57|3|7|,|1| @9|2|1|%|
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|s|t|e|S|t|a|r|t|>| +0#0000000&@54
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|s|t|e|E|n|d|>| +0#0000000&@56
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|>| +0#0000000&@62
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|4|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|5|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|6|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|7|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|8|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|9|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|0|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1@1|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|2|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|3|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|4|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|5|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|6|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|7|>| +0#0000000&@61
@57|3|7|,|7| @9|2|1|%|
@@ -1,20 +1,20 @@
|<+0#e000e06#ffffff0|F|1|8|>| +0#0000000&@69
|<+0#e000e06&|F|1|9|>| +0#0000000&@69
|<+0#e000e06&|F|2|0|>| +0#0000000&@69
|<+0#e000e06&|F|2|1|>| +0#0000000&@69
|<+0#e000e06&|F|2@1|>| +0#0000000&@69
><+0#e000e06&|F|2|3|>| +0#0000000&@69
|<+0#e000e06&|F|2|4|>| +0#0000000&@69
|<+0#e000e06&|F|2|5|>| +0#0000000&@69
|<+0#e000e06&|F|2|6|>| +0#0000000&@69
|<+0#e000e06&|F|2|7|>| +0#0000000&@69
|<+0#e000e06&|F|2|8|>| +0#0000000&@69
|<+0#e000e06&|F|2|9|>| +0#0000000&@69
|<+0#e000e06&|F|3|0|>| +0#0000000&@69
|<+0#e000e06&|F|3|1|>| +0#0000000&@69
|<+0#e000e06&|F|3|2|>| +0#0000000&@69
|<+0#e000e06&|F|3@1|>| +0#0000000&@69
|<+0#e000e06&|F|3|4|>| +0#0000000&@69
|<+0#e000e06&|F|3|5|>| +0#0000000&@69
|<+0#e000e06&|F|3|6|>| +0#0000000&@69
@57|5@1|,|1| @9|3|4|%|
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|7|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|8|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|1|9|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|0|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|1|>| +0#0000000&@61
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2@1|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|3|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|4|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|5|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|6|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|7|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|8|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|2|9|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|0|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|1|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|2|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3@1|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|4|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|5|>| +0#0000000&@61
@57|5@1|,|7| @9|3@1|%|
@@ -1,20 +1,20 @@
|<+0#e000e06#ffffff0|F|3|6|>| +0#0000000&@69
|<+0#e000e06&|F|3|7|>| +0#0000000&@69
|<+0#e000e06&|x|F|1|>| +0#0000000&@69
|<+0#e000e06&|x|F|2|>| +0#0000000&@69
|<+0#e000e06&|x|F|3|>| +0#0000000&@69
><+0#e000e06&|x|F|4|>| +0#0000000&@69
|<+0#e000e06&|H|e|l|p|>| +0#0000000&@68
|<+0#e000e06&|U|n|d|o|>| +0#0000000&@68
|<+0#e000e06&|I|n|s|e|r|t|>| +0#0000000&@66
|<+0#e000e06&|I|n|s|>| +0#0000000&@69
|<+0#e000e06&|k|I|n|s|e|r|t|>| +0#0000000&@65
|<+0#e000e06&|H|o|m|e|>| +0#0000000&@68
|<+0#e000e06&|k|H|o|m|e|>| +0#0000000&@67
|<+0#e000e06&|x|H|o|m|e|>| +0#0000000&@67
|<+0#e000e06&|z|H|o|m|e|>| +0#0000000&@67
|<+0#e000e06&|E|n|d|>| +0#0000000&@69
|<+0#e000e06&|k|E|n|d|>| +0#0000000&@68
|<+0#e000e06&|x|E|n|d|>| +0#0000000&@68
|<+0#e000e06&|z|E|n|d|>| +0#0000000&@68
@57|7|3|,|1| @9|4|6|%|
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|5|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|6|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|3|7|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|F|1|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|F|2|>| +0#0000000&@61
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|F|3|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|F|4|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|H|e|l|p|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|U|n|d|o|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|I|n|s|e|r|t|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|I|n|s|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|I|n|s|e|r|t|>| +0#0000000&@57
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|H|o|m|e|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|H|o|m|e|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|H|o|m|e|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|z|H|o|m|e|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|E|n|d|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|E|n|d|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|E|n|d|>| +0#0000000&@60
@57|7|3|,|7| @9|4|5|%|
@@ -1,20 +1,20 @@
|<+0#e000e06#ffffff0|z|E|n|d|>| +0#0000000&@68
|<+0#e000e06&|P|a|g|e|U|p|>| +0#0000000&@66
|<+0#e000e06&|P|a|g|e|D|o|w|n|>| +0#0000000&@64
|<+0#e000e06&|k|P|a|g|e|U|p|>| +0#0000000&@65
|<+0#e000e06&|k|P|a|g|e|D|o|w|n|>| +0#0000000&@63
><+0#e000e06&|k|P|l|u|s|>| +0#0000000&@67
|<+0#e000e06&|k|M|i|n|u|s|>| +0#0000000&@66
|<+0#e000e06&|k|D|i|v|i|d|e|>| +0#0000000&@65
|<+0#e000e06&|k|M|u|l|t|i|p|l|y|>| +0#0000000&@63
|<+0#e000e06&|k|E|n|t|e|r|>| +0#0000000&@66
|<+0#e000e06&|k|P|o|i|n|t|>| +0#0000000&@66
|<+0#e000e06&|k|0|>| +0#0000000&@70
|<+0#e000e06&|k|1|>| +0#0000000&@70
|<+0#e000e06&|k|2|>| +0#0000000&@70
|<+0#e000e06&|k|3|>| +0#0000000&@70
|<+0#e000e06&|k|4|>| +0#0000000&@70
|<+0#e000e06&|k|5|>| +0#0000000&@70
|<+0#e000e06&|k|6|>| +0#0000000&@70
|<+0#e000e06&|k|7|>| +0#0000000&@70
@57|9|1|,|1| @9|5|9|%|
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|x|E|n|d|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|z|E|n|d|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|g|e|U|p|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|a|g|e|D|o|w|n|>| +0#0000000&@56
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|P|a|g|e|U|p|>| +0#0000000&@57
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|P|a|g|e|D|o|w|n|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|P|l|u|s|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|M|i|n|u|s|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|D|i|v|i|d|e|>| +0#0000000&@57
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|M|u|l|t|i|p|l|y|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|E|n|t|e|r|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|P|o|i|n|t|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|0|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|1|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|2|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|3|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|4|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|5|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|6|>| +0#0000000&@62
@57|9|1|,|7| @9|5|8|%|
@@ -1,20 +1,20 @@
|<+0#e000e06#ffffff0|k|7|>| +0#0000000&@70
|<+0#e000e06&|k|8|>| +0#0000000&@70
|<+0#e000e06&|k|9|>| +0#0000000&@70
|<+0#e000e06&|l|t|>| +0#0000000&@70
|<+0#e000e06&|M|o|u|s|e|>| +0#0000000&@67
><+0#e000e06&|N|e|t|M|o|u|s|e|>| +0#0000000&@64
|<+0#e000e06&|D|e|c|M|o|u|s|e|>| +0#0000000&@64
|<+0#e000e06&|J|s|b|M|o|u|s|e|>| +0#0000000&@64
|<+0#e000e06&|P|t|e|r|m|M|o|u|s|e|>| +0#0000000&@62
|<+0#e000e06&|U|r|x|v|t|M|o|u|s|e|>| +0#0000000&@62
|<+0#e000e06&|S|g|r|M|o|u|s|e|>| +0#0000000&@64
|<+0#e000e06&|S|g|r|M|o|u|s|e|R|e|l|e|a|s|e|>| +0#0000000&@57
|<+0#e000e06&|L|e|f|t|M|o|u|s|e|>| +0#0000000&@63
|<+0#e000e06&|L|e|f|t|M|o|u|s|e|N|M|>| +0#0000000&@61
|<+0#e000e06&|L|e|f|t|D|r|a|g|>| +0#0000000&@64
|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|>| +0#0000000&@61
|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|N|M|>| +0#0000000&@59
|<+0#e000e06&|M|o|u|s|e|M|o|v|e|>| +0#0000000&@63
|<+0#e000e06&|M|i|d@1|l|e|M|o|u|s|e|>| +0#0000000&@61
@57|1|0|9|,|1| @8|7|1|%|
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|6|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|7|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|8|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|k|9|>| +0#0000000&@62
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|l|t|>| +0#0000000&@62
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|N|e|t|M|o|u|s|e|>| +0#0000000&@56
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|e|c|M|o|u|s|e|>| +0#0000000&@56
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|J|s|b|M|o|u|s|e|>| +0#0000000&@56
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|t|e|r|m|M|o|u|s|e|>| +0#0000000&@54
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|U|r|x|v|t|M|o|u|s|e|>| +0#0000000&@54
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|g|r|M|o|u|s|e|>| +0#0000000&@56
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|g|r|M|o|u|s|e|R|e|l|e|a|s|e|>| +0#0000000&@49
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|M|o|u|s|e|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|M|o|u|s|e|N|M|>| +0#0000000&@53
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|D|r|a|g|>| +0#0000000&@56
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|>| +0#0000000&@53
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|L|e|f|t|R|e|l|e|a|s|e|N|M|>| +0#0000000&@51
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|M|o|v|e|>| +0#0000000&@55
@57|1|0|9|,|7| @8|7|0|%|
@@ -1,20 +1,20 @@
|<+0#e000e06#ffffff0|M|i|d@1|l|e|M|o|u|s|e|>| +0#0000000&@61
|<+0#e000e06&|M|i|d@1|l|e|D|r|a|g|>| +0#0000000&@62
|<+0#e000e06&|M|i|d@1|l|e|R|e|l|e|a|s|e|>| +0#0000000&@59
|<+0#e000e06&|R|i|g|h|t|M|o|u|s|e|>| +0#0000000&@62
|<+0#e000e06&|R|i|g|h|t|D|r|a|g|>| +0#0000000&@63
><+0#e000e06&|R|i|g|h|t|R|e|l|e|a|s|e|>| +0#0000000&@60
|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|U|p|>| +0#0000000&@59
|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|D|o|w|n|>| +0#0000000&@57
|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|R|i|g|h|t|>| +0#0000000&@56
|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|L|e|f|t|>| +0#0000000&@57
|<+0#e000e06&|M|o|u|s|e|D|o|w|n|>| +0#0000000&@63
|<+0#e000e06&|M|o|u|s|e|U|p|>| +0#0000000&@65
|<+0#e000e06&|X|1|M|o|u|s|e|>| +0#0000000&@65
|<+0#e000e06&|X|1|D|r|a|g|>| +0#0000000&@66
|<+0#e000e06&|X|1|R|e|l|e|a|s|e|>| +0#0000000&@63
|<+0#e000e06&|X|2|M|o|u|s|e|>| +0#0000000&@65
|<+0#e000e06&|X|2|D|r|a|g|>| +0#0000000&@66
|<+0#e000e06&|X|2|R|e|l|e|a|s|e|>| +0#0000000&@63
|<+0#e000e06&|D|r|o|p|>| +0#0000000&@68
@57|1|2|7|,|1| @8|8|4|%|
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|M|o|v|e|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|i|d@1|l|e|M|o|u|s|e|>| +0#0000000&@53
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|i|d@1|l|e|D|r|a|g|>| +0#0000000&@54
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|i|d@1|l|e|R|e|l|e|a|s|e|>| +0#0000000&@51
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|i|g|h|t|M|o|u|s|e|>| +0#0000000&@54
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|i|g|h|t|D|r|a|g|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|R|i|g|h|t|R|e|l|e|a|s|e|>| +0#0000000&@52
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|U|p|>| +0#0000000&@51
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|D|o|w|n|>| +0#0000000&@49
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|R|i|g|h|t|>| +0#0000000&@48
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|o|l@1|W|h|e@1|l|L|e|f|t|>| +0#0000000&@49
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|D|o|w|n|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|M|o|u|s|e|U|p|>| +0#0000000&@57
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|1|M|o|u|s|e|>| +0#0000000&@57
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|1|D|r|a|g|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|1|R|e|l|e|a|s|e|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|2|M|o|u|s|e|>| +0#0000000&@57
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|2|D|r|a|g|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|2|R|e|l|e|a|s|e|>| +0#0000000&@55
@57|1|2|7|,|7| @8|8|2|%|
@@ -1,20 +1,20 @@
|<+0#e000e06#ffffff0|D|r|o|p|>| +0#0000000&@68
|<+0#e000e06&|N|u|l|>| +0#0000000&@69
|<+0#e000e06&|S|N|R|>| +0#0000000&@69
|<+0#e000e06&|P|l|u|g|>| +0#0000000&@68
|<+0#e000e06&|C|u|r|s|o|r|H|o|l|d|>| +0#0000000&@62
><+0#e000e06&|I|g|n|o|r|e|>| +0#0000000&@66
|<+0#e000e06&|C|m|d|>| +0#0000000&@69
|<+0#e000e06&|S|c|r|i|p|t|C|m|d|>| +0#0000000&@63
|<+0#e000e06&|F|o|c|u|s|G|a|i|n|e|d|>| +0#0000000&@61
|<+0#e000e06&|F|o|c|u|s|L|o|s|t|>| +0#0000000&@63
@75
|<+0#e000e06&|c|w|o|r|d|>| +0#0000000&@67
|<+0#e000e06&|c|W|O|R|D|>| +0#0000000&@67
|<+0#e000e06&|c|e|x|p|r|>| +0#0000000&@67
|<+0#e000e06&|c|f|i|l|e|>| +0#0000000&@67
|<+0#e000e06&|a|f|i|l|e|>| +0#0000000&@67
|<+0#e000e06&|a|b|u|f|>| +0#0000000&@68
|<+0#e000e06&|a|m|a|t|c|h|>| +0#0000000&@66
|<+0#e000e06&|s|f|i|l|e|>| +0#0000000&@67
@57|1|4|5|,|1| @8|9|6|%|
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|X|2|R|e|l|e|a|s|e|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|D|r|o|p|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|N|u|l|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|N|R|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|P|l|u|g|>| +0#0000000&@60
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|u|r|s|o|r|H|o|l|d|>| +0#0000000&@54
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|I|g|n|o|r|e|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|C|m|d|>| +0#0000000&@61
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|S|c|r|i|p|t|C|m|d|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|o|c|u|s|G|a|i|n|e|d|>| +0#0000000&@53
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|F|o|c|u|s|L|o|s|t|>| +0#0000000&@55
@6|\+0#e000e06&| +0#0000000&@67
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|w|o|r|d|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|W|O|R|D|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|e|x|p|r|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|f|i|l|e|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|a|f|i|l|e|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|a|b|u|f|>| +0#0000000&@60
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|a|m|a|t|c|h|>| +0#0000000&@58
@57|1|4|5|,|7| @8|9|5|%|
@@ -1,9 +1,11 @@
|<+0#e000e06#ffffff0|s|f|i|l|e|>| +0#0000000&@67
|<+0#e000e06&|s|t|a|c|k|>| +0#0000000&@67
|<+0#e000e06&|s|c|r|i|p|t|>| +0#0000000&@66
|<+0#e000e06&|s|l|n|u|m|>| +0#0000000&@67
|<+0#e000e06&|s|f|l|n|u|m|>| +0#0000000&@66
><+0#e000e06&|c|l|i|e|n|t|>| +0#0000000&@66
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|<+0#e000e06&|a|m|a|t|c|h|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|f|i|l|e|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|t|a|c|k|>| +0#0000000&@59
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|c|r|i|p|t|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|l|n|u|m|>| +0#0000000&@59
@6>\+0#e000e06&| +0#0000000&|<+0#e000e06&|s|f|l|n|u|m|>| +0#0000000&@58
@6|\+0#e000e06&| +0#0000000&|<+0#e000e06&|c|l|i|e|n|t|>| +0#0000000&@58
@75
|~+0#4040ff13&| @73
|~| @73
|~| @73
@@ -15,6 +17,4 @@
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|1|6|3|,|1| @8|B|o|t|
| +0#0000000&@56|1|6|3|,|7| @8|B|o|t|
+162 -160
View File
@@ -1,163 +1,165 @@
" Key notation
<Space>
<Tab>
<Tab>
<NL>
<NewLine>
<LineFeed>
<LF>
<CR>
<Return>
<Enter>
<BS>
<BackSpace>
<Esc>
<CSI>
<xCSI>
<Bar>
<Bslash>
<Del>
<Delete>
<kDel>
<Up>
<Down>
<Left>
<Right>
<xUp>
<xDown>
<xLeft>
<xRight>
<PasteStart>
<PasteEnd>
<F1>
<F2>
<F3>
<F4>
<F5>
<F6>
<F7>
<F8>
<F9>
<F10>
<F11>
<F12>
<F13>
<F14>
<F15>
<F16>
<F17>
<F18>
<F19>
<F20>
<F21>
<F22>
<F23>
<F24>
<F25>
<F26>
<F27>
<F28>
<F29>
<F30>
<F31>
<F32>
<F33>
<F34>
<F35>
<F36>
<F37>
<xF1>
<xF2>
<xF3>
<xF4>
<Help>
<Undo>
<Insert>
<Ins>
<kInsert>
<Home>
<kHome>
<xHome>
<zHome>
<End>
<kEnd>
<xEnd>
<zEnd>
<PageUp>
<PageDown>
<kPageUp>
<kPageDown>
<kPlus>
<kMinus>
<kDivide>
<kMultiply>
<kEnter>
<kPoint>
<k0>
<k1>
<k2>
<k3>
<k4>
<k5>
<k6>
<k7>
<k8>
<k9>
<lt>
<Mouse>
<NetMouse>
<DecMouse>
<JsbMouse>
<PtermMouse>
<UrxvtMouse>
<SgrMouse>
<SgrMouseRelease>
<LeftMouse>
<LeftMouseNM>
<LeftDrag>
<LeftRelease>
<LeftReleaseNM>
<MouseMove>
<MiddleMouse>
<MiddleDrag>
<MiddleRelease>
<RightMouse>
<RightDrag>
<RightRelease>
<ScrollWheelUp>
<ScrollWheelDown>
<ScrollWheelRight>
<ScrollWheelLeft>
<MouseDown>
<MouseUp>
<X1Mouse>
<X1Drag>
<X1Release>
<X2Mouse>
<X2Drag>
<X2Release>
<Drop>
<Nul>
<SNR>
<Plug>
<CursorHold>
<Ignore>
<Cmd>
<ScriptCmd>
<FocusGained>
<FocusLost>
map foo
\ <Space>
\ <Tab>
\ <Tab>
\ <NL>
\ <NewLine>
\ <LineFeed>
\ <LF>
\ <CR>
\ <Return>
\ <Enter>
\ <BS>
\ <BackSpace>
\ <Esc>
\ <CSI>
\ <xCSI>
\ <Bar>
\ <Bslash>
\ <Del>
\ <Delete>
\ <kDel>
\ <Up>
\ <Down>
\ <Left>
\ <Right>
\ <xUp>
\ <xDown>
\ <xLeft>
\ <xRight>
\ <PasteStart>
\ <PasteEnd>
\ <F1>
\ <F2>
\ <F3>
\ <F4>
\ <F5>
\ <F6>
\ <F7>
\ <F8>
\ <F9>
\ <F10>
\ <F11>
\ <F12>
\ <F13>
\ <F14>
\ <F15>
\ <F16>
\ <F17>
\ <F18>
\ <F19>
\ <F20>
\ <F21>
\ <F22>
\ <F23>
\ <F24>
\ <F25>
\ <F26>
\ <F27>
\ <F28>
\ <F29>
\ <F30>
\ <F31>
\ <F32>
\ <F33>
\ <F34>
\ <F35>
\ <F36>
\ <F37>
\ <xF1>
\ <xF2>
\ <xF3>
\ <xF4>
\ <Help>
\ <Undo>
\ <Insert>
\ <Ins>
\ <kInsert>
\ <Home>
\ <kHome>
\ <xHome>
\ <zHome>
\ <End>
\ <kEnd>
\ <xEnd>
\ <zEnd>
\ <PageUp>
\ <PageDown>
\ <kPageUp>
\ <kPageDown>
\ <kPlus>
\ <kMinus>
\ <kDivide>
\ <kMultiply>
\ <kEnter>
\ <kPoint>
\ <k0>
\ <k1>
\ <k2>
\ <k3>
\ <k4>
\ <k5>
\ <k6>
\ <k7>
\ <k8>
\ <k9>
\ <lt>
\ <Mouse>
\ <NetMouse>
\ <DecMouse>
\ <JsbMouse>
\ <PtermMouse>
\ <UrxvtMouse>
\ <SgrMouse>
\ <SgrMouseRelease>
\ <LeftMouse>
\ <LeftMouseNM>
\ <LeftDrag>
\ <LeftRelease>
\ <LeftReleaseNM>
\ <MouseMove>
\ <MiddleMouse>
\ <MiddleDrag>
\ <MiddleRelease>
\ <RightMouse>
\ <RightDrag>
\ <RightRelease>
\ <ScrollWheelUp>
\ <ScrollWheelDown>
\ <ScrollWheelRight>
\ <ScrollWheelLeft>
\ <MouseDown>
\ <MouseUp>
\ <X1Mouse>
\ <X1Drag>
\ <X1Release>
\ <X2Mouse>
\ <X2Drag>
\ <X2Release>
\ <Drop>
\ <Nul>
\ <SNR>
\ <Plug>
\ <CursorHold>
\ <Ignore>
\ <Cmd>
\ <ScriptCmd>
\ <FocusGained>
\ <FocusLost>
\
\ <cword>
\ <cWORD>
\ <cexpr>
\ <cfile>
\ <afile>
\ <abuf>
\ <amatch>
\ <sfile>
\ <stack>
\ <script>
\ <slnum>
\ <sflnum>
\ <client>
<cword>
<cWORD>
<cexpr>
<cfile>
<afile>
<abuf>
<amatch>
<sfile>
<stack>
<script>
<slnum>
<sflnum>
<client>
+21 -24
View File
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" Last Change: 2025 Feb 13
" Last Change: 2025 Feb 16
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -237,7 +237,6 @@ syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimC
syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
syn case match
" All vimCommands are contained by vimIsCommand. {{{2
@@ -398,7 +397,7 @@ syn match vim9LambdaOperatorComment contained "#.*" skipwhite skipempty nextgrou
syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncScope,vimFuncSID,Tag
syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncScope,vimFuncSID,Tag
syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimInsert,vimConst,vimLet,vimSearch
syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Block,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9LhsVariable,vim9LhsVariableList,vim9LhsRegister,vim9Search,@vimSpecialVar
@@ -670,7 +669,10 @@ syn match vimCommentError contained +".*+
syn match vimEnvvar "\$\I\i*"
syn match vimEnvvar "\${\I\i*}"
" In-String Specials: {{{2
" Strings {{{2
" =======
" In-String Specials:
" Try to catch strings, if nothing else matches (therefore it must precede the others!)
" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside [])
syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1
@@ -683,8 +685,6 @@ syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPat
syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend
syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend
"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont
syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
syn match vimEscape contained "\\."
" syn match vimEscape contained +\\[befnrt\"]+
@@ -725,9 +725,6 @@ syn match vimSubstFlags contained "[&cegiIlnpr#]\+"
syn match vimSubstDelim contained "\\"
syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4
" 'String': {{{2
syn match vimString "[^(,]'[^']\{-}\zs'"
" Marks, Registers, Addresses, Filters: {{{2
syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
syn match vimMark "'[[\]{}()<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
@@ -921,22 +918,22 @@ syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
" ======================
syn case ignore
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
syn match vimNotation '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
syn match vimNotation '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
syn match vimNotation contained '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
syn match vimNotation contained '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
syn match vimBracket contained "[\\<>]"
syn case match
@@ -962,7 +959,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
endif
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=@vimExprList,vimNotation
syn match vimNotFunc "\%#=1\<\%(if\|el\%[seif]\|retu\%[rn]\|while\)\>" skipwhite nextgroup=@vimExprList,vimNotation
" Match: {{{2
" =====
+12 -11
View File
@@ -737,21 +737,22 @@ get_next_or_prev_match(int mode, expand_T *xp)
int findex = xp->xp_selected;
int ht;
// When no files found, return NULL
// When no matches found, return NULL
if (xp->xp_numfiles <= 0)
return NULL;
if (mode == WILD_PREV)
{
// Select last file if at start
// Select the last entry if at original text
if (findex == -1)
findex = xp->xp_numfiles;
// Otherwise select the previous entry
--findex;
}
else if (mode == WILD_NEXT)
{
// Select next file
findex = findex + 1;
// Select the next entry
++findex;
}
else // WILD_PAGEDOWN or WILD_PAGEUP
{
@@ -765,7 +766,7 @@ get_next_or_prev_match(int mode, expand_T *xp)
if (findex == 0)
// at the first entry, don't select any entries
findex = -1;
else if (findex == -1)
else if (findex < 0)
// no entry is selected. select the last entry
findex = xp->xp_numfiles - 1;
else
@@ -774,12 +775,12 @@ get_next_or_prev_match(int mode, expand_T *xp)
}
else // mode == WILD_PAGEDOWN
{
if (findex < 0)
// no entry is selected, select the first entry
findex = 0;
else if (findex >= xp->xp_numfiles - 1)
if (findex >= xp->xp_numfiles - 1)
// at the last entry, don't select any entries
findex = -1;
else if (findex < 0)
// no entry is selected, select the first entry
findex = 0;
else
// go down by the pum height
findex = MIN(findex + ht, xp->xp_numfiles - 1);
@@ -789,7 +790,7 @@ get_next_or_prev_match(int mode, expand_T *xp)
// Handle wrapping around
if (findex < 0 || findex >= xp->xp_numfiles)
{
// If original string exists, return to it when wrapping around
// If original text exists, return to it when wrapping around
if (xp->xp_orig != NULL)
findex = -1;
else
@@ -808,7 +809,7 @@ get_next_or_prev_match(int mode, expand_T *xp)
cmd_showtail);
xp->xp_selected = findex;
// Return the original string or the selected match
// Return the original text or the selected match
return vim_strsave(findex == -1 ? xp->xp_orig : xp->xp_files[findex]);
}
+2 -1
View File
@@ -3557,7 +3557,8 @@ EXTERN char e_type_can_only_be_defined_in_vim9_script[]
INIT(= N_("E1393: Type can only be defined in Vim9 script"));
EXTERN char e_type_name_must_start_with_uppercase_letter_str[]
INIT(= N_("E1394: Type name must start with an uppercase letter: %s"));
// E1395 unused
EXTERN char e_using_null_class[]
INIT(= N_("E1395: Using a null class"));
EXTERN char e_typealias_already_exists_for_str[]
INIT(= N_("E1396: Type alias \"%s\" already exists"));
EXTERN char e_missing_typealias_name[]
+509 -292
View File
File diff suppressed because it is too large Load Diff
+12
View File
@@ -1889,6 +1889,7 @@ ins_compl_clear(void)
compl_cont_status = 0;
compl_started = FALSE;
compl_matches = 0;
compl_selected_item = -1;
compl_ins_end_col = 0;
VIM_CLEAR_STRING(compl_pattern);
VIM_CLEAR_STRING(compl_leader);
@@ -2579,6 +2580,10 @@ ins_compl_prep(int c)
{
int retval = FALSE;
int prev_mode = ctrl_x_mode;
int handle_enter = FALSE;
if ((c == CAR || c == NL || c == K_KENTER) && compl_selected_item == -1)
handle_enter = TRUE;
// Forget any previous 'special' messages if this is actually
// a ^X mode key - bar ^R, in which case we wait to see what it gives us.
@@ -2680,7 +2685,14 @@ ins_compl_prep(int c)
if ((ctrl_x_mode_normal() && c != Ctrl_N && c != Ctrl_P
&& c != Ctrl_R && !ins_compl_pum_key(c))
|| ctrl_x_mode == CTRL_X_FINISHED)
{
retval = ins_compl_stop(c, prev_mode, retval);
// When it is the Enter key and no selected item, return false, and
// continue processing the Enter key to insert a new line in the
// edit function.
if (retval && handle_enter)
retval = FALSE;
}
}
else if (ctrl_x_mode == CTRL_X_LOCAL_MSG)
// Trigger the CompleteDone event to give scripts a chance to act
+2 -2
View File
@@ -1,5 +1,5 @@
/* findfile.c */
void *vim_findfile_init(char_u *path, char_u *filename, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname);
void *vim_findfile_init(char_u *path, char_u *filename, size_t filenamelen, char_u *stopdirs, int level, int free_visited, int find_what, void *search_ctx_arg, int tagfile, char_u *rel_fname);
char_u *vim_findfile_stopdir(char_u *buf);
void vim_findfile_cleanup(void *ctx);
char_u *vim_findfile(void *search_ctx_arg);
@@ -14,6 +14,6 @@ char_u *find_file_name_in_path(char_u *ptr, int len, int options, long count, ch
int vim_ispathlistsep(int c);
void uniquefy_paths(garray_T *gap, char_u *pattern, char_u *path_option);
int expand_in_path(garray_T *gap, char_u *pattern, int flags);
void simplify_filename(char_u *filename);
size_t simplify_filename(char_u *filename);
void f_simplify(typval_T *argvars, typval_T *rettv);
/* vim: set ft=c : */
+2 -1
View File
@@ -2420,7 +2420,8 @@ ex_display(exarg_T *eap)
#ifdef FEAT_EVAL
if (name == MB_TOLOWER(redir_reg)
|| (redir_reg == '"' && yb == y_previous))
|| (vim_strchr((char_u *)"\"*+", redir_reg) != NULL &&
(yb == y_previous || yb == &y_regs[0])))
continue; // do not list register being written to, the
// pointer can be freed
#endif
+1
View File
@@ -3421,6 +3421,7 @@ get_tagfname(
*filename++ = NUL;
tnp->tn_search_ctx = vim_findfile_init(buf, filename,
STRLEN(filename),
r_ptr, 100,
FALSE, // don't free visited list
FINDFILE_FILE, // we search for a file
+7 -1
View File
@@ -1667,10 +1667,12 @@ set_color_count(int nr)
sprintf((char *)nr_colors, "%d", t_colors);
else
*nr_colors = NUL;
#if 0
#ifdef FEAT_TERMGUICOLORS
// xterm-direct, enable termguicolors, when it wasn't set yet
if (t_colors == 0x1000000 && !p_tgc_set)
set_option_value((char_u *)"termguicolors", 1L, NULL, 0);
#endif
#endif
set_string_option_direct((char_u *)"t_Co", -1, nr_colors, OPT_FREE, 0);
}
@@ -1707,7 +1709,9 @@ static char *(key_names[]) =
# ifdef FEAT_TERMRESPONSE
// Do those ones first, both may cause a screen redraw.
"Co",
"RGB",
// disabled, because it switches termguicolors, but that
// is noticable and confuses users
// "RGB",
# endif
"ku", "kd", "kr", "kl",
"#2", "#4", "%i", "*7",
@@ -7203,6 +7207,7 @@ got_code_from_term(char_u *code, int len)
#endif
may_adjust_color_count(val);
}
#if 0
#ifdef FEAT_TERMGUICOLORS
// when RGB result comes back, it is supported when the result contains an '='
else if (name[0] == 'R' && name[1] == 'G' && name[2] == 'B' && code[9] == '=')
@@ -7219,6 +7224,7 @@ got_code_from_term(char_u *code, int len)
set_option_value((char_u *)"termguicolors", 1L, NULL, 0);
}
}
#endif
#endif
else
{
+14 -3
View File
@@ -198,7 +198,7 @@ func Test_edit_07()
endif
endfu
au InsertCharPre <buffer> :call DoIt()
call feedkeys("A\<f5>\<c-p>u\<cr>\<c-l>\<cr>", 'tx')
call feedkeys("A\<f5>\<c-p>u\<C-Y>\<c-l>\<cr>", 'tx')
call assert_equal(["Jan\<c-l>",''], 1->getline('$'))
%d
call setline(1, 'J')
@@ -594,7 +594,7 @@ func Test_edit_CTRL_I()
call assert_equal([include, 'two', ''], getline(1, '$'))
call feedkeys("2ggC\<c-x>\<tab>\<down>\<down>\<cr>\<esc>", 'tnix')
call assert_equal([include, 'three', ''], getline(1, '$'))
call feedkeys("2ggC\<c-x>\<tab>\<down>\<down>\<down>\<cr>\<esc>", 'tnix')
call feedkeys("2ggC\<c-x>\<tab>\<down>\<down>\<down>\<C-y>\<esc>", 'tnix')
call assert_equal([include, '', ''], getline(1, '$'))
bw!
endfunc
@@ -622,7 +622,7 @@ func Test_edit_CTRL_K()
%d
call setline(1, 'A')
call cursor(1, 1)
call feedkeys("A\<c-x>\<c-k>\<down>\<down>\<down>\<cr>\<esc>", 'tnix')
call feedkeys("A\<c-x>\<c-k>\<down>\<down>\<down>\<C-Y>\<esc>", 'tnix')
call assert_equal(['A'], getline(1, '$'))
%d
call setline(1, 'A')
@@ -2296,4 +2296,15 @@ func Test_edit_backspace_smarttab_virtual_text()
set smarttab&
endfunc
func Test_edit_CAR()
set cot=menu,menuone,noselect
new
call feedkeys("Shello hero\<CR>h\<C-x>\<C-N>e\<CR>", 'tx')
call assert_equal(['hello hero', 'he', ''], getline(1, '$'))
bw!
set cot&
endfunc
" vim: shiftwidth=2 sts=2 expandtab
+1 -1
View File
@@ -2855,7 +2855,7 @@ func Test_complete_fuzzy_match()
call setline(1, ['Text', 'ToText', ''])
call cursor(3, 1)
call feedkeys("STe\<C-X>\<C-N>x\<CR>\<Esc>0", 'tx!')
call assert_equal('Tex', getline('.'))
call assert_equal('Tex', getline(line('.') - 1))
" test case for nosort option
set cot=menuone,menu,noinsert,fuzzy,nosort
+2 -2
View File
@@ -992,7 +992,7 @@ func Test_popup_complete_backwards()
call setline(1, ['Post', 'Port', 'Po'])
let expected=['Post', 'Port', 'Port']
call cursor(3,2)
call feedkeys("A\<C-X>". repeat("\<C-P>", 3). "rt\<cr>", 'tx')
call feedkeys("A\<C-X>". repeat("\<C-P>", 3). "rt\<C-Y>", 'tx')
call assert_equal(expected, getline(1,'$'))
bwipe!
endfunc
@@ -1002,7 +1002,7 @@ func Test_popup_complete_backwards_ctrl_p()
call setline(1, ['Post', 'Port', 'Po'])
let expected=['Post', 'Port', 'Port']
call cursor(3,2)
call feedkeys("A\<C-P>\<C-N>rt\<cr>", 'tx')
call feedkeys("A\<C-P>\<C-N>rt\<C-Y>", 'tx')
call assert_equal(expected, getline(1,'$'))
bwipe!
endfunc
+21
View File
@@ -1102,4 +1102,25 @@ func Test_clipboard_regs_not_working2()
let $DISPLAY=display
endfunc
" This caused use-after-free
func Test_register_redir_display()
CheckFeature clipboard
" don't touch the clipboard, so only perform this, when the clipboard is not working
if has("clipboard_working")
throw "Skipped: skip touching the clipboard register!"
endif
let @"=''
redir @+>
disp +"
redir END
call assert_equal("\nType Name Content", getreg('+'))
let a = [getreg('1'), getregtype('1')]
let @1='register 1'
redir @+
disp 1
redir END
call assert_equal("register 1", getreg('1'))
call setreg(1, a[0], a[1])
endfunc
" vim: shiftwidth=2 sts=2 expandtab
+2 -2
View File
@@ -2750,7 +2750,7 @@ func Test_terminal_builtin_without_gui()
CheckNotMSWindows
" builtin_gui should not be output by :set term=xxx
let output = systemlist("TERM=dumb " .. v:progpath .. " --clean -c ':set t_ti= t_te=' -c 'set term=xxx' -c ':q!'")
let output = systemlist("TERM=dumb " .. v:progpath .. " --not-a-term --clean -c ':set t_ti= t_te=' -c 'set term=xxx' -c ':q!'")
redraw!
call map(output, {_, val -> trim(val)})
call assert_equal(-1, index(output, 'builtin_gui'))
@@ -2775,7 +2775,7 @@ func Test_xterm_direct_enables_termguicolors()
let result=readfile('XTerm-direct.txt')
" call assert_equal(['', 'TERM: xterm-direct', 'Colors: ' .. colors, 'Termguicolors: 1'], result)
call assert_equal(['', 'TERM: xterm-direct', 'Termguicolors: 1'], result)
call assert_equal(['', 'TERM: xterm-direct', 'Termguicolors: 0'], result)
" cleanup
bw!
close
+159 -87
View File
@@ -544,7 +544,7 @@ def Test_using_null_class()
var lines =<< trim END
@_ = null_class.member
END
v9.CheckDefExecAndScriptFailure(lines, ['E715: Dictionary required', 'E1363: Incomplete type'])
v9.CheckDefExecAndScriptFailure(lines, ['E1395: Using a null class', 'E1363: Incomplete type'])
# Test for using a null class as a value
lines =<< trim END
@@ -3059,27 +3059,6 @@ def Test_class_extends()
END
v9.CheckSourceFailure(lines, 'E1354: Cannot extend SomeVar', 5)
lines =<< trim END
vim9script
class Base
var name: string
def ToString(): string
return this.name
enddef
endclass
class Child extends Base
var age: number
def ToString(): string
return super.ToString() .. ': ' .. this.age
enddef
endclass
var o = Child.new('John', 42)
assert_equal('John: 42', o.ToString())
END
v9.CheckSourceSuccess(lines)
lines =<< trim END
vim9script
class Child
@@ -3094,49 +3073,6 @@ def Test_class_extends()
END
v9.CheckSourceFailure(lines, 'E1355: Duplicate function: ToString', 9)
lines =<< trim END
vim9script
class Child
var age: number
def ToString(): string
return super .ToString() .. ': ' .. this.age
enddef
endclass
var o = Child.new(42)
echo o.ToString()
END
v9.CheckSourceFailure(lines, 'E1356: "super" must be followed by a dot', 1)
lines =<< trim END
vim9script
class Base
var name: string
def ToString(): string
return this.name
enddef
endclass
var age = 42
def ToString(): string
return super.ToString() .. ': ' .. age
enddef
echo ToString()
END
v9.CheckSourceFailure(lines, 'E1357: Using "super" not in a class method', 1)
lines =<< trim END
vim9script
class Child
var age: number
def ToString(): string
return super.ToString() .. ': ' .. this.age
enddef
endclass
var o = Child.new(42)
echo o.ToString()
END
v9.CheckSourceFailure(lines, 'E1358: Using "super" not in a child class', 1)
lines =<< trim END
vim9script
class Base
@@ -3244,28 +3180,6 @@ def Test_using_base_class()
END
v9.CheckSourceSuccess(lines)
unlet g:result
# Using super, Child invokes Base method which has optional arg. #12471
lines =<< trim END
vim9script
class Base
var success: bool = false
def Method(arg = 0)
this.success = true
enddef
endclass
class Child extends Base
def new()
super.Method()
enddef
endclass
var obj = Child.new()
assert_equal(true, obj.success)
END
v9.CheckSourceSuccess(lines)
enddef
" Test for using a method from the super class
@@ -12409,4 +12323,162 @@ def Test_protected_new_method()
v9.CheckSourceSuccess(lines)
enddef
" Test for using 'super' in a closure function inside an object method
def Test_super_in_closure()
var lines =<< trim END
vim9script
class A
const _value: number
def Fn(): func(any): number
return (_: any) => this._value
enddef
endclass
class B extends A
def Fn(): func(any): number
return (_: any) => super._value
enddef
endclass
assert_equal(100, A.new(100).Fn()(null))
assert_equal(200, B.new(200).Fn()(null))
END
v9.CheckSourceSuccess(lines)
enddef
" Test for using 'super' to access methods and variables
def Test_super_keyword()
var lines =<< trim END
vim9script
class Base
var name: string
def ToString(): string
return this.name
enddef
endclass
class Child extends Base
var age: number
def ToString(): string
return super.ToString() .. ': ' .. this.age
enddef
endclass
var o = Child.new('John', 42)
assert_equal('John: 42', o.ToString())
END
v9.CheckSourceSuccess(lines)
lines =<< trim END
vim9script
class Child
var age: number
def ToString(): string
return super .ToString() .. ': ' .. this.age
enddef
endclass
var o = Child.new(42)
echo o.ToString()
END
v9.CheckSourceFailure(lines, 'E1356: "super" must be followed by a dot', 1)
lines =<< trim END
vim9script
class Base
var name: string
def ToString(): string
return this.name
enddef
endclass
var age = 42
def ToString(): string
return super.ToString() .. ': ' .. age
enddef
echo ToString()
END
v9.CheckSourceFailure(lines, 'E1357: Using "super" not in a class method', 1)
lines =<< trim END
vim9script
class Child
var age: number
def ToString(): string
return super.ToString() .. ': ' .. this.age
enddef
endclass
var o = Child.new(42)
echo o.ToString()
END
v9.CheckSourceFailure(lines, 'E1358: Using "super" not in a child class', 1)
# Using super, Child invokes Base method which has optional arg. #12471
lines =<< trim END
vim9script
class Base
var success: bool = false
def Method(arg = 0)
this.success = true
enddef
endclass
class Child extends Base
def new()
super.Method()
enddef
endclass
var obj = Child.new()
assert_equal(true, obj.success)
END
v9.CheckSourceSuccess(lines)
# Using 'super' to access an object variable in the parent
lines =<< trim END
vim9script
class A
var foo: string = 'xxx'
endclass
class B extends A
def GetString(): string
return super.foo
enddef
endclass
var b: B = B.new()
echo b.GetString()
END
v9.CheckSourceSuccess(lines)
# Using super to access an overriden method in the parent class
lines =<< trim END
vim9script
class A
def Foo(): string
return 'A.Foo'
enddef
endclass
class B extends A
def Foo(): string
return 'B.Foo'
enddef
def Bar(): string
return $'{super.Foo()} {this.Foo()}'
enddef
endclass
var b = B.new()
assert_equal('A.Foo B.Foo', b.Bar())
END
v9.CheckSourceSuccess(lines)
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
+71
View File
@@ -3494,4 +3494,75 @@ def Test_vim9_import_and_class_extends_2()
&rtp = save_rtp
enddef
" Test for using an autoloaded class from another autoloaded script
def Test_class_from_auloaded_script()
mkdir('Xdir', 'R')
var save_rtp = &rtp
&rtp = getcwd()
exe 'set rtp^=' .. getcwd() .. '/Xdir'
mkdir('Xdir/autoload/SomeClass/bar', 'p')
var lines =<< trim END
vim9script
export class Baz
static var v1: string = "v1"
var v2: string = "v2"
def GetName(): string
return "baz"
enddef
endclass
END
writefile(lines, 'Xdir/autoload/SomeClass/bar/baz.vim', 'D')
lines =<< trim END
vim9script
import autoload './bar/baz.vim'
export def MyTestFoo(): string
assert_fails('var x = baz.Baz.NonExisting()', 'E1325: Method "NonExisting" not found in class "Baz"')
assert_fails('var x = baz.Baz.foobar', 'E1337: Class variable "foobar" not found in class "Baz"')
const instance = baz.Baz.new()
return $'{instance.GetName()} {baz.Baz.v1} {instance.v2}'
enddef
END
writefile(lines, 'Xdir/autoload/SomeClass/foo.vim', 'D')
lines =<< trim END
vim9script
import autoload 'SomeClass/foo.vim'
import autoload 'SomeClass/bar/baz.vim'
def NotInAutoload()
# Use non-existing class method and variable
assert_fails('var x = baz.Baz.NonExisting()', 'E1325: Method "NonExisting" not found in class "Baz"')
var caught_exception = false
try
var x = baz.Baz.foobar
catch /E1337: Class variable "foobar" not found in class "Baz"/
caught_exception = true
endtry
assert_true(caught_exception)
const instance = baz.Baz.new()
assert_equal("baz v1 v2", $'{instance.GetName()} {baz.Baz.v1} {instance.v2}')
enddef
def InAutoload()
assert_equal("baz v1 v2", foo.MyTestFoo())
enddef
NotInAutoload()
InAutoload()
END
v9.CheckScriptSuccess(lines)
&rtp = save_rtp
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
+22
View File
@@ -719,6 +719,28 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1122,
/**/
1121,
/**/
1120,
/**/
1119,
/**/
1118,
/**/
1117,
/**/
1116,
/**/
1115,
/**/
1114,
/**/
1113,
/**/
1112,
/**/
1111,
/**/
+3 -4
View File
@@ -2053,8 +2053,7 @@ early_ret:
tv.v_type = VAR_CLASS;
tv.vval.v_class = cl;
SOURCING_LNUM = start_lnum;
int rc = set_var_const(cl->class_name, current_sctx.sc_sid,
NULL, &tv, FALSE, 0, 0);
int rc = set_var_const(cl->class_name, 0, NULL, &tv, FALSE, 0, 0);
if (rc == FAIL)
goto cleanup;
@@ -2489,7 +2488,7 @@ early_ret:
if (success && is_enum && num_enum_values == 0)
// Empty enum statement. Add an empty "values" class variable
enum_add_values_member(cl, &classmembers, 0, &type_list);
success = enum_add_values_member(cl, &classmembers, 0, &type_list);
/*
* Check a few things
@@ -2874,7 +2873,7 @@ ex_type(exarg_T *eap)
tv.vval.v_class = type->tt_class;
++tv.vval.v_class->class_refcount;
}
set_var_const(name_start, current_sctx.sc_sid, NULL, &tv, FALSE,
set_var_const(name_start, 0, NULL, &tv, FALSE,
ASSIGN_CONST | ASSIGN_FINAL, 0);
done:
+8 -14
View File
@@ -843,27 +843,21 @@ find_imported(char_u *name, size_t len, int load)
imported_T *
find_imported_from_extends(cctx_T *cctx, char_u *name, size_t len, int load)
{
imported_T *ret = NULL;
class_T *cl_extends;
if (cctx == NULL || cctx->ctx_ufunc == NULL
|| cctx->ctx_ufunc->uf_class == NULL)
return NULL;
cl_extends = cctx->ctx_ufunc->uf_class->class_extends;
if (cl_extends == NULL || cl_extends->class_class_function_count_child <= 0)
class_T *cl_extends = cctx->ctx_ufunc->uf_class->class_extends;
if (cl_extends == NULL
|| cl_extends->class_class_function_count_child <= 0)
return NULL;
else
{
sctx_T current_sctx_save = current_sctx;
current_sctx = cl_extends->class_class_functions[0]->uf_script_ctx;
ret = find_imported(name, len, load);
current_sctx = current_sctx_save;
sctx_T current_sctx_save = current_sctx;
current_sctx = cl_extends->class_class_functions[0]->uf_script_ctx;
imported_T *ret = find_imported(name, len, load);
current_sctx = current_sctx_save;
return ret;
}
return ret;
}
/*
+53 -28
View File
@@ -3162,34 +3162,53 @@ object_required_error(typval_T *tv)
}
/*
* Accessing the member of an object stored in a variable of type "any".
* Accessing the variable or method of an object or a class stored in a
* variable of type "any".
* Returns OK if the member variable is present.
* Returns FAIL if the variable is not found.
*/
static int
any_var_get_obj_member(class_T *current_class, isn_T *iptr, typval_T *tv)
var_any_get_oc_member(class_T *current_class, isn_T *iptr, typval_T *tv)
{
object_T *obj = tv->vval.v_object;
int is_object = tv->v_type == VAR_OBJECT;
class_T *tv_cl;
object_T *obj = NULL;
typval_T mtv;
if (obj == NULL)
if (is_object)
{
SOURCING_LNUM = iptr->isn_lnum;
emsg(_(e_using_null_object));
return FAIL;
obj = tv->vval.v_object;
if (obj == NULL)
{
SOURCING_LNUM = iptr->isn_lnum;
emsg(_(e_using_null_object));
return FAIL;
}
tv_cl = obj->obj_class;
}
else
{
tv_cl = tv->vval.v_class;
if (tv_cl == NULL)
{
SOURCING_LNUM = iptr->isn_lnum;
emsg(_(e_using_null_class));
return FAIL;
}
}
// get_member_tv() needs the object information in the typval argument.
// So set the object information.
// get_member_tv() needs the class/object information in the typval
// argument. So set the object information.
copy_tv(tv, &mtv);
// 'name' can either be a object variable or a object method
// 'name' can either be an instance or class variable or method
int namelen = (int)STRLEN(iptr->isn_arg.string);
int save_did_emsg = did_emsg;
if (get_member_tv(obj->obj_class, TRUE, iptr->isn_arg.string, namelen,
if (get_member_tv(tv_cl, is_object, iptr->isn_arg.string, namelen,
current_class, &mtv) == OK)
{
// instance or class variable
copy_tv(&mtv, tv);
clear_tv(&mtv);
return OK;
@@ -3198,31 +3217,36 @@ any_var_get_obj_member(class_T *current_class, isn_T *iptr, typval_T *tv)
if (did_emsg != save_did_emsg)
return FAIL;
// could be a member function
ufunc_T *obj_method;
int obj_method_idx;
// could be a class or instance method
ufunc_T *oc_method;
int oc_method_idx;
obj_method = method_lookup(obj->obj_class, VAR_OBJECT,
iptr->isn_arg.string, namelen,
&obj_method_idx);
if (obj_method == NULL)
oc_method = method_lookup(tv_cl, tv->v_type, iptr->isn_arg.string,
namelen, &oc_method_idx);
if (oc_method == NULL)
{
char *msg;
SOURCING_LNUM = iptr->isn_lnum;
semsg(_(e_variable_not_found_on_object_str_str), iptr->isn_arg.string,
obj->obj_class->class_name);
if (is_object)
msg = e_variable_not_found_on_object_str_str;
else
msg = e_class_variable_str_not_found_in_class_str;
semsg(_(msg), iptr->isn_arg.string, tv_cl->class_name);
return FAIL;
}
// Protected methods are not accessible outside the class
if (*obj_method->uf_name == '_'
&& !class_instance_of(current_class, obj->obj_class))
if (*oc_method->uf_name == '_'
&& !class_instance_of(current_class, tv_cl))
{
semsg(_(e_cannot_access_protected_method_str), obj_method->uf_name);
semsg(_(e_cannot_access_protected_method_str), oc_method->uf_name);
return FAIL;
}
// Create a partial for the member function
if (obj_method_to_partial_tv(obj, obj_method, tv) == FAIL)
// Create a partial for the instance or class method
if (obj_method_to_partial_tv(is_object ? obj : NULL, oc_method, tv)
== FAIL)
return FAIL;
return OK;
@@ -5671,15 +5695,16 @@ exec_instructions(ectx_T *ectx)
tv = STACK_TV_BOT(-1);
if (tv->v_type == VAR_OBJECT)
if (tv->v_type == VAR_OBJECT
|| tv->v_type == VAR_CLASS)
{
if (dict_stack_save(tv) == FAIL)
goto on_fatal_error;
ufunc_T *ufunc = (((dfunc_T *)def_functions.ga_data)
+ ectx->ec_dfunc_idx)->df_ufunc;
// Class object (not a Dict)
if (any_var_get_obj_member(ufunc->uf_class, iptr, tv) == FAIL)
// Class or an object (not a Dict)
if (var_any_get_oc_member(ufunc->uf_class, iptr, tv) == FAIL)
goto on_error;
}
else
+23 -5
View File
@@ -291,7 +291,7 @@ compile_class_object_index(cctx_T *cctx, char_u **arg, type_T *type)
}
class_T *cl = type->tt_class;
int is_super = type->tt_flags & TTFLAG_SUPER;
int is_super = ((type->tt_flags & TTFLAG_SUPER) == TTFLAG_SUPER);
if (type == &t_super)
{
if (cctx->ctx_ufunc == NULL || cctx->ctx_ufunc->uf_class == NULL)
@@ -693,6 +693,26 @@ generate_funcref(cctx_T *cctx, char_u *name, int has_g_prefix)
return generate_PUSHFUNC(cctx, ufunc->uf_name, ufunc->uf_func_type, TRUE);
}
/*
* Returns TRUE if compiling a class method.
*/
static int
compiling_a_class_method(cctx_T *cctx)
{
// For an object method, the FC_OBJECT flag will be set.
// For a constructor method, the FC_NEW flag will be set.
// Excluding these methods, the others are class methods.
// When compiling a closure function inside an object method,
// cctx->ctx_outer->ctx_func will point to the object method.
return cctx->ctx_ufunc != NULL
&& (cctx->ctx_ufunc->uf_flags & (FC_OBJECT|FC_NEW)) == 0
&& (cctx->ctx_outer == NULL
|| cctx->ctx_outer->ctx_ufunc == NULL
|| cctx->ctx_outer->ctx_ufunc->uf_class == NULL
|| (cctx->ctx_outer->ctx_ufunc->uf_flags
& (FC_OBJECT|FC_NEW)) == 0);
}
/*
* Compile a variable name into a load instruction.
* "end" points to just after the name.
@@ -807,9 +827,7 @@ compile_load(
if (name == NULL)
return FAIL;
if (STRCMP(name, "super") == 0
&& cctx->ctx_ufunc != NULL
&& (cctx->ctx_ufunc->uf_flags & (FC_OBJECT|FC_NEW)) == 0)
if (STRCMP(name, "super") == 0 && compiling_a_class_method(cctx))
{
// super.SomeFunc() in a class function: push &t_super type, this
// is recognized in compile_subscript().
@@ -884,7 +902,7 @@ compile_load(
|| (imp = find_imported(name, 0, FALSE)) != NULL
|| (imp = find_imported_from_extends(cctx, name, 0, FALSE))
!= NULL)
res = compile_load_scriptvar(cctx, name, *arg, &end, imp);
res = compile_load_scriptvar(cctx, name, *arg, &end, imp);
// When evaluating an expression and the name starts with an
// uppercase letter it can be a user defined function.