Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d62a2f443 | ||
|
|
2a94e98792 | ||
|
|
caee7956a2 | ||
|
|
3570631dc6 | ||
|
|
3d37231437 | ||
|
|
da4e433dc3 | ||
|
|
b2a4c110a5 | ||
|
|
6709816f78 | ||
|
|
4f174f0de9 | ||
|
|
cd8a3eaf53 | ||
|
|
08b1c61e8b | ||
|
|
57f9ce1a09 | ||
|
|
b23c1fc596 | ||
|
|
15d270019e | ||
|
|
5a53925a6e | ||
|
|
ce3b0136c6 | ||
|
|
2f54c13292 | ||
|
|
33c1da7ff4 | ||
|
|
deba02ddd4 | ||
|
|
2b358adde0 | ||
|
|
ef9e3f8924 | ||
|
|
1858e2b22a | ||
|
|
1b1c9f272d | ||
|
|
2b89afd5eb | ||
|
|
43cb8e1c3b | ||
|
|
1bf1bf569b | ||
|
|
a390e984db | ||
|
|
171c50e0b0 | ||
|
|
8ebdbc9e6d |
2
runtime/autoload/dist/script.vim
vendored
2
runtime/autoload/dist/script.vim
vendored
@@ -369,7 +369,7 @@ def DetectFromText(line1: string)
|
||||
|
||||
# Strace
|
||||
# inaccurate fast match first, then use accurate slow match
|
||||
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:.]* *execve(')
|
||||
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:. ]*execve(')
|
||||
|| line1 =~ '^__libc_start_main'
|
||||
setl ft=strace
|
||||
|
||||
|
||||
32
runtime/autoload/dist/vim.vim
vendored
Normal file
32
runtime/autoload/dist/vim.vim
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
" Vim runtime support library,
|
||||
" runs the vim9 script version or legacy script version
|
||||
" on demand (mostly for Neovim compatability)
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Nov 04
|
||||
|
||||
|
||||
" enable the zip and gzip plugin by default, if not set
|
||||
if !exists('g:zip_exec')
|
||||
let g:zip_exec = 1
|
||||
endif
|
||||
|
||||
if !exists('g:gzip_exec')
|
||||
let g:gzip_exec = 1
|
||||
endif
|
||||
|
||||
if !has('vim9script')
|
||||
function dist#vim#IsSafeExecutable(filetype, executable)
|
||||
let cwd = getcwd()
|
||||
return get(g:, a:filetype .. '_exec', get(g:, 'plugin_exec', 0)) &&
|
||||
\ (fnamemodify(exepath(a:executable), ':p:h') !=# cwd
|
||||
\ || (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1 &&
|
||||
\ cwd != '.'))
|
||||
endfunction
|
||||
|
||||
finish
|
||||
endif
|
||||
|
||||
def dist#vim#IsSafeExecutable(filetype: string, executable: string): bool
|
||||
return dist#vim9#IsSafeExecutable(filetype, executable)
|
||||
enddef
|
||||
17
runtime/autoload/dist/vim9.vim
vendored
Normal file
17
runtime/autoload/dist/vim9.vim
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
vim9script
|
||||
|
||||
# Vim runtime support library
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Oct 25
|
||||
|
||||
export def IsSafeExecutable(filetype: string, executable: string): bool
|
||||
var cwd = getcwd()
|
||||
return get(g:, filetype .. '_exec', get(g:, 'plugin_exec', 0))
|
||||
&& (fnamemodify(exepath(executable), ':p:h') !=# cwd
|
||||
|| (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1
|
||||
&& cwd != '.'))
|
||||
enddef
|
||||
|
||||
# Uncomment this line to check for compilation errors early
|
||||
# defcompile
|
||||
@@ -11,10 +11,7 @@ fun s:check(cmd)
|
||||
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
|
||||
if !exists("s:have_" . name)
|
||||
" safety check, don't execute anything from the current directory
|
||||
let s:tmp_cwd = getcwd()
|
||||
let f = (fnamemodify(exepath(name), ":p:h") !=# s:tmp_cwd
|
||||
\ || (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) != -1 && s:tmp_cwd != '.'))
|
||||
unlet s:tmp_cwd
|
||||
let f = dist#vim#IsSafeExecutable('gzip', name)
|
||||
if !f
|
||||
echoerr "Warning: NOT executing " .. name .. " from current directory!"
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Jan 07, 2020
|
||||
" Version: 32
|
||||
" Date: Nov 05, 2023
|
||||
" Version: 32a (with modifications from the Vim Project)
|
||||
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
"
|
||||
@@ -22,7 +22,7 @@
|
||||
if &cp || exists("g:loaded_tar")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tar= "v32"
|
||||
let g:loaded_tar= "v32a"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of tar needs vim 7.2"
|
||||
@@ -208,7 +208,16 @@ fun! tar#Browse(tarfile)
|
||||
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||
return
|
||||
endif
|
||||
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~# '\c\%(warning\|error\|inappropriate\|unrecognized\)')
|
||||
" If there was an error message, the last line probably matches some keywords but
|
||||
" should also contain whitespace for readability. Make sure not to match a
|
||||
" filename that contains the keyword (error/warning/unrecognized/inappropriate, etc)
|
||||
"
|
||||
" FIXME:is this actually necessary? In case of an error, we should probably
|
||||
" have noticed in the if statement above since tar should have exited
|
||||
" with a non-zero exit code.
|
||||
if line("$") == curlast || ( line("$") == (curlast + 1) &&
|
||||
\ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' &&
|
||||
\ getline("$") =~ '\s' )
|
||||
redraw!
|
||||
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
|
||||
keepj sil! %d
|
||||
|
||||
@@ -57,14 +57,10 @@ if !exists("g:zip_extractcmd")
|
||||
let g:zip_extractcmd= g:zip_unzipcmd
|
||||
endif
|
||||
|
||||
let s:tmp_cwd = getcwd()
|
||||
if (fnamemodify(exepath(g:zip_unzipcmd), ":p:h") ==# getcwd()
|
||||
\ && (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) == -1 || s:tmp_cwd == '.'))
|
||||
unlet s:tmp_cwd
|
||||
if !dist#vim#IsSafeExecutable('zip', g:zip_unzipcmd)
|
||||
echoerr "Warning: NOT executing " .. g:zip_unzipcmd .. " from current directory!"
|
||||
finish
|
||||
endif
|
||||
unlet s:tmp_cwd
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
|
||||
@@ -13,337 +13,9 @@ VIMEXE = vim
|
||||
# AWK, used for "make html". Comment this out if the include gives problems.
|
||||
include ../../src/auto/config.mk
|
||||
|
||||
DOCS = \
|
||||
arabic.txt \
|
||||
autocmd.txt \
|
||||
builtin.txt \
|
||||
change.txt \
|
||||
channel.txt \
|
||||
cmdline.txt \
|
||||
debug.txt \
|
||||
debugger.txt \
|
||||
develop.txt \
|
||||
diff.txt \
|
||||
digraph.txt \
|
||||
editing.txt \
|
||||
eval.txt \
|
||||
farsi.txt \
|
||||
filetype.txt \
|
||||
fold.txt \
|
||||
ft_ada.txt \
|
||||
ft_context.txt \
|
||||
ft_mp.txt \
|
||||
ft_ps1.txt \
|
||||
ft_raku.txt \
|
||||
ft_rust.txt \
|
||||
ft_sql.txt \
|
||||
gui.txt \
|
||||
gui_w32.txt \
|
||||
gui_x11.txt \
|
||||
hangulin.txt \
|
||||
hebrew.txt \
|
||||
help.txt \
|
||||
helphelp.txt \
|
||||
howto.txt \
|
||||
if_cscop.txt \
|
||||
if_lua.txt \
|
||||
if_mzsch.txt \
|
||||
if_ole.txt \
|
||||
if_perl.txt \
|
||||
if_pyth.txt \
|
||||
if_ruby.txt \
|
||||
if_sniff.txt \
|
||||
if_tcl.txt \
|
||||
indent.txt \
|
||||
index.txt \
|
||||
insert.txt \
|
||||
intro.txt \
|
||||
map.txt \
|
||||
mbyte.txt \
|
||||
message.txt \
|
||||
mlang.txt \
|
||||
motion.txt \
|
||||
netbeans.txt \
|
||||
options.txt \
|
||||
os_390.txt \
|
||||
os_amiga.txt \
|
||||
os_beos.txt \
|
||||
os_dos.txt \
|
||||
os_haiku.txt \
|
||||
os_mac.txt \
|
||||
os_mint.txt \
|
||||
os_msdos.txt \
|
||||
os_os2.txt \
|
||||
os_qnx.txt \
|
||||
os_risc.txt \
|
||||
os_unix.txt \
|
||||
os_vms.txt \
|
||||
os_win32.txt \
|
||||
pattern.txt \
|
||||
pi_getscript.txt \
|
||||
pi_gzip.txt \
|
||||
pi_logipat.txt \
|
||||
pi_netrw.txt \
|
||||
pi_paren.txt \
|
||||
pi_spec.txt \
|
||||
pi_tar.txt \
|
||||
pi_vimball.txt \
|
||||
pi_zip.txt \
|
||||
popup.txt \
|
||||
print.txt \
|
||||
quickfix.txt \
|
||||
quickref.txt \
|
||||
quotes.txt \
|
||||
recover.txt \
|
||||
remote.txt \
|
||||
repeat.txt \
|
||||
rileft.txt \
|
||||
russian.txt \
|
||||
scroll.txt \
|
||||
sign.txt \
|
||||
spell.txt \
|
||||
sponsor.txt \
|
||||
starting.txt \
|
||||
syntax.txt \
|
||||
tabpage.txt \
|
||||
tagsrch.txt \
|
||||
term.txt \
|
||||
terminal.txt \
|
||||
testing.txt \
|
||||
textprop.txt \
|
||||
tips.txt \
|
||||
todo.txt \
|
||||
uganda.txt \
|
||||
undo.txt \
|
||||
userfunc.txt \
|
||||
usr_01.txt \
|
||||
usr_02.txt \
|
||||
usr_03.txt \
|
||||
usr_04.txt \
|
||||
usr_05.txt \
|
||||
usr_06.txt \
|
||||
usr_07.txt \
|
||||
usr_08.txt \
|
||||
usr_09.txt \
|
||||
usr_10.txt \
|
||||
usr_11.txt \
|
||||
usr_12.txt \
|
||||
usr_20.txt \
|
||||
usr_21.txt \
|
||||
usr_22.txt \
|
||||
usr_23.txt \
|
||||
usr_24.txt \
|
||||
usr_25.txt \
|
||||
usr_26.txt \
|
||||
usr_27.txt \
|
||||
usr_28.txt \
|
||||
usr_29.txt \
|
||||
usr_30.txt \
|
||||
usr_31.txt \
|
||||
usr_32.txt \
|
||||
usr_40.txt \
|
||||
usr_41.txt \
|
||||
usr_42.txt \
|
||||
usr_43.txt \
|
||||
usr_44.txt \
|
||||
usr_45.txt \
|
||||
usr_50.txt \
|
||||
usr_51.txt \
|
||||
usr_52.txt \
|
||||
usr_90.txt \
|
||||
usr_toc.txt \
|
||||
various.txt \
|
||||
version4.txt \
|
||||
version5.txt \
|
||||
version6.txt \
|
||||
version7.txt \
|
||||
version8.txt \
|
||||
version9.txt \
|
||||
vi_diff.txt \
|
||||
vim9.txt \
|
||||
vim9class.txt \
|
||||
visual.txt \
|
||||
windows.txt \
|
||||
workshop.txt
|
||||
|
||||
HTMLS = \
|
||||
arabic.html \
|
||||
autocmd.html \
|
||||
builtin.html \
|
||||
change.html \
|
||||
channel.html \
|
||||
cmdline.html \
|
||||
debug.html \
|
||||
debugger.html \
|
||||
develop.html \
|
||||
diff.html \
|
||||
digraph.html \
|
||||
editing.html \
|
||||
eval.html \
|
||||
farsi.html \
|
||||
filetype.html \
|
||||
fold.html \
|
||||
ft_ada.html \
|
||||
ft_context.html \
|
||||
ft_mp.html \
|
||||
ft_ps1.html \
|
||||
ft_raku.html \
|
||||
ft_rust.html \
|
||||
ft_sql.html \
|
||||
gui.html \
|
||||
gui_w32.html \
|
||||
gui_x11.html \
|
||||
hangulin.html \
|
||||
hebrew.html \
|
||||
helphelp.html \
|
||||
howto.html \
|
||||
if_cscop.html \
|
||||
if_lua.html \
|
||||
if_mzsch.html \
|
||||
if_ole.html \
|
||||
if_perl.html \
|
||||
if_pyth.html \
|
||||
if_ruby.html \
|
||||
if_sniff.html \
|
||||
if_tcl.html \
|
||||
indent.html \
|
||||
index.html \
|
||||
insert.html \
|
||||
intro.html \
|
||||
map.html \
|
||||
mbyte.html \
|
||||
message.html \
|
||||
mlang.html \
|
||||
motion.html \
|
||||
netbeans.html \
|
||||
options.html \
|
||||
os_390.html \
|
||||
os_amiga.html \
|
||||
os_beos.html \
|
||||
os_dos.html \
|
||||
os_haiku.html \
|
||||
os_mac.html \
|
||||
os_mint.html \
|
||||
os_msdos.html \
|
||||
os_os2.html \
|
||||
os_qnx.html \
|
||||
os_risc.html \
|
||||
os_unix.html \
|
||||
os_vms.html \
|
||||
os_win32.html \
|
||||
pattern.html \
|
||||
pi_getscript.html \
|
||||
pi_gzip.html \
|
||||
pi_logipat.html \
|
||||
pi_netrw.html \
|
||||
pi_paren.html \
|
||||
pi_spec.html \
|
||||
pi_tar.html \
|
||||
pi_vimball.html \
|
||||
pi_zip.html \
|
||||
popup.html \
|
||||
print.html \
|
||||
quickfix.html \
|
||||
quickref.html \
|
||||
quotes.html \
|
||||
recover.html \
|
||||
remote.html \
|
||||
repeat.html \
|
||||
rileft.html \
|
||||
russian.html \
|
||||
scroll.html \
|
||||
sign.html \
|
||||
spell.html \
|
||||
sponsor.html \
|
||||
starting.html \
|
||||
syntax.html \
|
||||
tabpage.html \
|
||||
tagsrch.html \
|
||||
term.html \
|
||||
terminal.html \
|
||||
testing.html \
|
||||
textprop.html \
|
||||
tips.html \
|
||||
todo.html \
|
||||
uganda.html \
|
||||
undo.html \
|
||||
userfunc.html \
|
||||
usr_01.html \
|
||||
usr_02.html \
|
||||
usr_03.html \
|
||||
usr_04.html \
|
||||
usr_05.html \
|
||||
usr_06.html \
|
||||
usr_07.html \
|
||||
usr_08.html \
|
||||
usr_09.html \
|
||||
usr_10.html \
|
||||
usr_11.html \
|
||||
usr_12.html \
|
||||
usr_20.html \
|
||||
usr_21.html \
|
||||
usr_22.html \
|
||||
usr_23.html \
|
||||
usr_24.html \
|
||||
usr_25.html \
|
||||
usr_26.html \
|
||||
usr_27.html \
|
||||
usr_28.html \
|
||||
usr_29.html \
|
||||
usr_30.html \
|
||||
usr_31.html \
|
||||
usr_32.html \
|
||||
usr_40.html \
|
||||
usr_41.html \
|
||||
usr_42.html \
|
||||
usr_43.html \
|
||||
usr_44.html \
|
||||
usr_45.html \
|
||||
usr_50.html \
|
||||
usr_51.html \
|
||||
usr_52.html \
|
||||
usr_90.html \
|
||||
usr_toc.html \
|
||||
various.html \
|
||||
version4.html \
|
||||
version5.html \
|
||||
version6.html \
|
||||
version7.html \
|
||||
version8.html \
|
||||
version9.html \
|
||||
vi_diff.html \
|
||||
vimindex.html \
|
||||
vim9.html \
|
||||
vim9class.html \
|
||||
visual.html \
|
||||
windows.html \
|
||||
workshop.html
|
||||
|
||||
CONVERTED = \
|
||||
vim-fr.UTF-8.1 \
|
||||
evim-fr.UTF-8.1 \
|
||||
vimdiff-fr.UTF-8.1 \
|
||||
vimtutor-fr.UTF-8.1 \
|
||||
xxd-fr.UTF-8.1 \
|
||||
vim-it.UTF-8.1 \
|
||||
evim-it.UTF-8.1 \
|
||||
vimdiff-it.UTF-8.1 \
|
||||
vimtutor-it.UTF-8.1 \
|
||||
xxd-it.UTF-8.1 \
|
||||
vim-pl.UTF-8.1 \
|
||||
evim-pl.UTF-8.1 \
|
||||
vimdiff-pl.UTF-8.1 \
|
||||
vimtutor-pl.UTF-8.1 \
|
||||
xxd-pl.UTF-8.1 \
|
||||
vim-ru.UTF-8.1 \
|
||||
evim-ru.UTF-8.1 \
|
||||
vimdiff-ru.UTF-8.1 \
|
||||
vimtutor-ru.UTF-8.1 \
|
||||
xxd-ru.UTF-8.1 \
|
||||
vim-tr.UTF-8.1 \
|
||||
evim-tr.UTF-8.1 \
|
||||
vimdiff-tr.UTF-8.1 \
|
||||
vimtutor-tr.UTF-8.1
|
||||
# 17.10.23, added by Restorer
|
||||
# Common components
|
||||
include makefile_all.mak
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .txt .html
|
||||
@@ -476,6 +148,18 @@ os_win32.txt:
|
||||
|
||||
# Note that $< works with GNU make while $> works for BSD make.
|
||||
# Is there a solution that works for both??
|
||||
vim-da.UTF-8.1: vim-da.1 # 17.10.23, added by Restorer
|
||||
iconv -f latin1 -t utf-8 $< >$@
|
||||
|
||||
vimdiff-da.UTF-8.1: vimdiff-da.1 # 17.10.23, added by Restorer
|
||||
iconv -f latin1 -t utf-8 $< >$@
|
||||
|
||||
vimtutor-da.UTF-8.1: vimtutor-da.1 # 17.10.23, added by Restorer
|
||||
iconv -f latin1 -t utf-8 $< >$@
|
||||
|
||||
vim-de.UTF-8.1: vim-de.1 # 17.10.23, added by Restorer
|
||||
iconv -f latin1 -t utf-8 $< >$@
|
||||
|
||||
vim-fr.UTF-8.1: vim-fr.1
|
||||
iconv -f latin1 -t utf-8 $< >$@
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.0. Last change: 2023 Jun 01
|
||||
*eval.txt* For Vim version 9.0. Last change: 2023 Nov 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -36,6 +36,7 @@ a remark is given.
|
||||
11. No +eval feature |no-eval-feature|
|
||||
12. The sandbox |eval-sandbox|
|
||||
13. Textlock |textlock|
|
||||
14. Vim script library |vim-script-library|
|
||||
|
||||
Testing support is documented in |testing.txt|.
|
||||
Profiling is documented at |profiling|.
|
||||
@@ -4801,5 +4802,37 @@ This is not allowed when the textlock is active:
|
||||
- closing a window or quitting Vim
|
||||
- etc.
|
||||
|
||||
==============================================================================
|
||||
14. Vim script library *vim-script-library*
|
||||
|
||||
Vim comes bundled with a Vim script library, that can be used by runtime,
|
||||
script authors. Currently, it only includes very few functions, but it may
|
||||
grow over time.
|
||||
|
||||
The functions are available as |Vim9-script| as well as using legacy vim
|
||||
script (to be used for non Vim 9.0 versions and Neovim).
|
||||
|
||||
*dist#vim* *dist#vim9*
|
||||
The functions make use of the autoloaded prefix "dist#vim" (for legacy Vim script and
|
||||
Neovim) and "dist#vim9" for Vim9 script.
|
||||
|
||||
The following functions are available:
|
||||
|
||||
dist#vim#IsSafeExecutable(filetype, executable) ~
|
||||
dist#vim9#IsSafeExecutable(filetype:string, executable:string): bool ~
|
||||
|
||||
This function takes a filetype and an executable and checks whether it is safe
|
||||
to execute the given executable. For security reasons users may not want to
|
||||
have Vim execute random executables or may have forbidden to do so for
|
||||
specific filetypes by setting the "<filetype>_exec" variable (|plugin_exec|).
|
||||
|
||||
It returns |true| or |false| to indicate whether the plugin should run the given
|
||||
exectuable. It takes the following arguments:
|
||||
|
||||
argument type ~
|
||||
|
||||
filetype string
|
||||
executable string
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
338
runtime/doc/makefile_all.mak
Normal file
338
runtime/doc/makefile_all.mak
Normal file
@@ -0,0 +1,338 @@
|
||||
# makefile with common components
|
||||
|
||||
DOCS = \
|
||||
arabic.txt \
|
||||
autocmd.txt \
|
||||
builtin.txt \
|
||||
change.txt \
|
||||
channel.txt \
|
||||
cmdline.txt \
|
||||
debug.txt \
|
||||
debugger.txt \
|
||||
develop.txt \
|
||||
diff.txt \
|
||||
digraph.txt \
|
||||
editing.txt \
|
||||
eval.txt \
|
||||
farsi.txt \
|
||||
filetype.txt \
|
||||
fold.txt \
|
||||
ft_ada.txt \
|
||||
ft_context.txt \
|
||||
ft_mp.txt \
|
||||
ft_ps1.txt \
|
||||
ft_raku.txt \
|
||||
ft_rust.txt \
|
||||
ft_sql.txt \
|
||||
gui.txt \
|
||||
gui_w32.txt \
|
||||
gui_x11.txt \
|
||||
hangulin.txt \
|
||||
hebrew.txt \
|
||||
help.txt \
|
||||
helphelp.txt \
|
||||
howto.txt \
|
||||
if_cscop.txt \
|
||||
if_lua.txt \
|
||||
if_mzsch.txt \
|
||||
if_ole.txt \
|
||||
if_perl.txt \
|
||||
if_pyth.txt \
|
||||
if_ruby.txt \
|
||||
if_sniff.txt \
|
||||
if_tcl.txt \
|
||||
indent.txt \
|
||||
index.txt \
|
||||
insert.txt \
|
||||
intro.txt \
|
||||
map.txt \
|
||||
mbyte.txt \
|
||||
message.txt \
|
||||
mlang.txt \
|
||||
motion.txt \
|
||||
netbeans.txt \
|
||||
options.txt \
|
||||
os_390.txt \
|
||||
os_amiga.txt \
|
||||
os_beos.txt \
|
||||
os_dos.txt \
|
||||
os_haiku.txt \
|
||||
os_mac.txt \
|
||||
os_mint.txt \
|
||||
os_msdos.txt \
|
||||
os_os2.txt \
|
||||
os_qnx.txt \
|
||||
os_risc.txt \
|
||||
os_unix.txt \
|
||||
os_vms.txt \
|
||||
os_win32.txt \
|
||||
pattern.txt \
|
||||
pi_getscript.txt \
|
||||
pi_gzip.txt \
|
||||
pi_logipat.txt \
|
||||
pi_netrw.txt \
|
||||
pi_paren.txt \
|
||||
pi_spec.txt \
|
||||
pi_tar.txt \
|
||||
pi_vimball.txt \
|
||||
pi_zip.txt \
|
||||
popup.txt \
|
||||
print.txt \
|
||||
quickfix.txt \
|
||||
quickref.txt \
|
||||
quotes.txt \
|
||||
recover.txt \
|
||||
remote.txt \
|
||||
repeat.txt \
|
||||
rileft.txt \
|
||||
russian.txt \
|
||||
scroll.txt \
|
||||
sign.txt \
|
||||
spell.txt \
|
||||
sponsor.txt \
|
||||
starting.txt \
|
||||
syntax.txt \
|
||||
tabpage.txt \
|
||||
tagsrch.txt \
|
||||
term.txt \
|
||||
terminal.txt \
|
||||
testing.txt \
|
||||
textprop.txt \
|
||||
tips.txt \
|
||||
todo.txt \
|
||||
uganda.txt \
|
||||
undo.txt \
|
||||
userfunc.txt \
|
||||
usr_01.txt \
|
||||
usr_02.txt \
|
||||
usr_03.txt \
|
||||
usr_04.txt \
|
||||
usr_05.txt \
|
||||
usr_06.txt \
|
||||
usr_07.txt \
|
||||
usr_08.txt \
|
||||
usr_09.txt \
|
||||
usr_10.txt \
|
||||
usr_11.txt \
|
||||
usr_12.txt \
|
||||
usr_20.txt \
|
||||
usr_21.txt \
|
||||
usr_22.txt \
|
||||
usr_23.txt \
|
||||
usr_24.txt \
|
||||
usr_25.txt \
|
||||
usr_26.txt \
|
||||
usr_27.txt \
|
||||
usr_28.txt \
|
||||
usr_29.txt \
|
||||
usr_30.txt \
|
||||
usr_31.txt \
|
||||
usr_32.txt \
|
||||
usr_40.txt \
|
||||
usr_41.txt \
|
||||
usr_42.txt \
|
||||
usr_43.txt \
|
||||
usr_44.txt \
|
||||
usr_45.txt \
|
||||
usr_50.txt \
|
||||
usr_51.txt \
|
||||
usr_52.txt \
|
||||
usr_90.txt \
|
||||
usr_toc.txt \
|
||||
various.txt \
|
||||
version4.txt \
|
||||
version5.txt \
|
||||
version6.txt \
|
||||
version7.txt \
|
||||
version8.txt \
|
||||
version9.txt \
|
||||
vi_diff.txt \
|
||||
vim9.txt \
|
||||
vim9class.txt \
|
||||
visual.txt \
|
||||
windows.txt \
|
||||
workshop.txt
|
||||
|
||||
HTMLS = \
|
||||
arabic.html \
|
||||
autocmd.html \
|
||||
builtin.html \
|
||||
change.html \
|
||||
channel.html \
|
||||
cmdline.html \
|
||||
debug.html \
|
||||
debugger.html \
|
||||
develop.html \
|
||||
diff.html \
|
||||
digraph.html \
|
||||
editing.html \
|
||||
eval.html \
|
||||
farsi.html \
|
||||
filetype.html \
|
||||
fold.html \
|
||||
ft_ada.html \
|
||||
ft_context.html \
|
||||
ft_mp.html \
|
||||
ft_ps1.html \
|
||||
ft_raku.html \
|
||||
ft_rust.html \
|
||||
ft_sql.html \
|
||||
gui.html \
|
||||
gui_w32.html \
|
||||
gui_x11.html \
|
||||
hangulin.html \
|
||||
hebrew.html \
|
||||
helphelp.html \
|
||||
howto.html \
|
||||
if_cscop.html \
|
||||
if_lua.html \
|
||||
if_mzsch.html \
|
||||
if_ole.html \
|
||||
if_perl.html \
|
||||
if_pyth.html \
|
||||
if_ruby.html \
|
||||
if_sniff.html \
|
||||
if_tcl.html \
|
||||
indent.html \
|
||||
index.html \
|
||||
insert.html \
|
||||
intro.html \
|
||||
map.html \
|
||||
mbyte.html \
|
||||
message.html \
|
||||
mlang.html \
|
||||
motion.html \
|
||||
netbeans.html \
|
||||
options.html \
|
||||
os_390.html \
|
||||
os_amiga.html \
|
||||
os_beos.html \
|
||||
os_dos.html \
|
||||
os_haiku.html \
|
||||
os_mac.html \
|
||||
os_mint.html \
|
||||
os_msdos.html \
|
||||
os_os2.html \
|
||||
os_qnx.html \
|
||||
os_risc.html \
|
||||
os_unix.html \
|
||||
os_vms.html \
|
||||
os_win32.html \
|
||||
pattern.html \
|
||||
pi_getscript.html \
|
||||
pi_gzip.html \
|
||||
pi_logipat.html \
|
||||
pi_netrw.html \
|
||||
pi_paren.html \
|
||||
pi_spec.html \
|
||||
pi_tar.html \
|
||||
pi_vimball.html \
|
||||
pi_zip.html \
|
||||
popup.html \
|
||||
print.html \
|
||||
quickfix.html \
|
||||
quickref.html \
|
||||
quotes.html \
|
||||
recover.html \
|
||||
remote.html \
|
||||
repeat.html \
|
||||
rileft.html \
|
||||
russian.html \
|
||||
scroll.html \
|
||||
sign.html \
|
||||
spell.html \
|
||||
sponsor.html \
|
||||
starting.html \
|
||||
syntax.html \
|
||||
tabpage.html \
|
||||
tagsrch.html \
|
||||
term.html \
|
||||
terminal.html \
|
||||
testing.html \
|
||||
textprop.html \
|
||||
tips.html \
|
||||
todo.html \
|
||||
uganda.html \
|
||||
undo.html \
|
||||
userfunc.html \
|
||||
usr_01.html \
|
||||
usr_02.html \
|
||||
usr_03.html \
|
||||
usr_04.html \
|
||||
usr_05.html \
|
||||
usr_06.html \
|
||||
usr_07.html \
|
||||
usr_08.html \
|
||||
usr_09.html \
|
||||
usr_10.html \
|
||||
usr_11.html \
|
||||
usr_12.html \
|
||||
usr_20.html \
|
||||
usr_21.html \
|
||||
usr_22.html \
|
||||
usr_23.html \
|
||||
usr_24.html \
|
||||
usr_25.html \
|
||||
usr_26.html \
|
||||
usr_27.html \
|
||||
usr_28.html \
|
||||
usr_29.html \
|
||||
usr_30.html \
|
||||
usr_31.html \
|
||||
usr_32.html \
|
||||
usr_40.html \
|
||||
usr_41.html \
|
||||
usr_42.html \
|
||||
usr_43.html \
|
||||
usr_44.html \
|
||||
usr_45.html \
|
||||
usr_50.html \
|
||||
usr_51.html \
|
||||
usr_52.html \
|
||||
usr_90.html \
|
||||
usr_toc.html \
|
||||
various.html \
|
||||
version4.html \
|
||||
version5.html \
|
||||
version6.html \
|
||||
version7.html \
|
||||
version8.html \
|
||||
version9.html \
|
||||
vi_diff.html \
|
||||
vimindex.html \
|
||||
vim9.html \
|
||||
vim9class.html \
|
||||
visual.html \
|
||||
windows.html \
|
||||
workshop.html
|
||||
|
||||
CONVERTED = \
|
||||
vim-da.UTF-8.1 \
|
||||
vimdiff-da.UTF-8.1 \
|
||||
vimtutor-da.UTF-8.1 \
|
||||
vim-de.UTF-8.1 \
|
||||
vim-fr.UTF-8.1 \
|
||||
evim-fr.UTF-8.1 \
|
||||
vimdiff-fr.UTF-8.1 \
|
||||
vimtutor-fr.UTF-8.1 \
|
||||
xxd-fr.UTF-8.1 \
|
||||
vim-it.UTF-8.1 \
|
||||
evim-it.UTF-8.1 \
|
||||
vimdiff-it.UTF-8.1 \
|
||||
vimtutor-it.UTF-8.1 \
|
||||
xxd-it.UTF-8.1 \
|
||||
vim-pl.UTF-8.1 \
|
||||
evim-pl.UTF-8.1 \
|
||||
vimdiff-pl.UTF-8.1 \
|
||||
vimtutor-pl.UTF-8.1 \
|
||||
xxd-pl.UTF-8.1 \
|
||||
vim-ru.UTF-8.1 \
|
||||
evim-ru.UTF-8.1 \
|
||||
vimdiff-ru.UTF-8.1 \
|
||||
vimtutor-ru.UTF-8.1 \
|
||||
xxd-ru.UTF-8.1 \
|
||||
vim-tr.UTF-8.1 \
|
||||
evim-tr.UTF-8.1 \
|
||||
vimdiff-tr.UTF-8.1 \
|
||||
vimtutor-tr.UTF-8.1
|
||||
|
||||
460
runtime/doc/makefile_mvc.mak
Normal file
460
runtime/doc/makefile_mvc.mak
Normal file
@@ -0,0 +1,460 @@
|
||||
#
|
||||
# Makefile for the Vim documentation on Windows
|
||||
#
|
||||
# 17.11.23, Restorer, <restorer@mail2k.ru>
|
||||
|
||||
# Common components
|
||||
!INCLUDE makefile_all.mak
|
||||
|
||||
|
||||
# TODO: to think about what to use instead of awk. PowerShell?
|
||||
#AWK =
|
||||
|
||||
#
|
||||
VIMEXE = D:\Programs\Vim\vim90\vim.exe
|
||||
|
||||
#
|
||||
GETTEXT_PATH = D:\Programs\GetText\bin
|
||||
|
||||
# In case some package like GnuWin32, UnixUtils
|
||||
# or something similar is installed on the system.
|
||||
# If the "touch" program is installed on the system, but it is not registered
|
||||
# in the %PATH% environment variable, then specify the full path to this file.
|
||||
!IF EXIST ("touch.exe")
|
||||
TOUCH = touch.exe $@
|
||||
!ELSE
|
||||
TOUCH = @if exist $@ ( copy /b $@+,, ) else ( type nul >$@ )
|
||||
!ENDIF
|
||||
|
||||
# In case some package like GnuWin32, UnixUtils, gettext
|
||||
# or something similar is installed on the system.
|
||||
# If the "iconv" program is installed on the system, but it is not registered
|
||||
# in the %PATH% environment variable, then specify the full path to this file.
|
||||
!IF EXIST ("iconv.exe")
|
||||
ICONV = iconv.exe
|
||||
!ELSEIF EXIST ("$(GETTEXT_PATH)\iconv.exe")
|
||||
ICONV="$(GETTEXT_PATH)\iconv.exe"
|
||||
!ENDIF
|
||||
|
||||
RM = del /q
|
||||
|
||||
.SUFFIXES :
|
||||
.SUFFIXES : .c .o .txt .html
|
||||
|
||||
|
||||
all : tags perlhtml $(CONVERTED)
|
||||
|
||||
# Use "doctags" to generate the tags file. Only works for English!
|
||||
tags : doctags $(DOCS)
|
||||
doctags $(DOCS) | sort /L C /O tags
|
||||
powershell -nologo -noprofile -Command\
|
||||
"(Get-Content -Raw tags | Get-Unique | % {$$_ -replace \"`r\", \"\"}) |\
|
||||
New-Item -Force -Path . -ItemType file -Name tags"
|
||||
|
||||
doctags : doctags.c
|
||||
$(CC) doctags.c
|
||||
|
||||
|
||||
# Use Vim to generate the tags file. Can only be used when Vim has been
|
||||
# compiled and installed. Supports multiple languages.
|
||||
vimtags : $(DOCS)
|
||||
$(VIMEXE) --clean -esX -V1 -u doctags.vim
|
||||
|
||||
|
||||
|
||||
uganda.nsis.txt : uganda.*
|
||||
!powershell -nologo -noprofile -Command\
|
||||
$$ext=(Get-Item $?).Extension; (Get-Content $? ^| \
|
||||
% {$$_ -replace '\s*\*[-a-zA-Z0-9.]*\*', '' -replace 'vim:tw=78:.*', ''})\
|
||||
^| Set-Content $*$$ext
|
||||
!powershell -nologo -noprofile -Command\
|
||||
$$ext=(Get-Item $?).Extension;\
|
||||
(Get-Content -Raw $(@B)$$ext).Trim() -replace '(\r\n){3,}', '$$1$$1'\
|
||||
^| Set-Content $(@B)$$ext
|
||||
|
||||
|
||||
# TODO:
|
||||
#html: noerrors tags $(HTMLS)
|
||||
# if exist errors.log (more errors.log)
|
||||
|
||||
# TODO:
|
||||
#noerrors:
|
||||
# $(RM) errors.log
|
||||
|
||||
# TODO:
|
||||
#.txt.html:
|
||||
|
||||
|
||||
# TODO:
|
||||
#index.html: help.txt
|
||||
|
||||
|
||||
# TODO:
|
||||
#vimindex.html: index.txt
|
||||
|
||||
|
||||
# TODO:
|
||||
#tags.ref tags.html: tags
|
||||
|
||||
# Perl version of .txt to .html conversion.
|
||||
# There can't be two rules to produce a .html from a .txt file.
|
||||
# Just run over all .txt files each time one changes. It's fast anyway.
|
||||
perlhtml : tags $(DOCS)
|
||||
vim2html.pl tags $(DOCS)
|
||||
|
||||
# Check URLs in the help with "curl" or "powershell".
|
||||
test_urls :
|
||||
$(VIMEXE) -S test_urls.vim
|
||||
|
||||
clean :
|
||||
$(RM) doctags.exe doctags.obj
|
||||
$(RM) *.html vim-stylesheet.css
|
||||
|
||||
|
||||
|
||||
arabic.txt :
|
||||
$(TOUCH)
|
||||
|
||||
farsi.txt :
|
||||
$(TOUCH)
|
||||
|
||||
hebrew.txt :
|
||||
$(TOUCH)
|
||||
|
||||
russian.txt :
|
||||
$(TOUCH)
|
||||
|
||||
gui_w32.txt :
|
||||
$(TOUCH)
|
||||
|
||||
if_ole.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_390.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_amiga.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_beos.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_dos.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_haiku.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_mac.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_mint.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_msdos.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_os2.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_qnx.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_risc.txt :
|
||||
$(TOUCH)
|
||||
|
||||
os_win32.txt :
|
||||
$(TOUCH)
|
||||
|
||||
|
||||
convert-all : $(CONVERTED)
|
||||
!IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
|
||||
!ERROR The program "PowerShell" version 3.0 or higher is required to work
|
||||
!ENDIF
|
||||
|
||||
vim-da.UTF-8.1 : vim-da.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimdiff-da.UTF-8.1 : vimdiff-da.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimtutor-da.UTF-8.1 : vimtutor-da.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vim-de.UTF-8.1 : vim-de.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
evim-fr.UTF-8.1 : evim-fr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vim-fr.UTF-8.1 : vim-fr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimdiff-fr.UTF-8.1 : vimdiff-fr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimtutor-fr.UTF-8.1 : vimtutor-fr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t utf-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
xxd-fr.UTF-8.1 : xxd-fr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
evim-it.UTF-8.1 : evim-it.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vim-it.UTF-8.1 : vim-it.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimdiff-it.UTF-8.1 : vimdiff-it.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimtutor-it.UTF-8.1 : vimtutor-it.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
xxd-it.UTF-8.1 : xxd-it.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-1 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28591)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
evim-pl.UTF-8.1 : evim-pl.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vim-pl.UTF-8.1 : vim-pl.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimdiff-pl.UTF-8.1 : vimdiff-pl.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimtutor-pl.UTF-8.1 : vimtutor-pl.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
xxd-pl.UTF-8.1 : xxd-pl.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-2 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28592)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
evim-ru.UTF-8.1 : evim-ru.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vim-ru.UTF-8.1 : vim-ru.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimdiff-ru.UTF-8.1 : vimdiff-ru.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimtutor-ru.UTF-8.1 : vimtutor-ru.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
xxd-ru.UTF-8.1 : xxd-ru.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f KOI8-R -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(20866)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
evim-tr.UTF-8.1 : evim-tr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
! IF [powershell -nologo -noprofile "exit $$psversiontable.psversion.major"] == 2
|
||||
! ERROR Для работы требуется программа «PowerShell» версии 3.0 или выше
|
||||
! ENDIF
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vim-tr.UTF-8.1 : vim-tr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimdiff-tr.UTF-8.1 : vimdiff-tr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
vimtutor-tr.UTF-8.1 : vimtutor-tr.1
|
||||
!IF DEFINED (ICONV)
|
||||
$(ICONV) -f ISO-8859-9 -t UTF-8 $? >$@
|
||||
!ELSE
|
||||
# Conversion to UTF-8 encoding without BOM and with UNIX-like line ending
|
||||
powershell -nologo -noprofile -Command\
|
||||
[IO.File]::ReadAllText(\"$?\", [Text.Encoding]::GetEncoding(28599)) ^|\
|
||||
1>nul New-Item -Force -Path . -ItemType file -Name $@
|
||||
!ENDIF
|
||||
|
||||
|
||||
|
||||
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:
|
||||
@@ -1604,6 +1604,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
current working directory to the |$HOME| directory like in Unix.
|
||||
When off, those commands just print the current directory name.
|
||||
On Unix this option has no effect.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'cdpath'* *'cd'* *E344* *E346*
|
||||
@@ -5590,7 +5592,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< If you have less than 512 Mbyte |:mkspell| may fail for some
|
||||
languages, no matter what you set 'mkspellmem' to.
|
||||
|
||||
This option cannot be set from a |modeline| or in the |sandbox|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'modeline'* *'ml'* *'nomodeline'* *'noml'*
|
||||
'modeline' 'ml' boolean (Vim default: on (off for root),
|
||||
@@ -5992,6 +5995,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'packpath'* *'pp'*
|
||||
'packpath' 'pp' string (default: see 'runtimepath')
|
||||
Directories used to find packages. See |packages|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
|
||||
*'paragraphs'* *'para'*
|
||||
@@ -6076,6 +6081,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
feature}
|
||||
Expression which is evaluated to apply a patch to a file and generate
|
||||
the resulting new version of the file. See |diff-patchexpr|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'patchmode'* *'pm'* *E205* *E206*
|
||||
'patchmode' 'pm' string (default "")
|
||||
@@ -7158,6 +7165,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When 'shellxquote' is set to "(" then the characters listed in this
|
||||
option will be escaped with a '^' character. This makes it possible
|
||||
to execute most external commands with cmd.exe.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'shellxquote'* *'sxq'*
|
||||
'shellxquote' 'sxq' string (default: "";
|
||||
@@ -8214,6 +8223,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
function and an example. The value can be the name of a function, a
|
||||
|lambda| or a |Funcref|. See |option-value-function| for more
|
||||
information.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'taglength'* *'tl'*
|
||||
'taglength' 'tl' number (default 0)
|
||||
@@ -8973,6 +8984,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Setting 'verbosefile' to a new value is like making it empty first.
|
||||
The difference with |:redir| is that verbose messages are not
|
||||
displayed when 'verbosefile' is set.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'viewdir'* *'vdir'*
|
||||
'viewdir' 'vdir' string (default for Amiga: "home:vimfiles/view",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_gzip.txt* For Vim version 9.0. Last change: 2019 May 05
|
||||
*pi_gzip.txt* For Vim version 9.0. Last change: 2023 Nov 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -12,9 +12,17 @@ The functionality mentioned here is a |standard-plugin|.
|
||||
This plugin is only available if 'compatible' is not set.
|
||||
You can avoid loading this plugin by setting the "loaded_gzip" variable: >
|
||||
:let loaded_gzip = 1
|
||||
<
|
||||
*g:gzip_exec*
|
||||
|
||||
For security reasons, one may prevent that Vim runs executables automatically
|
||||
when opening a buffer. This option (default: "1") can be used to prevent
|
||||
executing the executables command when set to "0": >
|
||||
:let g:gzip_exec = 0
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
1. Autocommands *gzip-autocmd*
|
||||
2. Autocommands *gzip-autocmd*
|
||||
|
||||
The plugin installs autocommands to intercept reading and writing of files
|
||||
with these extensions:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_zip.txt* For Vim version 9.0. Last change: 2023 Mar 12
|
||||
*pi_zip.txt* For Vim version 9.0. Last change: 2023 Nov 05
|
||||
|
||||
+====================+
|
||||
| Zip File Interface |
|
||||
@@ -69,6 +69,13 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
This option specifies the program (and any options needed) used to
|
||||
extract a file from a zip archive. By default, >
|
||||
let g:zip_extractcmd= g:zip_unzipcmd
|
||||
<
|
||||
*g:zip_exec*
|
||||
For security reasons, one may prevent that Vim runs executables
|
||||
automatically when opening a buffer. This option (default: "1")
|
||||
can be used to prevent executing the "unzip" command when set to
|
||||
"0": >
|
||||
let g:zip_exec=0
|
||||
<
|
||||
PREVENTING LOADING~
|
||||
|
||||
|
||||
@@ -6758,6 +6758,8 @@ dircolors.vim syntax.txt /*dircolors.vim*
|
||||
dis motion.txt /*dis*
|
||||
disable-menus gui.txt /*disable-menus*
|
||||
discard editing.txt /*discard*
|
||||
dist#vim eval.txt /*dist#vim*
|
||||
dist#vim9 eval.txt /*dist#vim9*
|
||||
distribute-script usr_51.txt /*distribute-script*
|
||||
distributed-plugins usr_05.txt /*distributed-plugins*
|
||||
distribution intro.txt /*distribution*
|
||||
@@ -7422,6 +7424,7 @@ g:gnat.Project_File ft_ada.txt /*g:gnat.Project_File*
|
||||
g:gnat.Set_Project_File() ft_ada.txt /*g:gnat.Set_Project_File()*
|
||||
g:gnat.Tags() ft_ada.txt /*g:gnat.Tags()*
|
||||
g:gnat.Tags_Command ft_ada.txt /*g:gnat.Tags_Command*
|
||||
g:gzip_exec pi_gzip.txt /*g:gzip_exec*
|
||||
g:html_charset_override syntax.txt /*g:html_charset_override*
|
||||
g:html_diff_one_file syntax.txt /*g:html_diff_one_file*
|
||||
g:html_dynamic_folds syntax.txt /*g:html_dynamic_folds*
|
||||
@@ -7616,6 +7619,7 @@ g:vimsyn_minlines syntax.txt /*g:vimsyn_minlines*
|
||||
g:vimsyn_noerror syntax.txt /*g:vimsyn_noerror*
|
||||
g:yaml_schema syntax.txt /*g:yaml_schema*
|
||||
g:zipPlugin_ext pi_zip.txt /*g:zipPlugin_ext*
|
||||
g:zip_exec pi_zip.txt /*g:zip_exec*
|
||||
g:zip_extractcmd pi_zip.txt /*g:zip_extractcmd*
|
||||
g:zip_nomax pi_zip.txt /*g:zip_nomax*
|
||||
g:zip_shq pi_zip.txt /*g:zip_shq*
|
||||
@@ -10987,6 +10991,7 @@ vim-modes intro.txt /*vim-modes*
|
||||
vim-modes-intro intro.txt /*vim-modes-intro*
|
||||
vim-raku ft_raku.txt /*vim-raku*
|
||||
vim-script-intro usr_41.txt /*vim-script-intro*
|
||||
vim-script-library eval.txt /*vim-script-library*
|
||||
vim-use intro.txt /*vim-use*
|
||||
vim-variable eval.txt /*vim-variable*
|
||||
vim.b if_lua.txt /*vim.b*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 9.0. Last change: 2023 Oct 25
|
||||
*term.txt* For Vim version 9.0. Last change: 2023 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -332,11 +332,16 @@ using the "xterm" workaround. These are the relevant entries (so far):
|
||||
|
||||
XM "\033[?1006;1004;1000%?%p1%{1}%=%th%el%;"
|
||||
mouse enable / disable |t_XM|
|
||||
FE "\033[?1004h" enable focus event tracking |t_fe|
|
||||
FD "\033[?1004l" disable focus event tracking |t_fd|
|
||||
|
||||
The "XM" entry includes "1006" to enable SGR style mouse reporting. This
|
||||
supports columns above 223. It also includes "1004" which enables focus
|
||||
reporting. The t_fe and t_fd entries can be left empty (they don't have
|
||||
entries in terminfo/termcap anyway).
|
||||
reporting.
|
||||
Note: As of 2023, the "1004" is currently not used by Vim itself, instead
|
||||
it is recommended to set focus reporting independently of mouse tracking by
|
||||
the |t_fe| and |t_fd| entries, as ncurses also starts to use with the latest
|
||||
versions (and will then also end up in terminfo/termcap).
|
||||
|
||||
*xterm-kitty* *kitty-terminal*
|
||||
The Kitty terminal is a special case. Mainly because it works differently
|
||||
|
||||
@@ -6,21 +6,41 @@
|
||||
" Written by Christian Brabandt.
|
||||
|
||||
func Test_check_URLs()
|
||||
"20.10.23, added by Restorer
|
||||
if has("win32")
|
||||
echoerr "Doesn't work on MS-Windows"
|
||||
return
|
||||
let s:outdev = 'nul'
|
||||
else
|
||||
let s:outdev = '/dev/null'
|
||||
endif
|
||||
" Restorer: For Windows users. If "curl" or "weget" is installed on the system
|
||||
" but not in %PATH%, add the full routes for them to this environment variable.
|
||||
if executable('curl')
|
||||
" Note: does not follow redirects!
|
||||
let s:command = 'curl --silent --fail --output /dev/null --head '
|
||||
let s:command1 = 'curl --silent --fail --output ' ..s:outdev.. ' --head '
|
||||
let s:command2 = ""
|
||||
elseif executable('wget')
|
||||
" Note: only allow a couple of redirects
|
||||
let s:command = 'wget --quiet -S --spider --max-redirect=2 --timeout=5 --tries=2 -O /dev/null '
|
||||
let s:command1 = 'wget --quiet -S --spider --max-redirect=2 --timeout=5 --tries=2 -O ' ..s:outdev.. ' '
|
||||
let s:command2 = ""
|
||||
elseif has("win32") "20.10.23, added by Restorer
|
||||
if executable('powershell')
|
||||
if 2 == system('powershell -nologo -noprofile "$psversiontable.psversion.major"')
|
||||
echoerr 'To work in OS Windows requires the program "PowerShell" version 3.0 or higher'
|
||||
return
|
||||
endif
|
||||
let s:command1 =
|
||||
\ "powershell -nologo -noprofile \"{[Net.ServicePointManager]::SecurityProtocol = 'Tls12, Tls11, Tls, Ssl3'};try{(Invoke-WebRequest -MaximumRedirection 2 -TimeoutSec 5 -Uri "
|
||||
let s:command2 = ').StatusCode}catch{exit [int]$Error[0].Exception.Status}"'
|
||||
endif
|
||||
else
|
||||
echoerr 'Only works when "curl" or "wget" is available'
|
||||
echoerr 'Only works when "curl" or "wget", or "powershell" is available'
|
||||
return
|
||||
endif
|
||||
|
||||
" Do the testing.
|
||||
set report =999
|
||||
set nomore shm +=s
|
||||
|
||||
let pat='\(https\?\|ftp\)://[^\t* ]\+'
|
||||
exe 'helpgrep' pat
|
||||
helpclose
|
||||
@@ -36,22 +56,21 @@ func Test_check_URLs()
|
||||
put =urls
|
||||
" remove some more invalid items
|
||||
" empty lines
|
||||
v/./d
|
||||
"20.10.23, Restorer: '_' is a little faster, see `:h global`
|
||||
v/./d _
|
||||
" remove # anchors
|
||||
%s/#.*$//e
|
||||
" remove trailing stuff (parenthesis, dot, comma, quotes), but only for HTTP
|
||||
" links
|
||||
g/^h/s#[.,)'"/>][:.]\?$##
|
||||
g#^[hf]t\?tp:/\(/\?\.*\)$#d
|
||||
silent! g/ftp://,$/d
|
||||
silent! g/=$/d
|
||||
g/^h/s#[.),'"`/>][:.,]\?$##
|
||||
g#^[hf]t\?tp:/\(/\?\.*\)$#d _
|
||||
silent! g/ftp://,$/d _
|
||||
silent! g/=$/d _
|
||||
let a = getline(1,'$')
|
||||
let a = uniq(sort(a))
|
||||
%d
|
||||
%d _
|
||||
call setline(1, a)
|
||||
|
||||
" Do the testing.
|
||||
set nomore
|
||||
%s/.*/\=TestURL(submatch(0))/
|
||||
|
||||
" highlight the failures
|
||||
@@ -61,8 +80,10 @@ endfunc
|
||||
func TestURL(url)
|
||||
" Relies on the return code to determine whether a page is valid
|
||||
echom printf("Testing URL: %d/%d %s", line('.'), line('$'), a:url)
|
||||
call system(s:command . shellescape(a:url))
|
||||
call system(s:command1 .. shellescape(a:url) .. s:command2)
|
||||
return printf("%s %d", a:url, v:shell_error)
|
||||
endfunc
|
||||
|
||||
call Test_check_URLs()
|
||||
|
||||
" vim: sw=2 sts=2 et
|
||||
|
||||
@@ -6,11 +6,21 @@
|
||||
# Sun Feb 24 14:49:17 CET 2002
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use vars qw/%url $date/;
|
||||
|
||||
%url = ();
|
||||
$date = `date`;
|
||||
chop $date;
|
||||
# 30.11.23, Restorer:
|
||||
# This command does not work in OS Windows.
|
||||
# The "date" command in Windows is different from its counterpart in UNIX-like systems.
|
||||
# The closest analog is the "date /t" command, but how it would work in UNIX,
|
||||
# I don't know. I've corrected it as best I can. I don't know Perl.
|
||||
#$date = `date`;
|
||||
#chop $date;
|
||||
my ($year) = 1900 + (localtime())[5];
|
||||
my ($month) = 1 + (localtime())[4];
|
||||
my ($day) = (localtime())[3];
|
||||
#$date = localtime(); # outputs like this Fri Nov 3 00:56:59 2023
|
||||
|
||||
sub maplink
|
||||
{
|
||||
@@ -164,7 +174,7 @@ EOF
|
||||
}
|
||||
print OUT<<EOF;
|
||||
</pre>
|
||||
<p><i>Generated by vim2html on $date</i></p>
|
||||
<p><i>Generated by vim2html on $day.$month.$year</i></p>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
@@ -411,6 +411,8 @@ prefix when defining the method: >
|
||||
abstract static def SetColor()
|
||||
endclass
|
||||
<
|
||||
A static method in an abstract class cannot be an abstract method.
|
||||
|
||||
*E1373*
|
||||
A class extending the abstract class must implement all the abstract methods.
|
||||
The signature (arguments, argument types and return type) must be exactly the
|
||||
|
||||
@@ -37,8 +37,8 @@ if exists("g:awk_is_gawk")
|
||||
let b:undo_ftplugin .= " | setl fp<"
|
||||
endif
|
||||
|
||||
" Disabled by default for security reasons.
|
||||
if get(g:, 'awk_exec', get(g:, 'plugin_exec', 0))
|
||||
" Disabled by default for security reasons.
|
||||
if dist#vim#IsSafeExecutable('awk', 'gawk')
|
||||
let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'")
|
||||
let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd
|
||||
let path = substitute(path, ':', ',', 'g')
|
||||
|
||||
@@ -57,8 +57,8 @@ if &filetype == 'changelog'
|
||||
endif
|
||||
let s:default_login = 'unknown'
|
||||
|
||||
" Disabled by default for security reasons.
|
||||
if get(g:, 'changelog_exec', get(g:, 'plugin_exec', 0))
|
||||
" Disabled by default for security reasons.
|
||||
if dist#vim#IsSafeExecutable('changelog', 'whoami')
|
||||
let login = s:login()
|
||||
else
|
||||
let login = s:default_login
|
||||
|
||||
@@ -56,12 +56,8 @@ endif
|
||||
|
||||
" Set this once, globally.
|
||||
if !exists("perlpath")
|
||||
let s:tmp_cwd = getcwd()
|
||||
" safety check: don't execute perl binary by default
|
||||
if executable("perl") && get(g:, 'perl_exec', get(g:, 'plugin_exec', 0))
|
||||
\ && (fnamemodify(exepath("perl"), ":p:h") != s:tmp_cwd
|
||||
\ || (index(split($PATH, has("win32") ? ';' : ':'), s:tmp_cwd) != -1
|
||||
\ && s:tmp_cwd != '.'))
|
||||
if dist#vim#IsSafeExecutable('perl', 'perl')
|
||||
try
|
||||
if &shellxquote != '"'
|
||||
let perlpath = system('perl -e "print join(q/,/,@INC)"')
|
||||
@@ -77,7 +73,6 @@ if !exists("perlpath")
|
||||
" current directory and the directory of the current file.
|
||||
let perlpath = ".,,"
|
||||
endif
|
||||
unlet! s:tmp_cwd
|
||||
endif
|
||||
|
||||
" Append perlpath to the existing path value, if it is set. Since we don't
|
||||
|
||||
@@ -41,16 +41,13 @@ let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'
|
||||
|
||||
" Safety check: don't execute zig from current directory
|
||||
if !exists('g:zig_std_dir') && exists('*json_decode') &&
|
||||
\ executable('zig') && get(g:, 'zig_exec', get(g:, 'plugin_exec', 0))
|
||||
\ && (fnamemodify(exepath("zig"), ":p:h") != s:tmp_cwd
|
||||
\ || (index(split($PATH,has("win32")? ';' : ':'), s:tmp_cwd) != -1 && s:tmp_cwd != '.'))
|
||||
\ executable('zig') && dist#vim#IsSafeExecutable('zig', 'zig')
|
||||
silent let s:env = system('zig env')
|
||||
if v:shell_error == 0
|
||||
let g:zig_std_dir = json_decode(s:env)['std_dir']
|
||||
endif
|
||||
unlet! s:env
|
||||
endif
|
||||
unlet! s:tmp_cwd
|
||||
|
||||
if exists('g:zig_std_dir')
|
||||
let &l:path = g:zig_std_dir . ',' . &l:path
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim Keymap file for Arabic
|
||||
" Maintainer : Arabic Support group <support-at-arabeyes.org>
|
||||
" Created by : Nadim Shaikli <nadim-at-arabeyes.org>
|
||||
" Last Updated : 2003 Apr 26
|
||||
" Last Updated : 2023-10-27
|
||||
" This is for a standard Microsoft Arabic keyboard layout.
|
||||
|
||||
" Use this short name in the status line.
|
||||
@@ -41,16 +41,6 @@ m <char-0x0629> " (1577) - TEH MARBUTA
|
||||
, <char-0x0648> " (1608) - WAW
|
||||
. <char-0x0632> " (1586) - ZAIN
|
||||
/ <char-0x0638> " (1592) - ZAH
|
||||
0 <char-0x0660> " (1632) - Arabic 0
|
||||
1 <char-0x0661> " (1633) - Arabic 1
|
||||
2 <char-0x0662> " (1634) - Arabic 2
|
||||
3 <char-0x0663> " (1635) - Arabic 3
|
||||
4 <char-0x0664> " (1636) - Arabic 4
|
||||
5 <char-0x0665> " (1637) - Arabic 5
|
||||
6 <char-0x0666> " (1638) - Arabic 6
|
||||
7 <char-0x0667> " (1639) - Arabic 7
|
||||
8 <char-0x0668> " (1640) - Arabic 8
|
||||
9 <char-0x0669> " (1641) - Arabic 9
|
||||
` <char-0x0630> " (1584) - THAL
|
||||
~ <char-0x0651> " (1617) - Tanween -- SHADDA
|
||||
Q <char-0x064e> " (1614) - Tanween -- FATHA
|
||||
|
||||
@@ -140,7 +140,7 @@ syn cluster shArithList contains=@shArithParenList,shParenError
|
||||
syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange
|
||||
syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shComment,shDblBrace,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shCaseList add=shForPP
|
||||
syn cluster shCaseList add=shForPP,shDblParen
|
||||
endif
|
||||
syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial
|
||||
@@ -163,7 +163,7 @@ syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shWrapLin
|
||||
syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo
|
||||
syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch
|
||||
if exists("b:is_kornshell") || exists("b:is_bash")
|
||||
syn cluster shLoopoList add=shForPP
|
||||
syn cluster shLoopList add=shForPP,shDblParen
|
||||
endif
|
||||
syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable
|
||||
syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm
|
||||
@@ -531,7 +531,7 @@ if exists("b:is_kornshell") || exists("b:is_posix")
|
||||
endif
|
||||
|
||||
" sh ksh bash : ${var[... ]...} array reference: {{{1
|
||||
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError
|
||||
syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError,shDerefOffset
|
||||
|
||||
" Special ${parameter OPERATOR word} handling: {{{1
|
||||
" sh ksh bash : ${parameter:-word} word is default value
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Debian version information
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Last Change: 2023 Oct 11
|
||||
" Last Change: 2023 Nov 01
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/shared/debversions.vim
|
||||
|
||||
let s:cpo = &cpo
|
||||
@@ -11,7 +11,7 @@ let g:debSharedSupportedVersions = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
|
||||
\ 'bullseye', 'bookworm', 'trixie', 'forky',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'lunar', 'mantic',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'lunar', 'mantic', 'noble',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let g:debSharedUnsupportedVersions = [
|
||||
|
||||
@@ -1272,7 +1272,7 @@ $(XPM_OBJ) $(OUTDIR)\version.obj $(LINKARGS2)
|
||||
$(VIM): $(VIM).exe
|
||||
|
||||
$(OUTDIR):
|
||||
if not exist $(OUTDIR)/nul mkdir $(OUTDIR)
|
||||
if not exist $(OUTDIR)/nul mkdir $(OUTDIR:/=\)
|
||||
|
||||
CFLAGS_INST = /nologo /O2 -DNDEBUG -DWIN32 -DWINVER=$(WINVER) -D_WIN32_WINNT=$(WINVER) $(CFLAGS_DEPR)
|
||||
|
||||
|
||||
44
src/auto/configure
vendored
44
src/auto/configure
vendored
@@ -836,6 +836,7 @@ with_luajit
|
||||
enable_mzschemeinterp
|
||||
with_plthome
|
||||
enable_perlinterp
|
||||
with_xsubpp
|
||||
enable_pythoninterp
|
||||
with_python_command
|
||||
with_python_config_dir
|
||||
@@ -1569,6 +1570,7 @@ Optional Packages:
|
||||
--with-lua-prefix=PFX Prefix where Lua is installed.
|
||||
--with-luajit Link with LuaJIT instead of Lua.
|
||||
--with-plthome=PLTHOME Use PLTHOME.
|
||||
--with-xsubpp=PATH path to the xsubpp command
|
||||
--with-python-command=NAME name of the Python 2 command (default: python2 or python)
|
||||
--with-python-config-dir=PATH Python's config directory (deprecated)
|
||||
--with-python3-command=NAME name of the Python 3 command (default: python3 or python)
|
||||
@@ -6455,12 +6457,42 @@ printf "%s\n" "OK" >&6; }
|
||||
vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
|
||||
|
||||
vi_cv_perl_extutils=unknown_perl_extutils_path
|
||||
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
|
||||
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
|
||||
if test -f "$xsubpp_path"; then
|
||||
vi_cv_perl_xsubpp="$xsubpp_path"
|
||||
fi
|
||||
done
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking --with-xsubpp path" >&5
|
||||
printf %s "checking --with-xsubpp path... " >&6; }
|
||||
vi_cv_perl_xsubpp=
|
||||
|
||||
# Check whether --with-xsubpp was given.
|
||||
if test ${with_xsubpp+y}
|
||||
then :
|
||||
withval=$with_xsubpp;
|
||||
if test -f "$withval"
|
||||
then
|
||||
vi_cv_perl_xsubpp="$withval"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if test "x$vi_cv_perl_xsubpp" = "x"
|
||||
then
|
||||
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
|
||||
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
|
||||
if test -f "$xsubpp_path"; then
|
||||
vi_cv_perl_xsubpp="$xsubpp_path"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test "x$vi_cv_perl_xsubpp" = "x"
|
||||
then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: empty" >&5
|
||||
printf "%s\n" "empty" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $vi_cv_perl_xsubpp" >&5
|
||||
printf "%s\n" "$vi_cv_perl_xsubpp" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \
|
||||
-e 'ccflags;perl_inc;print"\n"' | sed -e 's/-fno[^ ]*//' \
|
||||
|
||||
@@ -1132,13 +1132,34 @@ if test "$enable_perlinterp" = "yes" -o "$enable_perlinterp" = "dynamic"; then
|
||||
vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlibexp}'`
|
||||
AC_SUBST(vi_cv_perllib)
|
||||
vi_cv_perl_extutils=unknown_perl_extutils_path
|
||||
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
|
||||
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
|
||||
if test -f "$xsubpp_path"; then
|
||||
vi_cv_perl_xsubpp="$xsubpp_path"
|
||||
fi
|
||||
done
|
||||
|
||||
AC_MSG_CHECKING(--with-xsubpp path)
|
||||
vi_cv_perl_xsubpp=
|
||||
AC_ARG_WITH(xsubpp, [ --with-xsubpp=PATH path to the xsubpp command], [
|
||||
if test -f "$withval"
|
||||
then
|
||||
vi_cv_perl_xsubpp="$withval"
|
||||
fi
|
||||
])
|
||||
|
||||
if test "x$vi_cv_perl_xsubpp" = "x"
|
||||
then
|
||||
for extutils_rel_path in ExtUtils vendor_perl/ExtUtils; do
|
||||
xsubpp_path="$vi_cv_perllib/$extutils_rel_path/xsubpp"
|
||||
if test -f "$xsubpp_path"; then
|
||||
vi_cv_perl_xsubpp="$xsubpp_path"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test "x$vi_cv_perl_xsubpp" = "x"
|
||||
then
|
||||
AC_MSG_RESULT(empty)
|
||||
else
|
||||
AC_MSG_RESULT($vi_cv_perl_xsubpp)
|
||||
fi
|
||||
AC_SUBST(vi_cv_perl_xsubpp)
|
||||
|
||||
dnl Remove "-fno-something", it breaks using cproto.
|
||||
dnl Remove "-fdebug-prefix-map", it isn't supported by clang.
|
||||
dnl Remove "FORTIFY_SOURCE", it will be defined twice.
|
||||
|
||||
@@ -3494,8 +3494,8 @@ EXTERN char e_duplicate_variable_str[]
|
||||
INIT(= N_("E1369: Duplicate variable: %s"));
|
||||
EXTERN char e_cannot_define_new_method_as_static[]
|
||||
INIT(= N_("E1370: Cannot define a \"new\" method as static"));
|
||||
EXTERN char e_abstract_must_be_followed_by_def_or_static[]
|
||||
INIT(= N_("E1371: Abstract must be followed by \"def\" or \"static\""));
|
||||
EXTERN char e_abstract_must_be_followed_by_def[]
|
||||
INIT(= N_("E1371: Abstract must be followed by \"def\""));
|
||||
EXTERN char e_abstract_method_in_concrete_class[]
|
||||
INIT(= N_("E1372: Abstract method \"%s\" cannot be defined in a concrete class"));
|
||||
EXTERN char e_abstract_method_str_not_found[]
|
||||
@@ -3560,8 +3560,10 @@ EXTERN char e_using_typealias_as_string[]
|
||||
INIT(= N_("E1402: Using type alias \"%s\" as a String"));
|
||||
EXTERN char e_using_typealias_as_value[]
|
||||
INIT(= N_("E1403: Type alias \"%s\" cannot be used as a value"));
|
||||
EXTERN char e_abstract_cannot_be_used_in_interface[]
|
||||
INIT(= N_("E1404: Abstract cannot be used in an interface"));
|
||||
#endif
|
||||
// E1404 - E1499 unused (reserved for Vim9 class support)
|
||||
// E1405 - E1499 unused (reserved for Vim9 class support)
|
||||
EXTERN char e_cannot_mix_positional_and_non_positional_str[]
|
||||
INIT(= N_("E1500: Cannot mix positional and non-positional arguments: %s"));
|
||||
EXTERN char e_fmt_arg_nr_unused_str[]
|
||||
|
||||
@@ -3080,7 +3080,7 @@ info_add_completion_info(list_T *li)
|
||||
|
||||
// Skip the element with the CP_ORIGINAL_TEXT flag at the beginning, in case of
|
||||
// forward completion, or at the end, in case of backward completion.
|
||||
match = forward ? match->cp_next : (compl_no_select ? match->cp_prev : match->cp_prev->cp_prev);
|
||||
match = forward ? match->cp_next : (compl_no_select && match_at_original_text(match) ? match->cp_prev : match->cp_prev->cp_prev);
|
||||
|
||||
while (match != NULL && !match_at_original_text(match))
|
||||
{
|
||||
|
||||
16
src/option.c
16
src/option.c
@@ -3680,7 +3680,6 @@ did_set_modifiable(optset_T *args UNUSED)
|
||||
&& curbuf->b_term != NULL && !term_is_finished(curbuf))))
|
||||
{
|
||||
curbuf->b_p_ma = FALSE;
|
||||
args->os_doskip = TRUE;
|
||||
return e_cannot_make_terminal_with_running_job_modifiable;
|
||||
}
|
||||
# endif
|
||||
@@ -3942,7 +3941,6 @@ did_set_previewwindow(optset_T *args)
|
||||
if (win->w_p_pvw && win != curwin)
|
||||
{
|
||||
curwin->w_p_pvw = FALSE;
|
||||
args->os_doskip = TRUE;
|
||||
return e_preview_window_already_exists;
|
||||
}
|
||||
|
||||
@@ -4081,11 +4079,9 @@ did_set_showtabline(optset_T *args UNUSED)
|
||||
char *
|
||||
did_set_smoothscroll(optset_T *args UNUSED)
|
||||
{
|
||||
if (curwin->w_p_sms)
|
||||
return NULL;
|
||||
if (!curwin->w_p_sms)
|
||||
curwin->w_skipcol = 0;
|
||||
|
||||
curwin->w_skipcol = 0;
|
||||
changed_line_abv_curs();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -4132,7 +4128,6 @@ did_set_termguicolors(optset_T *args UNUSED)
|
||||
!has_vtp_working())
|
||||
{
|
||||
p_tgc = 0;
|
||||
args->os_doskip = TRUE;
|
||||
return e_24_bit_colors_are_not_supported_on_this_environment;
|
||||
}
|
||||
if (is_term_win32())
|
||||
@@ -4535,9 +4530,12 @@ did_set_winwidth(optset_T *args UNUSED)
|
||||
char *
|
||||
did_set_wrap(optset_T *args UNUSED)
|
||||
{
|
||||
// If 'wrap' is set, set w_leftcol to zero.
|
||||
// Set w_leftcol or w_skipcol to zero.
|
||||
if (curwin->w_p_wrap)
|
||||
curwin->w_leftcol = 0;
|
||||
else
|
||||
curwin->w_skipcol = 0;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -4601,7 +4599,7 @@ set_bool_option(
|
||||
args.os_newval.boolean = value;
|
||||
args.os_errbuf = NULL;
|
||||
errmsg = options[opt_idx].opt_did_set_cb(&args);
|
||||
if (args.os_doskip)
|
||||
if (errmsg != NULL)
|
||||
return errmsg;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: RuVim_0.9001968.011023\n"
|
||||
"Project-Id-Version: RuVim_0.9002091.051123\n"
|
||||
"Report-Msgid-Bugs-To: The Vim Project, <vim-dev@vim.org>\n"
|
||||
"POT-Creation-Date: 2023-10-01 11:51+0300\n"
|
||||
"PO-Revision-Date: 2023-10-01 11:57+0300\n"
|
||||
"POT-Creation-Date: 2023-11-05 18:50+0300\n"
|
||||
"PO-Revision-Date: 2023-11-05 19:57+0300\n"
|
||||
"Last-Translator: Restorer, <restorer@mail2k.ru>\n"
|
||||
"Language-Team: RuVim, https://github.com/RestorerZ/RuVim\n"
|
||||
"Language: ru_RU\n"
|
||||
@@ -439,7 +439,7 @@ msgstr "[
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using custom opslimit \"%llu\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применено нестандартное значение opslimit "
|
||||
"XChaCha20v2: для получения ключа применено нестандартное значение opslimit "
|
||||
"\"%llu\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
@@ -447,7 +447,7 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using default opslimit \"%llu\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применено стандартное значение opslimit "
|
||||
"XChaCha20v2: для получения ключа применено стандартное значение opslimit "
|
||||
"\"%llu\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
@@ -455,7 +455,7 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using custom memlimit \"%lu\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применено нестандартное значение memlimit "
|
||||
"XChaCha20v2: для получения ключа применено нестандартное значение memlimit "
|
||||
"\"%lu\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
@@ -463,7 +463,7 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using default memlimit \"%lu\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применено стандартное значение memlimit "
|
||||
"XChaCha20v2: для получения ключа применено стандартное значение memlimit "
|
||||
"\"%lu\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
@@ -471,13 +471,13 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using custom algorithm \"%d\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применён нестандартный алгоритм \"%d\""
|
||||
"XChaCha20v2: для получения ключа применён нестандартный алгоритм \"%d\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using default algorithm \"%d\" for Key derivation."
|
||||
msgstr "xChaCha20v2: для получения ключа применён стандартный алгоритм \"%d\""
|
||||
msgstr "XChaCha20v2: для получения ключа применён стандартный алгоритм \"%d\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "Entering Debug mode. Type \"cont\" to continue."
|
||||
@@ -911,8 +911,7 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "Entering Ex mode. Type \"visual\" to go to Normal mode."
|
||||
msgstr ""
|
||||
"Переключение в Ex-режим. Чтобы переключить в режим команд, наберите \"visual"
|
||||
"\""
|
||||
"Переключение в Ex-режим. Чтобы переключить в режим команд, наберите :visual"
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>=9
|
||||
# ~!: earlier
|
||||
@@ -2212,7 +2211,7 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "'-nb' cannot be used: not enabled at compile time\n"
|
||||
msgstr ""
|
||||
"Недопустимый аргумент командной строки '-nb'. Отключено при компиляции\n"
|
||||
"Неподдерживаемый аргумент командной строки -nb. Отключено при компиляции\n"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "This Vim was not compiled with the diff feature."
|
||||
@@ -2351,7 +2350,7 @@ msgstr "-unregister\t\t
|
||||
|
||||
# ~!: earlier
|
||||
msgid "-g\t\t\tRun using GUI (like \"gvim\")"
|
||||
msgstr "-g\t\t\tЗапуск программы с графическим интерфейсом (как \"gVim\")"
|
||||
msgstr "-g\t\t\tЗапуск программы с графическим интерфейсом (как \"gvim\")"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "-f or --nofork\tForeground: Don't fork when starting GUI"
|
||||
@@ -2452,7 +2451,7 @@ msgstr "-f\t\t\t
|
||||
# :!~ Restorer
|
||||
msgid "-dev <device>\t\tUse <device> for I/O"
|
||||
msgstr ""
|
||||
"-dev <устройство>\tИспользовать для ввода-вывода указанное <устройство>"
|
||||
"-dev <устройство>\tИспользовать для операций ввода-вывода данное <устройство>"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "-A\t\t\tStart in Arabic mode"
|
||||
@@ -2562,7 +2561,7 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "--remote-silent <files> Same, don't complain if there is no server"
|
||||
msgstr ""
|
||||
"--remote-silent <файлы> То же, но без сообщений при отсутствии сервера"
|
||||
"--remote-silent <файлы> То же, но не сообщать о недоступности сервера"
|
||||
|
||||
# #Restorer: добавил пару пробельных символов, дабы подравнять сообщение
|
||||
# ~!: earlier
|
||||
@@ -2575,9 +2574,8 @@ msgstr ""
|
||||
msgid ""
|
||||
"--remote-wait-silent <files> Same, don't complain if there is no server"
|
||||
msgstr ""
|
||||
"--remote-wait-silent <файлы> То же, но без сообщений при отсутствии сервера"
|
||||
"--remote-wait-silent <файлы> То же, но не сообщать о недоступности сервера"
|
||||
|
||||
# #Restorer: добавил пару пробельных символов, дабы подравнять сообщение
|
||||
# :!~ Restorer
|
||||
msgid ""
|
||||
"--remote-tab[-wait][-silent] <files> As --remote but use tab page per file"
|
||||
@@ -2643,7 +2641,7 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "-display <display>\tRun Vim on <display>"
|
||||
msgstr ""
|
||||
"-display <display>\tЗапуск программы с подключением к указанному X-серверу"
|
||||
"-display <X-сервер>\tЗапуск программы с подключением к указанному X-серверу"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "-iconic\t\tStart Vim iconified"
|
||||
@@ -2660,7 +2658,8 @@ msgstr "-foreground <
|
||||
# #Restorer: убрал один \t, чтобы выглядело единообразно
|
||||
# :!~ Restorer
|
||||
msgid "-font <font>\t\tUse <font> for normal text (also: -fn)"
|
||||
msgstr "-font <шрифт>\tНазначить указанный <шрифт> для обычного текста ( -fn)"
|
||||
msgstr ""
|
||||
"-font <шрифт>\tНазначить указанный <шрифт> для обычного текста (или -fn)"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "-boldfont <font>\tUse <font> for bold text"
|
||||
@@ -2932,7 +2931,7 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "??? from here until ???END lines may have been inserted/deleted"
|
||||
msgstr ""
|
||||
"Строки, которые были добавлены или удалены, помещены между метками ??? и ???"
|
||||
"Строки, которые были вставлены или удалены, помещены между метками ??? и ???"
|
||||
"END"
|
||||
|
||||
# :!~ Restorer
|
||||
@@ -3161,9 +3160,8 @@ msgid ""
|
||||
" file when making changes. Quit, or continue with caution.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"(1) Возможно, редактирование этого же файла выполняется в другой программе "
|
||||
"на\n"
|
||||
" этом же компьютере или по сетевому подключению.\n"
|
||||
"(1) Возможно, редактирование этого же файла выполняется в другой программе\n"
|
||||
" на этом же компьютере или по сетевому подключению.\n"
|
||||
"\n"
|
||||
"В этом случае лучше не редактировать этот файл или делать это "
|
||||
"осмотрительно,\n"
|
||||
@@ -5387,7 +5385,8 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid " for Vim defaults "
|
||||
msgstr ""
|
||||
" возможности редактора Vim"
|
||||
" возможности редактора "
|
||||
"Vim "
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "Sponsor Vim development!"
|
||||
@@ -5402,16 +5401,14 @@ msgstr "
|
||||
# :!~ Restorer
|
||||
msgid "type :help sponsor<Enter> for information "
|
||||
msgstr ""
|
||||
"наберите :help sponsor<ENTER> чтобы узнать об этом "
|
||||
"подробнее "
|
||||
"наберите :help sponsor<ENTER> чтобы узнать об этом подробнее "
|
||||
|
||||
# #Restorer: пробелы не убирать, сделано для выравнивания сообщений
|
||||
# #Restorer: выравнивается по самому длинному подобному сообщению
|
||||
# :!~ Restorer
|
||||
msgid "type :help register<Enter> for information "
|
||||
msgstr ""
|
||||
"наберите :help register<ENTER> чтобы узнать об этом "
|
||||
"подробнее "
|
||||
"наберите :help register<ENTER> чтобы узнать об этом подробнее "
|
||||
|
||||
# #Restorer: пробелы не убирать, сделано для выравнивания сообщений
|
||||
# #Restorer: выравнивается по самому длинному подобному сообщению
|
||||
@@ -5799,7 +5796,7 @@ msgstr "E35:
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E36: Not enough room"
|
||||
msgstr "E36: Не достаточно места для создания нового окна"
|
||||
msgstr "E36: Недостаточно места для создания нового окна"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E37: No write since last change"
|
||||
@@ -6237,7 +6234,8 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "E135: *Filter* Autocommands must not change current buffer"
|
||||
msgstr ""
|
||||
"E135: Автокоманды по событиям *Filter* не должны изменять текущий буфер"
|
||||
"E135: Действия автокоманд по событиям *Filter* не должны изменять текущий "
|
||||
"буфер"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E136: viminfo: Too many errors, skipping rest of file"
|
||||
@@ -6549,12 +6547,13 @@ msgstr "E199:
|
||||
# :!~ Restorer
|
||||
msgid "E200: *ReadPre autocommands made the file unreadable"
|
||||
msgstr ""
|
||||
"E200: В результате действий автокоманд по событию *ReadPre файл стал нечитаем"
|
||||
"E200: В результате действий автокоманд по событиям *ReadPre файл стал "
|
||||
"нечитаем"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E201: *ReadPre autocommands must not change current buffer"
|
||||
msgstr ""
|
||||
"E201: Действия автокоманд для событий *ReadPre не должны изменять текущий "
|
||||
"E201: Действия автокоманд по событиям *ReadPre не должны изменять текущий "
|
||||
"буфер"
|
||||
|
||||
# :!~ Restorer
|
||||
@@ -7226,7 +7225,7 @@ msgstr "E359:
|
||||
msgid "E360: Cannot execute shell with -f option"
|
||||
msgstr ""
|
||||
"E360: Не удалось вызвать командную оболочку. Программа запущена с аргументом "
|
||||
"'-f'"
|
||||
"-f"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E362: Using a boolean value as a Float"
|
||||
@@ -8770,8 +8769,9 @@ msgstr ""
|
||||
"выражения"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E689: Can only index a List, Dictionary or Blob"
|
||||
msgstr "E689: Индекс разрешён только для типа данных List, Dictionary или BLOB"
|
||||
#, c-format
|
||||
msgid "E689: Index not allowed after a %s: %s"
|
||||
msgstr "E689: Не допускается указание индекса для типа данных %s в %s"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E690: Missing \"in\" after :for"
|
||||
@@ -10694,7 +10694,7 @@ msgstr "E1088:
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1089: Unknown variable: %s"
|
||||
msgstr "E1089: Не распознана переменная %s"
|
||||
msgstr "E1089: Не распознана переменная \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -10704,7 +10704,7 @@ msgstr "E1090:
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1091: Function is not compiled: %s"
|
||||
msgstr "E1091: Некомпилированная функция %s"
|
||||
msgstr "E1091: Некомпилированная функция \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1092: Cannot nest :redir"
|
||||
@@ -11188,7 +11188,7 @@ msgstr[2] "E1190:
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1191: Call to function that failed to compile: %s"
|
||||
msgstr "E1191: Ошибка компиляции при обращении к функции %s"
|
||||
msgstr "E1191: Обращение к некомпилированной функции \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1192: Empty function name"
|
||||
@@ -11197,8 +11197,7 @@ msgstr "E1192:
|
||||
# :!~ Restorer
|
||||
msgid "E1193: cryptmethod xchacha20 not built into this Vim"
|
||||
msgstr ""
|
||||
"E1193: Алгоритм шифрования «XChaCha20» не поддерживается в данной программе "
|
||||
"Vim"
|
||||
"E1193: Алгоритм шифрования «XChaCha20» не поддерживается в данной версии Vim"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1194: Cannot encrypt header, not enough space"
|
||||
@@ -11239,8 +11238,8 @@ msgstr "E1202:
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1203: Dot can only be used on a dictionary: %s"
|
||||
msgstr "E1203: Символ точка используется только в типе данных Dictionary %s"
|
||||
msgid "E1203: Dot not allowed after a %s: %s"
|
||||
msgstr "E1203: Не допускается символ точки для типа данных %s в %s"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -11817,38 +11816,38 @@ msgid "E1318: Not a valid command in a class: %s"
|
||||
msgstr "E1318: Недопустимая команда в объявлении класса %s"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1319: Using a class as a Number"
|
||||
msgid "E1319: Using a Class as a Number"
|
||||
msgstr "E1319: Ожидался тип данных Number, а получен Class"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1320: Using an object as a Number"
|
||||
msgid "E1320: Using an Object as a Number"
|
||||
msgstr "E1320: Ожидался тип данных Number, а получен Object"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1321: Using a class as a Float"
|
||||
msgid "E1321: Using a Class as a Float"
|
||||
msgstr "E1321: Ожидался тип данных Float, а получен Class"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1322: Using an object as a Float"
|
||||
msgid "E1322: Using an Object as a Float"
|
||||
msgstr "E1322: Ожидался тип данных Float, а получен Object"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1323: Using a class as a String"
|
||||
msgid "E1323: Using a Class as a String"
|
||||
msgstr "E1323: Ожидался тип данных String, а получен Class"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1324: Using an object as a String"
|
||||
msgid "E1324: Using an Object as a String"
|
||||
msgstr "E1324: Ожидался тип данных String, а получен Object"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1325: Method not found on class \"%s\": %s"
|
||||
msgstr "E1325: У класса \"%s\" отсутствует метод %s"
|
||||
msgid "E1325: Method \"%s\" not found in class \"%s\""
|
||||
msgstr "E1325: У класса \"%2$s\" отсутствует метод \"%1$s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1326: Variable not found on object \"%s\": %s"
|
||||
msgstr "E1326: У объекта \"%s\" отсутствует переменная %s"
|
||||
msgid "E1326: Variable \"%s\" not found in object \"%s\""
|
||||
msgstr "E1326: У объекта \"%s\" отсутствует переменная \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -11879,8 +11878,9 @@ msgstr ""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1333: Cannot access private variable: %s"
|
||||
msgstr "E1333: Отсутствует доступ к внутренней переменной %s"
|
||||
msgid "E1333: Cannot access private variable \"%s\" in class \"%s\""
|
||||
msgstr ""
|
||||
"E1333: Отсутствует доступ к внутренней переменной \"%s\" в классе \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -12047,10 +12047,9 @@ msgid "E1370: Cannot define a \"new\" method as static"
|
||||
msgstr "E1370: Не допускается определение метода \"new\" как статического"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1371: Abstract must be followed by \"def\" or \"static\""
|
||||
msgid "E1371: Abstract must be followed by \"def\""
|
||||
msgstr ""
|
||||
"E1371: После ключевого слова \"abstract\" требуется ключевое слово \"def\" "
|
||||
"или \"static\""
|
||||
"E1371: После ключевого слова \"abstract\" требуется ключевое слово \"def\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -12164,6 +12163,66 @@ msgstr ""
|
||||
"E1392: Не удалось изменить состояние блокировки переменной класса \"%s\" в "
|
||||
"классе \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1393: Type can only be defined in Vim9 script"
|
||||
msgstr ""
|
||||
"E1393: Псевдоним типа может быть определён только в командном файле Vim9"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1394: Type name must start with an uppercase letter: %s"
|
||||
msgstr ""
|
||||
"E1394: Наименование псевдонима типа должно начинаться с прописной буквы %s"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1395: Type alias \"%s\" cannot be modified"
|
||||
msgstr "E1395: Не допускается изменение псевдонима типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1396: Type alias \"%s\" already exists"
|
||||
msgstr "E1396: Псеводним типа уже определён \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1397: Missing type alias name"
|
||||
msgstr "E1397: Не указано наименование для псевдонима типа"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1398: Missing type alias type"
|
||||
msgstr "E1398: Не указан тип для псевдонима типа"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1399: Type can only be used in a script"
|
||||
msgstr ""
|
||||
"E1399: Псевдоним типа можжет быть определён только на уровне командного файла"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1400: Using type alias \"%s\" as a Number"
|
||||
msgstr "E1400: Ожидался тип данных Number, а получен псевдоним типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1401: Using type alias \"%s\" as a Float"
|
||||
msgstr "E1401: Ожидался тип данных Float, а получен псевдоним типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1402: Using type alias \"%s\" as a String"
|
||||
msgstr "E1402: Ожидался тип данных String, а получен псевдоним типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1403: Type alias \"%s\" cannot be used as a value"
|
||||
msgstr ""
|
||||
"E1403: Недопускается в качестве значения указывать псевдоним типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1404: Abstract cannot be used in an interface"
|
||||
msgstr ""
|
||||
"E1404: Недопускается использование ключевого слова \"abstract\" в интерфейсах"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1500: Cannot mix positional and non-positional arguments: %s"
|
||||
@@ -12206,10 +12265,6 @@ msgid "E1506: Buffer too small to copy xattr value or key"
|
||||
msgstr ""
|
||||
"E1506: Недостаточный размер буфера для копирования расширенного атрибута"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1507: Extended attributes are not supported by the filesystem"
|
||||
msgstr "E1507: В файловой системе не поддерживаются расширенные атрибуты"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid ""
|
||||
"E1508: Size of the extended attribute value is larger than the maximum size "
|
||||
@@ -12218,10 +12273,15 @@ msgstr ""
|
||||
"E1508: Значение расширенного атрибута превышает максимально допустимый размер"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1509: Error occured when reading or writing extended attribute"
|
||||
msgid "E1509: Error occurred when reading or writing extended attribute"
|
||||
msgstr ""
|
||||
"E1509: Произошла ошибка при считывании или записи расширенного атрибута"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1510: Value too large: %s"
|
||||
msgstr "E1510: Превышена допустимая величина в значении %s"
|
||||
|
||||
# #Restorer: выводится, например, по команде `CTRL+g`, `g CTRL+g` и т. п.
|
||||
# :!~ Restorer
|
||||
msgid "--No lines in buffer--"
|
||||
@@ -12673,7 +12733,7 @@ msgstr ""
|
||||
# #Restorer: используется для файла desktop
|
||||
# ~!: earlier
|
||||
msgid "GVim"
|
||||
msgstr "GVim"
|
||||
msgstr "gVim"
|
||||
|
||||
# #Restorer: используется для файла desktop
|
||||
# ~!: earlier
|
||||
|
||||
181
src/po/ru.po
181
src/po/ru.po
@@ -21,10 +21,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: RuVim_0.9001968.011023\n"
|
||||
"Project-Id-Version: RuVim_0.9002091.051123\n"
|
||||
"Report-Msgid-Bugs-To: The Vim Project, <vim-dev@vim.org>\n"
|
||||
"POT-Creation-Date: 2023-10-01 11:51+0300\n"
|
||||
"PO-Revision-Date: 2023-10-01 11:57+0300\n"
|
||||
"POT-Creation-Date: 2023-11-05 18:50+0300\n"
|
||||
"PO-Revision-Date: 2023-11-05 19:57+0300\n"
|
||||
"Last-Translator: Restorer, <restorer@mail2k.ru>\n"
|
||||
"Language-Team: RuVim, https://github.com/RestorerZ/RuVim\n"
|
||||
"Language: ru_RU\n"
|
||||
@@ -439,7 +439,7 @@ msgstr "[шифровано]"
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using custom opslimit \"%llu\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применено нестандартное значение opslimit "
|
||||
"XChaCha20v2: для получения ключа применено нестандартное значение opslimit "
|
||||
"\"%llu\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
@@ -447,7 +447,7 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using default opslimit \"%llu\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применено стандартное значение opslimit \"%llu"
|
||||
"XChaCha20v2: для получения ключа применено стандартное значение opslimit \"%llu"
|
||||
"\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
@@ -455,7 +455,7 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using custom memlimit \"%lu\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применено нестандартное значение memlimit "
|
||||
"XChaCha20v2: для получения ключа применено нестандартное значение memlimit "
|
||||
"\"%lu\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
@@ -463,20 +463,20 @@ msgstr ""
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using default memlimit \"%lu\" for Key derivation."
|
||||
msgstr ""
|
||||
"xChaCha20v2: для получения ключа применено стандартное значение memlimit \"%lu"
|
||||
"XChaCha20v2: для получения ключа применено стандартное значение memlimit \"%lu"
|
||||
"\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using custom algorithm \"%d\" for Key derivation."
|
||||
msgstr "xChaCha20v2: для получения ключа применён нестандартный алгоритм \"%d\""
|
||||
msgstr "XChaCha20v2: для получения ключа применён нестандартный алгоритм \"%d\""
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>0
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "xchacha20v2: using default algorithm \"%d\" for Key derivation."
|
||||
msgstr "xChaCha20v2: для получения ключа применён стандартный алгоритм \"%d\""
|
||||
msgstr "XChaCha20v2: для получения ключа применён стандартный алгоритм \"%d\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "Entering Debug mode. Type \"cont\" to continue."
|
||||
@@ -907,7 +907,7 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "Entering Ex mode. Type \"visual\" to go to Normal mode."
|
||||
msgstr ""
|
||||
"Переключение в Ex-режим. Чтобы переключить в режим команд, наберите \"visual\""
|
||||
"Переключение в Ex-режим. Чтобы переключить в режим команд, наберите :visual"
|
||||
|
||||
# #Restorer: выводится при значении 'verbose'>=9
|
||||
# ~!: earlier
|
||||
@@ -2199,7 +2199,8 @@ msgstr ""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "'-nb' cannot be used: not enabled at compile time\n"
|
||||
msgstr "Недопустимый аргумент командной строки '-nb'. Отключено при компиляции\n"
|
||||
msgstr ""
|
||||
"Неподдерживаемый аргумент командной строки -nb. Отключено при компиляции\n"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "This Vim was not compiled with the diff feature."
|
||||
@@ -2337,7 +2338,7 @@ msgstr "-unregister\t\tОтмена регистрации программы gV
|
||||
|
||||
# ~!: earlier
|
||||
msgid "-g\t\t\tRun using GUI (like \"gvim\")"
|
||||
msgstr "-g\t\t\tЗапуск программы с графическим интерфейсом (как \"gVim\")"
|
||||
msgstr "-g\t\t\tЗапуск программы с графическим интерфейсом (как \"gvim\")"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "-f or --nofork\tForeground: Don't fork when starting GUI"
|
||||
@@ -2437,7 +2438,8 @@ msgstr "-f\t\t\tНе использовать команду newcli для от
|
||||
# #Restorer: убрал один \t, чтобы выглядело единообразно
|
||||
# :!~ Restorer
|
||||
msgid "-dev <device>\t\tUse <device> for I/O"
|
||||
msgstr "-dev <устройство>\tИспользовать для ввода-вывода указанное <устройство>"
|
||||
msgstr ""
|
||||
"-dev <устройство>\tИспользовать для операций ввода-вывода данное <устройство>"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "-A\t\t\tStart in Arabic mode"
|
||||
@@ -2544,7 +2546,7 @@ msgstr "--remote <файлы>\tРедактирование <файлов> на
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "--remote-silent <files> Same, don't complain if there is no server"
|
||||
msgstr "--remote-silent <файлы> То же, но без сообщений при отсутствии сервера"
|
||||
msgstr "--remote-silent <файлы> То же, но не сообщать о недоступности сервера"
|
||||
|
||||
# #Restorer: добавил пару пробельных символов, дабы подравнять сообщение
|
||||
# ~!: earlier
|
||||
@@ -2555,9 +2557,8 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "--remote-wait-silent <files> Same, don't complain if there is no server"
|
||||
msgstr ""
|
||||
"--remote-wait-silent <файлы> То же, но без сообщений при отсутствии сервера"
|
||||
"--remote-wait-silent <файлы> То же, но не сообщать о недоступности сервера"
|
||||
|
||||
# #Restorer: добавил пару пробельных символов, дабы подравнять сообщение
|
||||
# :!~ Restorer
|
||||
msgid ""
|
||||
"--remote-tab[-wait][-silent] <files> As --remote but use tab page per file"
|
||||
@@ -2621,7 +2622,7 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid "-display <display>\tRun Vim on <display>"
|
||||
msgstr ""
|
||||
"-display <display>\tЗапуск программы с подключением к указанному X-серверу"
|
||||
"-display <X-сервер>\tЗапуск программы с подключением к указанному X-серверу"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "-iconic\t\tStart Vim iconified"
|
||||
@@ -2638,7 +2639,7 @@ msgstr "-foreground <цвет>\tНазначить указанный <цвет>
|
||||
# #Restorer: убрал один \t, чтобы выглядело единообразно
|
||||
# :!~ Restorer
|
||||
msgid "-font <font>\t\tUse <font> for normal text (also: -fn)"
|
||||
msgstr "-font <шрифт>\tНазначить указанный <шрифт> для обычного текста ( -fn)"
|
||||
msgstr "-font <шрифт>\tНазначить указанный <шрифт> для обычного текста (или -fn)"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "-boldfont <font>\tUse <font> for bold text"
|
||||
@@ -2906,7 +2907,7 @@ msgstr "Строки, которые возможно испорчены, пом
|
||||
# :!~ Restorer
|
||||
msgid "??? from here until ???END lines may have been inserted/deleted"
|
||||
msgstr ""
|
||||
"Строки, которые были добавлены или удалены, помещены между метками ??? и ???END"
|
||||
"Строки, которые были вставлены или удалены, помещены между метками ??? и ???END"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "??? lines may be missing"
|
||||
@@ -3133,8 +3134,8 @@ msgid ""
|
||||
" file when making changes. Quit, or continue with caution.\n"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"(1) Возможно, редактирование этого же файла выполняется в другой программе на\n"
|
||||
" этом же компьютере или по сетевому подключению.\n"
|
||||
"(1) Возможно, редактирование этого же файла выполняется в другой программе\n"
|
||||
" на этом же компьютере или по сетевому подключению.\n"
|
||||
"\n"
|
||||
"В этом случае лучше не редактировать этот файл или делать это осмотрительно,\n"
|
||||
"чтобы не появилось два варианта одного и того же файла.\n"
|
||||
@@ -5331,7 +5332,7 @@ msgstr ""
|
||||
# :!~ Restorer
|
||||
msgid " for Vim defaults "
|
||||
msgstr ""
|
||||
" возможности редактора Vim"
|
||||
" возможности редактора Vim "
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "Sponsor Vim development!"
|
||||
@@ -5346,14 +5347,14 @@ msgstr "Станьте зарегистрированным пользовате
|
||||
# :!~ Restorer
|
||||
msgid "type :help sponsor<Enter> for information "
|
||||
msgstr ""
|
||||
"наберите :help sponsor<ENTER> чтобы узнать об этом подробнее "
|
||||
"наберите :help sponsor<ENTER> чтобы узнать об этом подробнее "
|
||||
|
||||
# #Restorer: пробелы не убирать, сделано для выравнивания сообщений
|
||||
# #Restorer: выравнивается по самому длинному подобному сообщению
|
||||
# :!~ Restorer
|
||||
msgid "type :help register<Enter> for information "
|
||||
msgstr ""
|
||||
"наберите :help register<ENTER> чтобы узнать об этом подробнее "
|
||||
"наберите :help register<ENTER> чтобы узнать об этом подробнее "
|
||||
|
||||
# #Restorer: пробелы не убирать, сделано для выравнивания сообщений
|
||||
# #Restorer: выравнивается по самому длинному подобному сообщению
|
||||
@@ -5740,7 +5741,7 @@ msgstr "E35: В этом сеансе работы не применялся п
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E36: Not enough room"
|
||||
msgstr "E36: Не достаточно места для создания нового окна"
|
||||
msgstr "E36: Недостаточно места для создания нового окна"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E37: No write since last change"
|
||||
@@ -6174,7 +6175,8 @@ msgstr ""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E135: *Filter* Autocommands must not change current buffer"
|
||||
msgstr "E135: Автокоманды по событиям *Filter* не должны изменять текущий буфер"
|
||||
msgstr ""
|
||||
"E135: Действия автокоманд по событиям *Filter* не должны изменять текущий буфер"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E136: viminfo: Too many errors, skipping rest of file"
|
||||
@@ -6483,12 +6485,12 @@ msgstr "E199: Удалены активное окно или буфер"
|
||||
# :!~ Restorer
|
||||
msgid "E200: *ReadPre autocommands made the file unreadable"
|
||||
msgstr ""
|
||||
"E200: В результате действий автокоманд по событию *ReadPre файл стал нечитаем"
|
||||
"E200: В результате действий автокоманд по событиям *ReadPre файл стал нечитаем"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E201: *ReadPre autocommands must not change current buffer"
|
||||
msgstr ""
|
||||
"E201: Действия автокоманд для событий *ReadPre не должны изменять текущий буфер"
|
||||
"E201: Действия автокоманд по событиям *ReadPre не должны изменять текущий буфер"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E202: Conversion made file unreadable!"
|
||||
@@ -7145,8 +7147,7 @@ msgstr "E359: Установка режима экрана не поддержи
|
||||
# :!~ Restorer
|
||||
msgid "E360: Cannot execute shell with -f option"
|
||||
msgstr ""
|
||||
"E360: Не удалось вызвать командную оболочку. Программа запущена с аргументом '-"
|
||||
"f'"
|
||||
"E360: Не удалось вызвать командную оболочку. Программа запущена с аргументом -f"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E362: Using a boolean value as a Float"
|
||||
@@ -8675,8 +8676,9 @@ msgstr ""
|
||||
"E688: Количество переменных больше количества присваиваемых значений выражения"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E689: Can only index a List, Dictionary or Blob"
|
||||
msgstr "E689: Индекс разрешён только для типа данных List, Dictionary или BLOB"
|
||||
#, c-format
|
||||
msgid "E689: Index not allowed after a %s: %s"
|
||||
msgstr "E689: Не допускается указание индекса для типа данных %s в %s"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E690: Missing \"in\" after :for"
|
||||
@@ -10563,7 +10565,7 @@ msgstr "E1088: Не допускается импортирование кома
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1089: Unknown variable: %s"
|
||||
msgstr "E1089: Не распознана переменная %s"
|
||||
msgstr "E1089: Не распознана переменная \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -10573,7 +10575,7 @@ msgstr "E1090: Не допускается присвоение значения
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1091: Function is not compiled: %s"
|
||||
msgstr "E1091: Некомпилированная функция %s"
|
||||
msgstr "E1091: Некомпилированная функция \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1092: Cannot nest :redir"
|
||||
@@ -11051,7 +11053,7 @@ msgstr[2] "E1190: В функцию передано на %d аргументо
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1191: Call to function that failed to compile: %s"
|
||||
msgstr "E1191: Ошибка компиляции при обращении к функции %s"
|
||||
msgstr "E1191: Обращение к некомпилированной функции \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1192: Empty function name"
|
||||
@@ -11060,7 +11062,7 @@ msgstr "E1192: Отсутствует наименование функции"
|
||||
# :!~ Restorer
|
||||
msgid "E1193: cryptmethod xchacha20 not built into this Vim"
|
||||
msgstr ""
|
||||
"E1193: Алгоритм шифрования «XChaCha20» не поддерживается в данной программе Vim"
|
||||
"E1193: Алгоритм шифрования «XChaCha20» не поддерживается в данной версии Vim"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1194: Cannot encrypt header, not enough space"
|
||||
@@ -11101,8 +11103,8 @@ msgstr "E1202: Запрещён пробельный символ после '%s
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1203: Dot can only be used on a dictionary: %s"
|
||||
msgstr "E1203: Символ точка используется только в типе данных Dictionary %s"
|
||||
msgid "E1203: Dot not allowed after a %s: %s"
|
||||
msgstr "E1203: Не допускается символ точки для типа данных %s в %s"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -11662,38 +11664,38 @@ msgid "E1318: Not a valid command in a class: %s"
|
||||
msgstr "E1318: Недопустимая команда в объявлении класса %s"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1319: Using a class as a Number"
|
||||
msgid "E1319: Using a Class as a Number"
|
||||
msgstr "E1319: Ожидался тип данных Number, а получен Class"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1320: Using an object as a Number"
|
||||
msgid "E1320: Using an Object as a Number"
|
||||
msgstr "E1320: Ожидался тип данных Number, а получен Object"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1321: Using a class as a Float"
|
||||
msgid "E1321: Using a Class as a Float"
|
||||
msgstr "E1321: Ожидался тип данных Float, а получен Class"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1322: Using an object as a Float"
|
||||
msgid "E1322: Using an Object as a Float"
|
||||
msgstr "E1322: Ожидался тип данных Float, а получен Object"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1323: Using a class as a String"
|
||||
msgid "E1323: Using a Class as a String"
|
||||
msgstr "E1323: Ожидался тип данных String, а получен Class"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1324: Using an object as a String"
|
||||
msgid "E1324: Using an Object as a String"
|
||||
msgstr "E1324: Ожидался тип данных String, а получен Object"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1325: Method not found on class \"%s\": %s"
|
||||
msgstr "E1325: У класса \"%s\" отсутствует метод %s"
|
||||
msgid "E1325: Method \"%s\" not found in class \"%s\""
|
||||
msgstr "E1325: У класса \"%2$s\" отсутствует метод \"%1$s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1326: Variable not found on object \"%s\": %s"
|
||||
msgstr "E1326: У объекта \"%s\" отсутствует переменная %s"
|
||||
msgid "E1326: Variable \"%s\" not found in object \"%s\""
|
||||
msgstr "E1326: У объекта \"%s\" отсутствует переменная \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -11724,8 +11726,8 @@ msgstr ""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1333: Cannot access private variable: %s"
|
||||
msgstr "E1333: Отсутствует доступ к внутренней переменной %s"
|
||||
msgid "E1333: Cannot access private variable \"%s\" in class \"%s\""
|
||||
msgstr "E1333: Отсутствует доступ к внутренней переменной \"%s\" в классе \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -11891,10 +11893,9 @@ msgid "E1370: Cannot define a \"new\" method as static"
|
||||
msgstr "E1370: Не допускается определение метода \"new\" как статического"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1371: Abstract must be followed by \"def\" or \"static\""
|
||||
msgid "E1371: Abstract must be followed by \"def\""
|
||||
msgstr ""
|
||||
"E1371: После ключевого слова \"abstract\" требуется ключевое слово \"def\" или "
|
||||
"\"static\""
|
||||
"E1371: После ключевого слова \"abstract\" требуется ключевое слово \"def\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
@@ -12005,6 +12006,64 @@ msgstr ""
|
||||
"E1392: Не удалось изменить состояние блокировки переменной класса \"%s\" в "
|
||||
"классе \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1393: Type can only be defined in Vim9 script"
|
||||
msgstr "E1393: Псевдоним типа может быть определён только в командном файле Vim9"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1394: Type name must start with an uppercase letter: %s"
|
||||
msgstr ""
|
||||
"E1394: Наименование псевдонима типа должно начинаться с прописной буквы %s"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1395: Type alias \"%s\" cannot be modified"
|
||||
msgstr "E1395: Не допускается изменение псевдонима типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1396: Type alias \"%s\" already exists"
|
||||
msgstr "E1396: Псеводним типа уже определён \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1397: Missing type alias name"
|
||||
msgstr "E1397: Не указано наименование для псевдонима типа"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1398: Missing type alias type"
|
||||
msgstr "E1398: Не указан тип для псевдонима типа"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1399: Type can only be used in a script"
|
||||
msgstr ""
|
||||
"E1399: Псевдоним типа можжет быть определён только на уровне командного файла"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1400: Using type alias \"%s\" as a Number"
|
||||
msgstr "E1400: Ожидался тип данных Number, а получен псевдоним типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1401: Using type alias \"%s\" as a Float"
|
||||
msgstr "E1401: Ожидался тип данных Float, а получен псевдоним типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1402: Using type alias \"%s\" as a String"
|
||||
msgstr "E1402: Ожидался тип данных String, а получен псевдоним типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1403: Type alias \"%s\" cannot be used as a value"
|
||||
msgstr "E1403: Недопускается в качестве значения указывать псевдоним типа \"%s\""
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1404: Abstract cannot be used in an interface"
|
||||
msgstr ""
|
||||
"E1404: Недопускается использование ключевого слова \"abstract\" в интерфейсах"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1500: Cannot mix positional and non-positional arguments: %s"
|
||||
@@ -12043,12 +12102,7 @@ msgstr "E1505: Недопустимые спецификаторы формат
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1506: Buffer too small to copy xattr value or key"
|
||||
msgstr ""
|
||||
"E1506: Недостаточный размер буфера для копирования расширенного атрибута"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1507: Extended attributes are not supported by the filesystem"
|
||||
msgstr "E1507: В файловой системе не поддерживаются расширенные атрибуты"
|
||||
msgstr "E1506: Недостаточный размер буфера для копирования расширенного атрибута"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid ""
|
||||
@@ -12058,9 +12112,14 @@ msgstr ""
|
||||
"E1508: Значение расширенного атрибута превышает максимально допустимый размер"
|
||||
|
||||
# :!~ Restorer
|
||||
msgid "E1509: Error occured when reading or writing extended attribute"
|
||||
msgid "E1509: Error occurred when reading or writing extended attribute"
|
||||
msgstr "E1509: Произошла ошибка при считывании или записи расширенного атрибута"
|
||||
|
||||
# :!~ Restorer
|
||||
#, c-format
|
||||
msgid "E1510: Value too large: %s"
|
||||
msgstr "E1510: Превышена допустимая величина в значении %s"
|
||||
|
||||
# #Restorer: выводится, например, по команде `CTRL+g`, `g CTRL+g` и т. п.
|
||||
# :!~ Restorer
|
||||
msgid "--No lines in buffer--"
|
||||
@@ -12508,7 +12567,7 @@ msgstr ""
|
||||
# #Restorer: используется для файла desktop
|
||||
# ~!: earlier
|
||||
msgid "GVim"
|
||||
msgstr "GVim"
|
||||
msgstr "gVim"
|
||||
|
||||
# #Restorer: используется для файла desktop
|
||||
# ~!: earlier
|
||||
|
||||
20
src/sound.c
20
src/sound.c
@@ -322,7 +322,7 @@ sound_wndproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
vim_snprintf(buf, sizeof(buf), "close sound%06ld",
|
||||
p->snd_id);
|
||||
mciSendString(buf, NULL, 0, 0);
|
||||
mciSendStringA(buf, NULL, 0, 0);
|
||||
|
||||
long result = wParam == MCI_NOTIFY_SUCCESSFUL ? 0
|
||||
: wParam == MCI_NOTIFY_ABORTED ? 1 : 2;
|
||||
@@ -376,7 +376,7 @@ f_sound_playfile(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
long newid = sound_id + 1;
|
||||
size_t len;
|
||||
char_u *p, *esc;
|
||||
char_u *p, *filename;
|
||||
WCHAR *wp;
|
||||
soundcb_T *soundcb;
|
||||
char buf[32];
|
||||
@@ -385,17 +385,15 @@ f_sound_playfile(typval_T *argvars, typval_T *rettv)
|
||||
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
esc = vim_strsave_shellescape(tv_get_string(&argvars[0]), FALSE, FALSE);
|
||||
filename = tv_get_string(&argvars[0]);
|
||||
|
||||
len = STRLEN(esc) + 5 + 18 + 1;
|
||||
len = STRLEN(filename) + 5 + 18 + 2 + 1;
|
||||
p = alloc(len);
|
||||
if (p == NULL)
|
||||
{
|
||||
free(esc);
|
||||
return;
|
||||
}
|
||||
vim_snprintf((char *)p, len, "open %s alias sound%06ld", esc, newid);
|
||||
free(esc);
|
||||
vim_snprintf((char *)p, len, "open \"%s\" alias sound%06ld", filename, newid);
|
||||
|
||||
wp = enc_to_utf16((char_u *)p, NULL);
|
||||
free(p);
|
||||
@@ -408,7 +406,7 @@ f_sound_playfile(typval_T *argvars, typval_T *rettv)
|
||||
return;
|
||||
|
||||
vim_snprintf(buf, sizeof(buf), "play sound%06ld notify", newid);
|
||||
err = mciSendString(buf, NULL, 0, sound_window());
|
||||
err = mciSendStringA(buf, NULL, 0, sound_window());
|
||||
if (err != 0)
|
||||
goto failure;
|
||||
|
||||
@@ -426,7 +424,7 @@ f_sound_playfile(typval_T *argvars, typval_T *rettv)
|
||||
|
||||
failure:
|
||||
vim_snprintf(buf, sizeof(buf), "close sound%06ld", newid);
|
||||
mciSendString(buf, NULL, 0, NULL);
|
||||
mciSendStringA(buf, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -440,14 +438,14 @@ f_sound_stop(typval_T *argvars, typval_T *rettv UNUSED)
|
||||
|
||||
id = tv_get_number(&argvars[0]);
|
||||
vim_snprintf(buf, sizeof(buf), "stop sound%06ld", id);
|
||||
mciSendString(buf, NULL, 0, NULL);
|
||||
mciSendStringA(buf, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
f_sound_clear(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
|
||||
{
|
||||
PlaySoundW(NULL, NULL, 0);
|
||||
mciSendString("close all", NULL, 0, NULL);
|
||||
mciSendStringA("close all", NULL, 0, NULL);
|
||||
}
|
||||
|
||||
# if defined(EXITFREE)
|
||||
|
||||
@@ -4948,10 +4948,6 @@ typedef struct
|
||||
char_u *string;
|
||||
} os_newval;
|
||||
|
||||
// When set by the called function: Stop processing the option further.
|
||||
// Currently only used for boolean options.
|
||||
int os_doskip;
|
||||
|
||||
// Option value was checked to be safe, no need to set P_INSECURE
|
||||
// Used for the 'keymap', 'filetype' and 'syntax' options.
|
||||
int os_value_checked;
|
||||
|
||||
@@ -44,7 +44,8 @@ TEST_VIM9 = \
|
||||
test_vim9_fails \
|
||||
test_vim9_func \
|
||||
test_vim9_import \
|
||||
test_vim9_script
|
||||
test_vim9_script \
|
||||
test_vim9_typealias
|
||||
|
||||
TEST_VIM9_RES = \
|
||||
test_vim9_assign.res \
|
||||
@@ -56,7 +57,8 @@ TEST_VIM9_RES = \
|
||||
test_vim9_fails.res \
|
||||
test_vim9_func.res \
|
||||
test_vim9_import.res \
|
||||
test_vim9_script.res
|
||||
test_vim9_script.res \
|
||||
test_vim9_typealias.res
|
||||
|
||||
# Benchmark scripts.
|
||||
SCRIPTS_BENCH = test_bench_regexp.res
|
||||
|
||||
@@ -113,6 +113,8 @@ func RunServer(cmd, testfunc, args)
|
||||
endif
|
||||
|
||||
call call(function(a:testfunc), [port])
|
||||
catch /E901.*Address family for hostname not supported/
|
||||
throw 'Skipped: Invalid network setup ("' .. v:exception .. '" in ' .. v:throwpoint .. ')'
|
||||
catch
|
||||
call assert_report('Caught exception: "' . v:exception . '" in ' . v:throwpoint)
|
||||
finally
|
||||
|
||||
@@ -74,9 +74,9 @@ endfunc
|
||||
func Test_arabic_toggle_keymap()
|
||||
new
|
||||
set arabic
|
||||
call feedkeys("i12\<C-^>12\<C-^>12", 'tx')
|
||||
call assert_match("^ *٢١21٢١$", ScreenLines(1, &columns)[0])
|
||||
call assert_equal('١٢12١٢', getline('.'))
|
||||
call feedkeys("i12\<C-^>12\<C-^>12abcd", 'tx')
|
||||
call assert_match("^ *.*ﺷ212121$", ScreenLines(1, &columns)[0])
|
||||
call assert_equal('121212شلاؤي', getline('.'))
|
||||
set arabic&
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
@@ -2344,8 +2344,6 @@ func Test_complete_info_index()
|
||||
call feedkeys("Go\<C-X>\<C-P>\<F5>\<Esc>_dd", 'tx')
|
||||
call assert_equal(-1, g:compl_info['selected'])
|
||||
|
||||
" Check if index out of range
|
||||
" https://github.com/vim/vim/pull/12971
|
||||
call feedkeys("Go\<C-X>\<C-N>\<C-P>\<F5>\<Esc>_dd", 'tx')
|
||||
call assert_equal(0, g:compl_info['selected'])
|
||||
call assert_equal(6 , len(g:compl_info['items']))
|
||||
@@ -2353,6 +2351,9 @@ func Test_complete_info_index()
|
||||
call feedkeys("Go\<C-X>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<C-N>\<F5>\<Esc>_dd", 'tx')
|
||||
call assert_equal("aaa", g:compl_info['items'][g:compl_info['selected']]['word'])
|
||||
call assert_equal(6 , len(g:compl_info['items']))
|
||||
call feedkeys("Go\<C-X>\<C-N>\<F5>\<Esc>_dd", 'tx')
|
||||
call assert_equal(-1, g:compl_info['selected'])
|
||||
call assert_equal(6 , len(g:compl_info['items']))
|
||||
|
||||
set completeopt&
|
||||
bwipe!
|
||||
|
||||
@@ -164,7 +164,11 @@ func Test_modeline_colon()
|
||||
endfunc
|
||||
|
||||
func s:modeline_fails(what, text, error)
|
||||
call CheckOption(a:what)
|
||||
" Don't use CheckOption(), it would skip the whole test
|
||||
" just for a single un-supported option
|
||||
if !exists('+' .. a:what)
|
||||
return
|
||||
endif
|
||||
let fname = "Xmodeline_fails_" . a:what
|
||||
call writefile(['vim: set ' . a:text . ' :', 'nothing'], fname, 'D')
|
||||
let modeline = &modeline
|
||||
|
||||
@@ -2207,4 +2207,20 @@ func Test_set_keyprotocol()
|
||||
let &term = term
|
||||
endfunc
|
||||
|
||||
func Test_set_wrap()
|
||||
" Unsetting 'wrap' when 'smoothscroll' is set does not result in incorrect
|
||||
" cursor position.
|
||||
set wrap smoothscroll scrolloff=5
|
||||
|
||||
call setline(1, ['', 'aaaa'->repeat(500)])
|
||||
20 split
|
||||
20 vsplit
|
||||
norm 2G$
|
||||
redraw
|
||||
set nowrap
|
||||
call assert_equal(2, winline())
|
||||
|
||||
set wrap& smoothscroll& scrolloff&
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
@@ -2992,15 +2992,69 @@ def Test_list_item_assign()
|
||||
vim9script
|
||||
|
||||
def Foo()
|
||||
var l: list<list<string>> = [['x', 'x', 'x'], ['y', 'y', 'y']]
|
||||
var z: number = 1
|
||||
var l: list<list<string>> = [['x', 'x', 'x'], ['y', 'y', 'y']]
|
||||
var z: number = 1
|
||||
|
||||
[l[1][2], z] = ['a', 20]
|
||||
assert_equal([['x', 'x', 'x'], ['y', 'y', 'a']], l)
|
||||
[l[1][2], z] = ['a', 20]
|
||||
assert_equal([['x', 'x', 'x'], ['y', 'y', 'a']], l)
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
|
||||
var l: list<list<string>> = [['x', 'x', 'x'], ['y', 'y', 'y']]
|
||||
var z: number = 1
|
||||
|
||||
[l[1][2], z] = ['a', 20]
|
||||
assert_equal([['x', 'x', 'x'], ['y', 'y', 'a']], l)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for assigning to a multi-dimensional dict item.
|
||||
def Test_dict_item_assign()
|
||||
# This used to fail with the error "E1105: Cannot convert list to string"
|
||||
# (Github issue #13485)
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
def F()
|
||||
var d: dict<dict<number>> = {a: {b: 0}}
|
||||
|
||||
for group in keys(d)
|
||||
d['a']['b'] += 1
|
||||
endfor
|
||||
assert_equal({a: {b: 1}}, d)
|
||||
enddef
|
||||
F()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# This used to crash Vim
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def F()
|
||||
var d: dict<dict<number>> = {a: {b: 0}}
|
||||
d['a']['b'] += 1
|
||||
assert_equal({a: {b: 1}}, d)
|
||||
enddef
|
||||
F()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Assignment at script level
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
var d: dict<dict<number>> = {a: {b: 0}}
|
||||
|
||||
for group in keys(d)
|
||||
d['a']['b'] += 1
|
||||
endfor
|
||||
assert_equal({a: {b: 1}}, d)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
enddef
|
||||
|
||||
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
|
||||
|
||||
@@ -35,7 +35,7 @@ def Test_class_basic()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E475: Invalid argument: noclass Something', 2)
|
||||
|
||||
# Only the completed word "class" should be recognized
|
||||
# Only the complete word "class" should be recognized
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
abstract classy Something
|
||||
@@ -4186,8 +4186,8 @@ enddef
|
||||
def Test_lockvar_islocked()
|
||||
# Can't lock class/object variable
|
||||
# Lock class/object variable's value
|
||||
# Lock item of variabl's value (a list item)
|
||||
# varible is at index 1 within class/object
|
||||
# Lock item of variable's value (a list item)
|
||||
# variable is at index 1 within class/object
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
|
||||
@@ -5567,7 +5567,26 @@ def Test_abstract_method()
|
||||
enddef
|
||||
endclass
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
v9.CheckSourceFailure(lines, 'E1404: Abstract cannot be used in an interface', 3)
|
||||
|
||||
# Use abstract static method in an interface
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
interface A
|
||||
abstract static def Foo()
|
||||
enddef
|
||||
endinterface
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1404: Abstract cannot be used in an interface', 3)
|
||||
|
||||
# Use abstract static variable in an interface
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
interface A
|
||||
abstract static foo: number = 10
|
||||
endinterface
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1404: Abstract cannot be used in an interface', 3)
|
||||
|
||||
# Abbreviate the "abstract" keyword
|
||||
lines =<< trim END
|
||||
@@ -5585,7 +5604,7 @@ def Test_abstract_method()
|
||||
abstract this.val = 10
|
||||
endclass
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1371: Abstract must be followed by "def" or "static"', 3)
|
||||
v9.CheckSourceFailure(lines, 'E1371: Abstract must be followed by "def"', 3)
|
||||
|
||||
# Use a static abstract method
|
||||
lines =<< trim END
|
||||
@@ -5593,14 +5612,8 @@ def Test_abstract_method()
|
||||
abstract class A
|
||||
abstract static def Foo(): number
|
||||
endclass
|
||||
class B extends A
|
||||
static def Foo(): number
|
||||
return 4
|
||||
enddef
|
||||
endclass
|
||||
assert_equal(4, B.Foo())
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
v9.CheckSourceFailure(lines, 'E1371: Abstract must be followed by "def"', 3)
|
||||
|
||||
# Type mismatch between abstract method and concrete method
|
||||
lines =<< trim END
|
||||
@@ -5616,17 +5629,6 @@ def Test_abstract_method()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1383: Method "Foo": type mismatch, expected func(string, number): list<number> but got func(number, string): list<string>', 9)
|
||||
|
||||
# Use an abstract class to invoke an abstract method
|
||||
# FIXME: This should fail
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
abstract class A
|
||||
abstract static def Foo()
|
||||
endclass
|
||||
A.Foo()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Invoke an abstract method from a def function
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
@@ -5645,6 +5647,18 @@ def Test_abstract_method()
|
||||
Bar(b)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Use a static method in an abstract class
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
abstract class A
|
||||
static def Foo(): string
|
||||
return 'foo'
|
||||
enddef
|
||||
endclass
|
||||
assert_equal('foo', A.Foo())
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for calling a class method from a subclass
|
||||
|
||||
@@ -560,7 +560,6 @@ def Test_disassemble_store_index()
|
||||
'\d LOAD $0\_s*' ..
|
||||
'\d MEMBER dd\_s*' ..
|
||||
'\d\+ USEDICT\_s*' ..
|
||||
'\d\+ 2STRING stack\[-2\]\_s*' ..
|
||||
'\d\+ STOREINDEX any\_s*' ..
|
||||
'\d\+ RETURN void',
|
||||
res)
|
||||
|
||||
@@ -4783,539 +4783,6 @@ def Test_multidefer_with_exception()
|
||||
v9.CheckSourceSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for :type command to create type aliases
|
||||
def Test_typealias()
|
||||
# Use type alias at script level
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
type ListOfStrings = list<string>
|
||||
def Foo(a: ListOfStrings): ListOfStrings
|
||||
return a
|
||||
enddef
|
||||
var b: ListOfStrings = ['a', 'b']
|
||||
assert_equal(['a', 'b'], b)
|
||||
assert_equal(['e', 'f'], Foo(['e', 'f']))
|
||||
assert_equal('typealias<list<string>>', typename(ListOfStrings))
|
||||
assert_equal(v:t_typealias, type(ListOfStrings))
|
||||
assert_equal('ListOfStrings', string(ListOfStrings))
|
||||
assert_equal(false, null == ListOfStrings)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Use type alias at def function level
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type ListOfStrings = list<string>
|
||||
def Foo(a: ListOfStrings): ListOfStrings
|
||||
return a
|
||||
enddef
|
||||
def Bar()
|
||||
var c: ListOfStrings = ['c', 'd']
|
||||
assert_equal(['c', 'd'], c)
|
||||
assert_equal(['e', 'f'], Foo(['e', 'f']))
|
||||
assert_equal('typealias<list<string>>', typename(ListOfStrings))
|
||||
assert_equal(v:t_typealias, type(ListOfStrings))
|
||||
assert_equal('ListOfStrings', string(ListOfStrings))
|
||||
assert_equal(false, null == ListOfStrings)
|
||||
enddef
|
||||
Bar()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Use :type outside a Vim9 script
|
||||
lines =<< trim END
|
||||
type Index = number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1393: Type can only be defined in Vim9 script', 1)
|
||||
|
||||
# Use :type without any arguments
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1397: Missing type alias name', 2)
|
||||
|
||||
# Use :type with a name but no type
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType
|
||||
END
|
||||
v9.CheckSourceFailure(lines, "E398: Missing '=': ", 2)
|
||||
|
||||
# Use :type with a name but no type following "="
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType =
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1398: Missing type alias type', 2)
|
||||
|
||||
# No space before or after "="
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType=number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1315: White space required after name: MyType=number', 2)
|
||||
|
||||
# No space after "="
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType =number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, "E1069: White space required after '=': =number", 2)
|
||||
|
||||
# type alias without "="
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type Index number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, "E398: Missing '=': number", 2)
|
||||
|
||||
# type alias for a non-existing type
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type Index = integer
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1010: Type not recognized: integer', 2)
|
||||
|
||||
# type alias starting with lower-case letter
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type index = number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1394: Type name must start with an uppercase letter: index = number', 2)
|
||||
|
||||
# No white space following the alias name
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type Index:number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1315: White space required after name: Index:number', 2)
|
||||
|
||||
# something following the type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type ListOfNums = list<number> string
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E488: Trailing characters: string', 2)
|
||||
|
||||
# type alias name collides with a variable name
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
var ListOfNums: number = 10
|
||||
type ListOfNums = list<number>
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1041: Redefining script item: "ListOfNums"', 3)
|
||||
|
||||
# duplicate type alias name
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyList = list<number>
|
||||
type MyList = list<string>
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1396: Type alias "MyList" already exists', 3)
|
||||
|
||||
# def function argument name collision with a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo(A: number)
|
||||
enddef
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1168: Argument already declared in the script: A: number)', 3)
|
||||
|
||||
# def function local variable name collision with a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo()
|
||||
var A: number = 10
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1054: Variable already declared in the script: A', 1)
|
||||
|
||||
# type alias a variable
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
var A: list<number> = []
|
||||
type B = A
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1010: Type not recognized: A', 3)
|
||||
|
||||
# type alias a class
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
class C
|
||||
endclass
|
||||
type AC = C
|
||||
assert_equal('class<C>', typename(AC))
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Sourcing a script twice (which will free script local variables)
|
||||
# Uses "lines" from the previous test
|
||||
new
|
||||
setline(1, lines)
|
||||
:source
|
||||
:source
|
||||
bw!
|
||||
|
||||
# type alias a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = string
|
||||
type B = A
|
||||
var b: B = 'abc'
|
||||
assert_equal('abc', b)
|
||||
def Foo()
|
||||
var c: B = 'def'
|
||||
assert_equal('def', c)
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Assigning to a type alias (script level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
MyType = [1, 2, 3]
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1395: Type alias "MyType" cannot be modified', 3)
|
||||
|
||||
# Assigning a type alias (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<string>
|
||||
def Foo()
|
||||
var x = A
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1403: Type alias "A" cannot be used as a value', 1)
|
||||
|
||||
# Using type alias in an expression (script level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
assert_fails('var m = MyType', 'E1403: Type alias "MyType" cannot be used as a value')
|
||||
assert_fails('var i = MyType + 1', 'E1400: Using type alias "MyType" as a Number')
|
||||
assert_fails('var f = 1.0 + MyType', 'E1400: Using type alias "MyType" as a Number')
|
||||
assert_fails('MyType += 10', 'E1395: Type alias "MyType" cannot be modified')
|
||||
assert_fails('var x = $"-{MyType}-"', 'E1402: Using type alias "MyType" as a String')
|
||||
assert_fails('var x = MyType[1]', 'E909: Cannot index a special variable')
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Using type alias in an expression (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
def Foo()
|
||||
var x = MyType + 1
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1051: Wrong argument type for +', 1)
|
||||
|
||||
# Using type alias in an expression (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
def Foo()
|
||||
MyType = list<string>
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E46: Cannot change read-only variable "MyType"', 1)
|
||||
|
||||
# Using type alias in an expression (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
def Foo()
|
||||
MyType += 10
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E46: Cannot change read-only variable "MyType"', 1)
|
||||
|
||||
# Convert type alias to a string (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
def Foo()
|
||||
var x = $"-{MyType}-"
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1105: Cannot convert typealias to string', 1)
|
||||
|
||||
# Using type alias as a float
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type B = number
|
||||
sort([1.1, B], 'f')
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1401: Using type alias "B" as a Float', 3)
|
||||
|
||||
# Creating a typealias in a def function
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def Foo()
|
||||
var n: number = 10
|
||||
type A = list<string>
|
||||
enddef
|
||||
defcompile
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1399: Type can only be used in a script', 2)
|
||||
|
||||
# json_encode should fail with a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<string>
|
||||
var x = json_encode(A)
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1161: Cannot json encode a typealias', 3)
|
||||
|
||||
# Comparing type alias with a number (script level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<string>
|
||||
var n: number
|
||||
var x = A == n
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1072: Cannot compare typealias with number', 4)
|
||||
|
||||
# Comparing type alias with a number (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<string>
|
||||
def Foo()
|
||||
var n: number
|
||||
var x = A == n
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1072: Cannot compare typealias with number', 2)
|
||||
|
||||
# casting a number to a type alias (script level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = bool
|
||||
assert_equal(true, <MyType>1 == true)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for exporting and importing type aliases
|
||||
def Test_typealias_import()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
export type MyType = list<number>
|
||||
END
|
||||
writefile(lines, 'Xtypeexport.vim', 'D')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport.vim' as A
|
||||
|
||||
var myList: A.MyType = [1, 2, 3]
|
||||
def Foo(l: A.MyType)
|
||||
assert_equal([1, 2, 3], l)
|
||||
enddef
|
||||
Foo(myList)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# Use a non existing type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport.vim' as A
|
||||
|
||||
var myNum: A.SomeType = 10
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1010: Type not recognized: A.SomeType = 10', 4)
|
||||
|
||||
# Use a type alias that is not exported
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type NewType = dict<string>
|
||||
END
|
||||
writefile(lines, 'Xtypeexport2.vim', 'D')
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport2.vim' as A
|
||||
|
||||
var myDict: A.NewType = {}
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1049: Item not exported in script: NewType', 4)
|
||||
|
||||
# Using the same name as an imported type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
export type MyType2 = list<number>
|
||||
END
|
||||
writefile(lines, 'Xtypeexport3.vim', 'D')
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport3.vim' as A
|
||||
|
||||
type MyType2 = A.MyType2
|
||||
var myList1: A.MyType2 = [1, 2, 3]
|
||||
var myList2: MyType2 = [4, 5, 6]
|
||||
assert_equal([1, 2, 3], myList1)
|
||||
assert_equal([4, 5, 6], myList2)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# Using an exported class to create a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
export class MyClass
|
||||
this.val = 10
|
||||
endclass
|
||||
END
|
||||
writefile(lines, 'Xtypeexport4.vim', 'D')
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport4.vim' as T
|
||||
|
||||
type MyType3 = T.MyClass
|
||||
var c: MyType3 = T.MyClass.new()
|
||||
assert_equal(10, c.val)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for using typealias as a def function argument and return type
|
||||
def Test_typealias_func_argument()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo(l: A): A
|
||||
assert_equal([1, 2], l)
|
||||
return l
|
||||
enddef
|
||||
var x: A = [1, 2]
|
||||
assert_equal([1, 2], Foo(x))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# passing a type alias variable to a function expecting a specific type
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo(l: list<number>)
|
||||
assert_equal([1, 2], l)
|
||||
enddef
|
||||
var x: A = [1, 2]
|
||||
Foo(x)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# passing a type alias variable to a function expecting any
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo(l: any)
|
||||
assert_equal([1, 2], l)
|
||||
enddef
|
||||
var x: A = [1, 2]
|
||||
Foo(x)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Using a type alias with a builtin function
|
||||
def Test_typealias_with_builtin_functions()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
type A = list<func>
|
||||
assert_equal(0, empty(A))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# Using a type alias with len()
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<func>
|
||||
var x = len(A)
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E701: Invalid type for len()', 3)
|
||||
|
||||
# Using a type alias with len()
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<func>
|
||||
def Foo()
|
||||
var x = len(A)
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1013: Argument 1: type mismatch, expected list<any> but got typealias', 1)
|
||||
|
||||
# Using a type alias with eval()
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = number
|
||||
def Foo()
|
||||
var x = eval("A")
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1403: Type alias "A" cannot be used as a value', 1)
|
||||
enddef
|
||||
|
||||
" Test for type alias refcount
|
||||
def Test_typealias_refcount()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
type A = list<func>
|
||||
assert_equal(1, test_refcount(A))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type B = list<number>
|
||||
var x: B = []
|
||||
assert_equal(1, test_refcount(B))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for using instanceof() with a type alias
|
||||
def Test_typealias_instanceof()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
class C
|
||||
endclass
|
||||
|
||||
type Ctype = C
|
||||
var o = C.new()
|
||||
assert_equal(1, instanceof(o, Ctype))
|
||||
type Ntype = number
|
||||
assert_fails('instanceof(o, Ntype)', 'E693: List or Class required for argument 2')
|
||||
assert_equal(1, instanceof(o, [Ctype]))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for type aliasing a class
|
||||
def Test_typealias_class()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
class C
|
||||
this.color = 'green'
|
||||
endclass
|
||||
type MyClass = C
|
||||
var o: MyClass = MyClass.new()
|
||||
assert_equal('green', o.color)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Keep this last, it messes up highlighting.
|
||||
def Test_substitute_cmd()
|
||||
new
|
||||
|
||||
539
src/testdir/test_vim9_typealias.vim
Normal file
539
src/testdir/test_vim9_typealias.vim
Normal file
@@ -0,0 +1,539 @@
|
||||
" Test Vim9 type aliases
|
||||
|
||||
source check.vim
|
||||
import './vim9.vim' as v9
|
||||
|
||||
" Test for :type command to create type aliases
|
||||
def Test_typealias()
|
||||
# Use type alias at script level
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
type ListOfStrings = list<string>
|
||||
def Foo(a: ListOfStrings): ListOfStrings
|
||||
return a
|
||||
enddef
|
||||
var b: ListOfStrings = ['a', 'b']
|
||||
assert_equal(['a', 'b'], b)
|
||||
assert_equal(['e', 'f'], Foo(['e', 'f']))
|
||||
assert_equal('typealias<list<string>>', typename(ListOfStrings))
|
||||
assert_equal(v:t_typealias, type(ListOfStrings))
|
||||
assert_equal('ListOfStrings', string(ListOfStrings))
|
||||
assert_equal(false, null == ListOfStrings)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Use type alias at def function level
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type ListOfStrings = list<string>
|
||||
def Foo(a: ListOfStrings): ListOfStrings
|
||||
return a
|
||||
enddef
|
||||
def Bar()
|
||||
var c: ListOfStrings = ['c', 'd']
|
||||
assert_equal(['c', 'd'], c)
|
||||
assert_equal(['e', 'f'], Foo(['e', 'f']))
|
||||
assert_equal('typealias<list<string>>', typename(ListOfStrings))
|
||||
assert_equal(v:t_typealias, type(ListOfStrings))
|
||||
assert_equal('ListOfStrings', string(ListOfStrings))
|
||||
assert_equal(false, null == ListOfStrings)
|
||||
enddef
|
||||
Bar()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Use :type outside a Vim9 script
|
||||
lines =<< trim END
|
||||
type Index = number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1393: Type can only be defined in Vim9 script', 1)
|
||||
|
||||
# Use :type without any arguments
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1397: Missing type alias name', 2)
|
||||
|
||||
# Use :type with a name but no type
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType
|
||||
END
|
||||
v9.CheckSourceFailure(lines, "E398: Missing '=': ", 2)
|
||||
|
||||
# Use :type with a name but no type following "="
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType =
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1398: Missing type alias type', 2)
|
||||
|
||||
# No space before or after "="
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType=number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1315: White space required after name: MyType=number', 2)
|
||||
|
||||
# No space after "="
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType =number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, "E1069: White space required after '=': =number", 2)
|
||||
|
||||
# type alias without "="
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type Index number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, "E398: Missing '=': number", 2)
|
||||
|
||||
# type alias for a non-existing type
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type Index = integer
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1010: Type not recognized: integer', 2)
|
||||
|
||||
# type alias starting with lower-case letter
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type index = number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1394: Type name must start with an uppercase letter: index = number', 2)
|
||||
|
||||
# No white space following the alias name
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type Index:number
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1315: White space required after name: Index:number', 2)
|
||||
|
||||
# something following the type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type ListOfNums = list<number> string
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E488: Trailing characters: string', 2)
|
||||
|
||||
# type alias name collides with a variable name
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
var ListOfNums: number = 10
|
||||
type ListOfNums = list<number>
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1041: Redefining script item: "ListOfNums"', 3)
|
||||
|
||||
# duplicate type alias name
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyList = list<number>
|
||||
type MyList = list<string>
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1396: Type alias "MyList" already exists', 3)
|
||||
|
||||
# def function argument name collision with a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo(A: number)
|
||||
enddef
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1168: Argument already declared in the script: A: number)', 3)
|
||||
|
||||
# def function local variable name collision with a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo()
|
||||
var A: number = 10
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1054: Variable already declared in the script: A', 1)
|
||||
|
||||
# type alias a variable
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
var A: list<number> = []
|
||||
type B = A
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1010: Type not recognized: A', 3)
|
||||
|
||||
# type alias a class
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
class C
|
||||
endclass
|
||||
type AC = C
|
||||
assert_equal('class<C>', typename(AC))
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Sourcing a script twice (which will free script local variables)
|
||||
# Uses "lines" from the previous test
|
||||
new
|
||||
setline(1, lines)
|
||||
:source
|
||||
:source
|
||||
bw!
|
||||
|
||||
# type alias a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = string
|
||||
type B = A
|
||||
var b: B = 'abc'
|
||||
assert_equal('abc', b)
|
||||
def Foo()
|
||||
var c: B = 'def'
|
||||
assert_equal('def', c)
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Assigning to a type alias (script level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
MyType = [1, 2, 3]
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1395: Type alias "MyType" cannot be modified', 3)
|
||||
|
||||
# Assigning a type alias (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<string>
|
||||
def Foo()
|
||||
var x = A
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1403: Type alias "A" cannot be used as a value', 1)
|
||||
|
||||
# Using type alias in an expression (script level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
assert_fails('var m = MyType', 'E1403: Type alias "MyType" cannot be used as a value')
|
||||
assert_fails('var i = MyType + 1', 'E1400: Using type alias "MyType" as a Number')
|
||||
assert_fails('var f = 1.0 + MyType', 'E1400: Using type alias "MyType" as a Number')
|
||||
assert_fails('MyType += 10', 'E1395: Type alias "MyType" cannot be modified')
|
||||
assert_fails('var x = $"-{MyType}-"', 'E1402: Using type alias "MyType" as a String')
|
||||
assert_fails('var x = MyType[1]', 'E909: Cannot index a special variable')
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
|
||||
# Using type alias in an expression (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
def Foo()
|
||||
var x = MyType + 1
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1051: Wrong argument type for +', 1)
|
||||
|
||||
# Using type alias in an expression (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
def Foo()
|
||||
MyType = list<string>
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E46: Cannot change read-only variable "MyType"', 1)
|
||||
|
||||
# Using type alias in an expression (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
def Foo()
|
||||
MyType += 10
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E46: Cannot change read-only variable "MyType"', 1)
|
||||
|
||||
# Convert type alias to a string (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = list<number>
|
||||
def Foo()
|
||||
var x = $"-{MyType}-"
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1105: Cannot convert typealias to string', 1)
|
||||
|
||||
# Using type alias as a float
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type B = number
|
||||
sort([1.1, B], 'f')
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1401: Using type alias "B" as a Float', 3)
|
||||
|
||||
# Creating a typealias in a def function
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
def Foo()
|
||||
var n: number = 10
|
||||
type A = list<string>
|
||||
enddef
|
||||
defcompile
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1399: Type can only be used in a script', 2)
|
||||
|
||||
# json_encode should fail with a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<string>
|
||||
var x = json_encode(A)
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1161: Cannot json encode a typealias', 3)
|
||||
|
||||
# Comparing type alias with a number (script level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<string>
|
||||
var n: number
|
||||
var x = A == n
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1072: Cannot compare typealias with number', 4)
|
||||
|
||||
# Comparing type alias with a number (def function level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<string>
|
||||
def Foo()
|
||||
var n: number
|
||||
var x = A == n
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckSourceFailure(lines, 'E1072: Cannot compare typealias with number', 2)
|
||||
|
||||
# casting a number to a type alias (script level)
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type MyType = bool
|
||||
assert_equal(true, <MyType>1 == true)
|
||||
END
|
||||
v9.CheckSourceSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for exporting and importing type aliases
|
||||
def Test_typealias_import()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
export type MyType = list<number>
|
||||
END
|
||||
writefile(lines, 'Xtypeexport.vim', 'D')
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport.vim' as A
|
||||
|
||||
var myList: A.MyType = [1, 2, 3]
|
||||
def Foo(l: A.MyType)
|
||||
assert_equal([1, 2, 3], l)
|
||||
enddef
|
||||
Foo(myList)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# Use a non existing type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport.vim' as A
|
||||
|
||||
var myNum: A.SomeType = 10
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1010: Type not recognized: A.SomeType = 10', 4)
|
||||
|
||||
# Use a type alias that is not exported
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type NewType = dict<string>
|
||||
END
|
||||
writefile(lines, 'Xtypeexport2.vim', 'D')
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport2.vim' as A
|
||||
|
||||
var myDict: A.NewType = {}
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1049: Item not exported in script: NewType', 4)
|
||||
|
||||
# Using the same name as an imported type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
export type MyType2 = list<number>
|
||||
END
|
||||
writefile(lines, 'Xtypeexport3.vim', 'D')
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport3.vim' as A
|
||||
|
||||
type MyType2 = A.MyType2
|
||||
var myList1: A.MyType2 = [1, 2, 3]
|
||||
var myList2: MyType2 = [4, 5, 6]
|
||||
assert_equal([1, 2, 3], myList1)
|
||||
assert_equal([4, 5, 6], myList2)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# Using an exported class to create a type alias
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
export class MyClass
|
||||
this.val = 10
|
||||
endclass
|
||||
END
|
||||
writefile(lines, 'Xtypeexport4.vim', 'D')
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
import './Xtypeexport4.vim' as T
|
||||
|
||||
type MyType3 = T.MyClass
|
||||
var c: MyType3 = MyType3.new()
|
||||
assert_equal(10, c.val)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for using typealias as a def function argument and return type
|
||||
def Test_typealias_func_argument()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo(l: A): A
|
||||
assert_equal([1, 2], l)
|
||||
return l
|
||||
enddef
|
||||
var x: A = [1, 2]
|
||||
assert_equal([1, 2], Foo(x))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# passing a type alias variable to a function expecting a specific type
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo(l: list<number>)
|
||||
assert_equal([1, 2], l)
|
||||
enddef
|
||||
var x: A = [1, 2]
|
||||
Foo(x)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# passing a type alias variable to a function expecting any
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<number>
|
||||
def Foo(l: any)
|
||||
assert_equal([1, 2], l)
|
||||
enddef
|
||||
var x: A = [1, 2]
|
||||
Foo(x)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Using a type alias with a builtin function
|
||||
def Test_typealias_with_builtin_functions()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
type A = list<func>
|
||||
assert_equal(0, empty(A))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
# Using a type alias with len()
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<func>
|
||||
var x = len(A)
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E701: Invalid type for len()', 3)
|
||||
|
||||
# Using a type alias with len()
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = list<func>
|
||||
def Foo()
|
||||
var x = len(A)
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1013: Argument 1: type mismatch, expected list<any> but got typealias', 1)
|
||||
|
||||
# Using a type alias with eval()
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type A = number
|
||||
def Foo()
|
||||
var x = eval("A")
|
||||
enddef
|
||||
Foo()
|
||||
END
|
||||
v9.CheckScriptFailure(lines, 'E1403: Type alias "A" cannot be used as a value', 1)
|
||||
enddef
|
||||
|
||||
" Test for type alias refcount
|
||||
def Test_typealias_refcount()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
type A = list<func>
|
||||
assert_equal(1, test_refcount(A))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
|
||||
lines =<< trim END
|
||||
vim9script
|
||||
type B = list<number>
|
||||
var x: B = []
|
||||
assert_equal(1, test_refcount(B))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for using instanceof() with a type alias
|
||||
def Test_typealias_instanceof()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
class C
|
||||
endclass
|
||||
|
||||
type Ctype = C
|
||||
var o = C.new()
|
||||
assert_equal(1, instanceof(o, Ctype))
|
||||
type Ntype = number
|
||||
assert_fails('instanceof(o, Ntype)', 'E693: List or Class required for argument 2')
|
||||
assert_equal(1, instanceof(o, [Ctype]))
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" Test for type aliasing a class
|
||||
def Test_typealias_class()
|
||||
var lines =<< trim END
|
||||
vim9script
|
||||
class C
|
||||
this.color = 'green'
|
||||
endclass
|
||||
type MyClass = C
|
||||
var o: MyClass = MyClass.new()
|
||||
assert_equal('green', o.color)
|
||||
END
|
||||
v9.CheckScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
|
||||
@@ -704,6 +704,34 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
2093,
|
||||
/**/
|
||||
2092,
|
||||
/**/
|
||||
2091,
|
||||
/**/
|
||||
2090,
|
||||
/**/
|
||||
2089,
|
||||
/**/
|
||||
2088,
|
||||
/**/
|
||||
2087,
|
||||
/**/
|
||||
2086,
|
||||
/**/
|
||||
2085,
|
||||
/**/
|
||||
2084,
|
||||
/**/
|
||||
2083,
|
||||
/**/
|
||||
2082,
|
||||
/**/
|
||||
2081,
|
||||
/**/
|
||||
2080,
|
||||
/**/
|
||||
2079,
|
||||
/**/
|
||||
|
||||
@@ -1558,25 +1558,26 @@ early_ret:
|
||||
}
|
||||
|
||||
if (!is_class)
|
||||
// ignore "abstract" in an interface (as all the methods in an
|
||||
// interface are abstract.
|
||||
p = skipwhite(pa + 8);
|
||||
else
|
||||
{
|
||||
if (!is_abstract)
|
||||
{
|
||||
semsg(_(e_abstract_method_in_concrete_class), pa);
|
||||
break;
|
||||
}
|
||||
|
||||
abstract_method = TRUE;
|
||||
p = skipwhite(pa + 8);
|
||||
if (STRNCMP(p, "def", 3) != 0 && STRNCMP(p, "static", 6) != 0)
|
||||
{
|
||||
emsg(_(e_abstract_must_be_followed_by_def_or_static));
|
||||
break;
|
||||
}
|
||||
// "abstract" not supported in an interface
|
||||
emsg(_(e_abstract_cannot_be_used_in_interface));
|
||||
break;
|
||||
}
|
||||
|
||||
if (!is_abstract)
|
||||
{
|
||||
semsg(_(e_abstract_method_in_concrete_class), pa);
|
||||
break;
|
||||
}
|
||||
|
||||
p = skipwhite(pa + 8);
|
||||
if (STRNCMP(p, "def", 3) != 0)
|
||||
{
|
||||
emsg(_(e_abstract_must_be_followed_by_def));
|
||||
break;
|
||||
}
|
||||
|
||||
abstract_method = TRUE;
|
||||
}
|
||||
|
||||
int has_static = FALSE;
|
||||
|
||||
@@ -2221,15 +2221,6 @@ compile_load_lhs(
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (lhs->lhs_type->tt_type == VAR_DICT && var_start[varlen] == '[')
|
||||
{
|
||||
// If the lhs is a Dict variable and an item is accessed by "[",
|
||||
// then need to convert the key into a string. The top item in the
|
||||
// type stack is the Dict and the second last item is the key.
|
||||
if (may_generate_2STRING(-2, FALSE, cctx) == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
// Now we can properly check the type. The variable is indexed, thus
|
||||
// we need the member type. For a class or object we don't know the
|
||||
// type yet, it depends on what member is used.
|
||||
|
||||
Reference in New Issue
Block a user