Compare commits

...

15 Commits

Author SHA1 Message Date
87757c6b0a patch 9.1.1552: [security]: path traversal issue in tar.vim
Problem:  [security]: path traversal issue in tar.vim
          (@ax)
Solution: warn the user for such things, drop leading /, don't
          forcefully overwrite files when writing temporary files,
          refactor autoload/tar.vim

tar.vim: drop leading / in path names

A tar archive containing files with leading `/` may cause confusions as
to where the content is extracted.  Let's make sure we drop the leading
`/` and use a relative path instead.

Also while at it, had to refactor it quite a bit and increase the
minimum supported Vim version to v9. Also add a test for some basic tar
functionality

closes: #17733
2025-07-15 21:58:08 +02:00
586294a041 patch 9.1.1551: [security]: path traversal issue in zip.vim
Problem:  [security]: path traversal issue in zip.vim (@ax)
Solution: drop leading ../ on write of zipfiles, don't forcefully
          overwrite existing files

A zip plugin which contains filenames with leading '../'  may cause
confusion as to where the content will be extracted.  Let's drop such
things and make sure we use a relative filename instead and don't
forcefully overwrite temporary files. Also, warn the user of such
things.

related: #17733

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:57:48 +02:00
3f9d2378bd patch 9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix
Problem:  defaults: 'showcmd' is not enabled in non-compatible mode on
          Unix
Solution: Always enable 'showcmd' in non-compatible mode, drop it from
          defaults.vim.

'showcmd' was already always enabled in Vim compatible mode except for
UNIX environments. So let's just enable it always, there is no good
reason why UNIX platforms should be handled differently than other
platforms, especially since `defaults.vim` did enable this option
anyhow.

closes: #17739

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:26:25 +02:00
d128889b30 patch 9.1.1549: filetype: pkl files are not recognized
Problem:  filetype: pkl files are not recognized
Solution: detect *.pkl files as pkl filetype, include
          a filetype plugin (Riley Bruins)

References:
https://pkl-lang.org/
https://github.com/apple/pkl

closes: #17751

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:21:29 +02:00
0992f62fc1 patch 9.1.1548: filetype: OpenFGA files are not recognized
Problem:  filetype: OpenFGA files are not recognized
Solution: detect *.fga files as fga filetype, include an fga filetype
          plugin (Riley Bruins)

References:
https://github.com/openfga
https://marketplace.visualstudio.com/items?itemName=openfga.openfga-vscode

closes: #17752

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:17:02 +02:00
9a667b4dba runtime(swig): add 'comments', 'commentstring' in filetype plugin
Reference:
https://www.swig.org/Doc1.3/SWIG.html#SWIG_nn5

closes: #17753

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:13:41 +02:00
30df42557c runtime(twig): include twig filetype plugin
closes: #17754

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:09:43 +02:00
690a42d54e patch 9.1.1547: Wayland: missing ifdef
Problem:  Wayland: missing ifdef
Solution: Add #ifdef around ch_log() call
          (Foxe Chen)

closes: #17763

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:06:37 +02:00
5d552d652b translation: ignore vim.pot creation date, regenerate it, rm allfiles
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:03:39 +02:00
8de753148f patch 9.1.1546: Vim9: error with has() and short circuit evaluation
Problem:  Vim9: error with has() and short circuit evaluation
Solution: Only eval, if ctx_skip is not SKIP_YES (Yegappan Lakshmanan).

fixes: #17750
closes: #17755

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 20:30:52 +02:00
edce68912e runtime(python2): Highlight b-strings in Python 2.7
related: #14033
related: #17726

closes: #17757

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 20:23:59 +02:00
3ab6941713 runtime(doc): Tweak documentation
closes: #17759

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 20:06:49 +02:00
f10fa3928c patch 9.1.1545: typo in os_unix.c
Problem:  Typo in os_unix.c
Solution: Correct the typo (Foxe Chen)

closes: #17761

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 20:02:57 +02:00
a24f5be86d runtime(python): highlight bytes in python
- Highlight bytes literals
- Do not highlight Unicode escape sequences in bytes literals

fixes: #14033
fixes: #17726
closes: #17728

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:30:59 +02:00
baa781a4c3 runtime(python2): highlight unicode strings in python2
fixes: #14033
fixes: #17726
closes: #17729

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:21:44 +02:00
56 changed files with 1279 additions and 330 deletions

5
.gitattributes vendored
View File

@ -1 +1,6 @@
src/testdir/test42.in diff
# ignore vim.pot creation date when diffing
# set this up using:
# git config diff.ignore_pot_date.textconv 'grep -v "^.POT-Creation-Date:.*"'
src/po/vim.pot diff=ignore_pot_date

3
.github/MAINTAINERS vendored
View File

@ -163,6 +163,7 @@ runtime/ftplugin/expect.vim @dkearns
runtime/ftplugin/exports.vim @mperry2
runtime/ftplugin/fennel.vim @gpanders
runtime/ftplugin/fetchmail.vim @dkearns
runtime/ftplugin/fga.vim @ribru17
runtime/ftplugin/forth.vim @jkotlinski
runtime/ftplugin/fpcmake.vim @dkearns
runtime/ftplugin/freebasic.vim @dkearns
@ -251,6 +252,7 @@ runtime/ftplugin/pbtxt.vim @lakshayg
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/perl.vim @petdance @dkearns
runtime/ftplugin/php.vim @dkearns
runtime/ftplugin/pkl.vim @ribru17
runtime/ftplugin/plsql.vim @lee-lindley
runtime/ftplugin/pod.vim @petdance @dkearns
runtime/ftplugin/poefilter.vim @ObserverOfTime
@ -308,6 +310,7 @@ runtime/ftplugin/tidy.vim @dkearns
runtime/ftplugin/tmux.vim @ericpruitt
runtime/ftplugin/toml.vim @averms
runtime/ftplugin/tt2html.vim @petdance
runtime/ftplugin/twig.vim @ribru17
runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
runtime/ftplugin/typst.vim @saccarosium

View File

@ -212,7 +212,10 @@ SRC_ALL = \
src/testdir/samples/*.html \
src/testdir/samples/*.txt \
src/testdir/samples/*.vim \
src/testdir/samples/evil.zip \
src/testdir/samples/evil.tar \
src/testdir/samples/poc.zip \
src/testdir/samples/sample.tar \
src/testdir/samples/test.zip \
src/testdir/samples/test000 \
src/testdir/samples/test_undo.txt.undo \

View File

@ -16,6 +16,7 @@
" instead of shelling out to file(1)
" 2025 Apr 16 by Vim Project: decouple from netrw by adding s:WinPath()
" 2025 May 19 by Vim Project: restore working directory after read/write
" 2025 Jul 13 by Vim Project: warn with path traversal attacks
"
" Contains many ideas from Michael Toren's <tar.vim>
"
@ -34,9 +35,9 @@ if &cp || exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v32b"
if v:version < 702
if v:version < 900
echohl WarningMsg
echo "***warning*** this version of tar needs vim 7.2"
echo "***warning*** this version of tar needs vim 9.0"
echohl Normal
finish
endif
@ -46,10 +47,10 @@ set cpo&vim
" ---------------------------------------------------------------------
" Default Settings: {{{1
if !exists("g:tar_browseoptions")
let g:tar_browseoptions= "Ptf"
let g:tar_browseoptions= "tf"
endif
if !exists("g:tar_readoptions")
let g:tar_readoptions= "pPxf"
let g:tar_readoptions= "pxf"
endif
if !exists("g:tar_cmd")
let g:tar_cmd= "tar"
@ -58,6 +59,7 @@ if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
if !exists("g:tar_delfile")
" Note: not supported on BSD
let g:tar_delfile="--delete -f"
endif
if !exists("g:netrw_cygwin")
@ -106,10 +108,26 @@ if !exists("g:tar_shq")
endif
endif
let g:tar_secure=' -- '
let g:tar_leading_pat='^\%([.]\{,2\}/\)\+'
" ----------------
" Functions: {{{1
" ----------------
" ---------------------------------------------------------------------
" s:Msg: {{{2
fun! s:Msg(func, severity, msg)
redraw!
if a:severity =~? 'error'
echohl Error
else
echohl WarningMsg
endif
echo $"***{a:severity}*** ({a:func}) {a:msg}"
echohl None
endfunc
" ---------------------------------------------------------------------
" tar#Browse: {{{2
fun! tar#Browse(tarfile)
@ -118,16 +136,14 @@ fun! tar#Browse(tarfile)
" sanity checks
if !executable(g:tar_cmd)
redraw!
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call s:Msg('tar#Browse', 'error', $"{g:tar_cmd} not available on your system")
let &report= repkeep
return
endif
if !filereadable(a:tarfile)
if a:tarfile !~# '^\a\+://'
" if it's an url, don't complain, let url-handlers such as vim do its thing
redraw!
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
call s:Msg('tar#Browse', 'error', $"File not readable<{a:tarfile}>")
endif
let &report= repkeep
return
@ -203,28 +219,18 @@ fun! tar#Browse(tarfile)
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
endif
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
call s:Msg('tar#Browse', 'warning', $"please check your g:tar_browseoptions '<{g:tar_browseoptions}>'")
return
endif
"
" The following should not be neccessary, since in case of errors the
" previous if statement should have caught the problem (because tar 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
" let eikeep= &ei
" set ei=BufReadCmd,FileReadCmd
" exe "r ".fnameescape(a:tarfile)
" let &ei= eikeep
" keepj sil! 1d
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
" return
" endif
" remove tar: Removing leading '/' from member names
" Note: the message could be localized
if search('^tar: ') > 0 || search(g:tar_leading_pat) > 0
call append(3,'" Note: Path Traversal Attack detected!')
let b:leading_slash = 1
" remove the message output
sil g/^tar: /d
endif
" set up maps supported for tar
setlocal noma nomod ro
@ -243,12 +249,7 @@ fun! s:TarBrowseSelect()
let repkeep= &report
set report=10
let fname= getline(".")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
return
endif
let ls= get(b:, 'leading_slash', 0)
" sanity check
if fname =~ '^"'
@ -270,7 +271,8 @@ fun! s:TarBrowseSelect()
wincmd _
endif
let s:tblfile_{winnr()}= curfile
call tar#Read("tarfile:".tarfile.'::'.fname,1)
let b:leading_slash= ls
call tar#Read("tarfile:".tarfile.'::'.fname)
filetype detect
set nomod
exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(<q-args>,"'.fnameescape(fname).'")'
@ -280,26 +282,18 @@ endfun
" ---------------------------------------------------------------------
" tar#Read: {{{2
fun! tar#Read(fname,mode)
fun! tar#Read(fname)
let repkeep= &report
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
" be careful not to execute special crafted files
let escape_file = fname->fnameescape()
" changing the directory to the temporary earlier to allow tar to extract the file with permissions intact
if !exists("*mkdir")
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
let &report= repkeep
return
endif
let escape_file = fname->substitute(g:tar_leading_pat, '', '')->fnameescape()
let curdir= getcwd()
let b:curdir= curdir
let tmpdir= tempname()
let b:curdir= tmpdir
let b:tmpdir= curdir
let b:tmpdir= tmpdir
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
@ -309,8 +303,7 @@ fun! tar#Read(fname,mode)
try
exe "lcd ".fnameescape(tmpdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
echohl Error | echo "***error*** (tar#Write) cannot lcd to temporary directory" | Echohl None
call s:Msg('tar#Read', 'error', "cannot lcd to temporary directory")
let &report= repkeep
return
endtry
@ -356,68 +349,66 @@ fun! tar#Read(fname,mode)
endif
endif
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
if tarfile =~# '\.bz2$'
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.bz3$'
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(gz\)$'
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\(\.tgz\|\.tbz\|\.txz\)'
let filekind= s:Header(tarfile)
if filekind =~? "bzip2"
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~ "bzip3"
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "xz"
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "zstd"
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "gzip"
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
endif
elseif tarfile =~# '\.lrp$'
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.lzma$'
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(xz\|txz\)$'
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(lz4\|tlz4\)$'
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
endif
if get(b:, 'leading_slash', 0)
sil g/^tar: /d
endif
redraw!
if v:shell_error != 0
if v:shell_error != 0
lcd ..
call s:Rmdir("_ZIPVIM_")
exe "lcd ".fnameescape(curdir)
echohl Error | echo "***error*** (tar#Read) sorry, unable to open or extract ".tarfile." with ".fname | echohl None
call s:Msg('tar#Read', 'error', $"sorry, unable to open or extract {tarfile} with {fname}")
endif
if doro
@ -426,7 +417,6 @@ if v:shell_error != 0
endif
let b:tarfile= a:fname
exe "file tarfile::".fnameescape(fname)
" cleanup
keepj sil! 0d
@ -434,7 +424,7 @@ if v:shell_error != 0
let &report= repkeep
exe "lcd ".fnameescape(curdir)
silent exe "file tarfile::".escape_file
silent exe "file tarfile::". fname->fnameescape()
endfun
" ---------------------------------------------------------------------
@ -446,22 +436,35 @@ fun! tar#Write(fname)
let curdir= b:curdir
let tmpdir= b:tmpdir
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"'
return
endif
" sanity checks
if !executable(g:tar_cmd)
redraw!
let &report= repkeep
return
endif
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
if get(b:, 'leading_slash', 0)
call s:Msg('tar#Write', 'error', $"sorry, not attempting to update {tarfile} with {fname}")
let &report= repkeep
return
endif
if !isdirectory(fnameescape(tmpdir))
call mkdir(fnameescape(tmpdir), 'p')
endif
exe $"lcd {fnameescape(tmpdir)}"
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
lcd _ZIPVIM_
let dir = fnamemodify(fname, ':p:h')
if dir !~# '_ZIPVIM_$'
call mkdir(dir)
endif
" handle compressed archives
if tarfile =~# '\.bz2'
call system("bzip2 -d -- ".shellescape(tarfile,0))
@ -500,8 +503,7 @@ fun! tar#Write(fname)
" Note: no support for name.tar.tbz/.txz/.tgz/.tlz4/.tzst
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {tarfile} with {fname}")
else
if fname =~ '/'
@ -519,28 +521,22 @@ fun! tar#Write(fname)
let tarfile = substitute(tarfile, '-', './-', '')
endif
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
exe "w! ".fnameescape(fname)
" don't overwrite a file forcefully
exe "w ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
endif
" delete old file from tarfile
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
" Note: BSD tar does not support --delete flag
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {fnameescape(tarfile)} with {fnameescape(fname)} --delete not supported?")
else
" update tarfile with new file
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {fnameescape(tarfile)} with {fnameescape(fname)}")
elseif exists("compress")
call system(compress)
if exists("tgz")
@ -581,6 +577,7 @@ fun! tar#Diff(userfname,fname)
if a:userfname != ""
let fname= a:userfname
endif
exe "lcd ".fnameescape(b:tmpdir). '/_ZIPVIM_'
if filereadable(fname)
" sets current file (from tarball) for diff'ing
" splits window vertically
@ -604,12 +601,6 @@ fun! tar#Extract()
set report=10
let fname= getline(".")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
return
endif
" sanity check
if fname =~ '^"'
let &report= repkeep
@ -623,16 +614,16 @@ fun! tar#Extract()
if filereadable(tarbase.".tar")
call system(extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
echo "***note*** successfully extracted ". fname
endif
elseif filereadable(tarbase.".tgz")
let extractcmd= substitute(extractcmd,"-","-z","")
call system(extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tgz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tgz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -641,7 +632,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-z","")
call system(extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.gz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -650,7 +641,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tbz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -659,7 +650,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz2 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -668,7 +659,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tar.bz3 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz3 ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz3 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -677,7 +668,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-J","")
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.txz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -686,7 +677,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-J","")
call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.xz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -695,7 +686,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","--zstd","")
call system(extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tzst {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -704,7 +695,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","--zstd","")
call system(extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.zst {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -713,7 +704,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tlz4 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tlz4 ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tlz4 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -722,7 +713,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tar.lz4".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.lz4 ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.lz4 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -735,15 +726,7 @@ endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
fun! s:Rmdir(fname)
if has("unix")
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
elseif has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~? "sh$"
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
else
call system("del /S ".shellescape(a:fname,0))
endif
endif
call delete(a:fname, 'rf')
endfun
" s:FileHeader: {{{2

View File

@ -15,6 +15,7 @@
" 2024 Aug 18 by Vim Project: correctly handle special globbing chars
" 2024 Aug 21 by Vim Project: simplify condition to detect MS-Windows
" 2025 Mar 11 by Vim Project: handle filenames with leading '-' correctly
" 2025 Jul 12 by Vim Project: drop ../ on write to prevent path traversal attacks
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@ -236,6 +237,7 @@ endfun
" zip#Write: {{{2
fun! zip#Write(fname)
let dict = s:SetSaneOpts()
let need_rename = 0
defer s:RestoreOpts(dict)
" sanity checks
@ -243,10 +245,6 @@ fun! zip#Write(fname)
call s:Mess('Error', "***error*** (zip#Write) sorry, your system doesn't appear to have the ".g:zip_zipcmd." program")
return
endif
if !exists("*mkdir")
call s:Mess('Error', "***error*** (zip#Write) sorry, mkdir() doesn't work on your system")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
@ -274,6 +272,11 @@ fun! zip#Write(fname)
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
endif
if fname =~ '^[.]\{1,2}/'
call system(g:zip_zipcmd." -d ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
let fname = fname->substitute('^\([.]\{1,2}/\)\+', '', 'g')
let need_rename = 1
endif
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
@ -286,7 +289,8 @@ fun! zip#Write(fname)
let zipfile= curdir.'/'.zipfile
endif
exe "w! ".fnameescape(fname)
" don't overwrite files forcefully
exe "w ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
endif
@ -312,6 +316,9 @@ fun! zip#Write(fname)
let &binary = binkeep
q!
unlet s:zipfile_{winnr()}
elseif need_rename
exe $"sil keepalt file {fnameescape($"zipfile://{zipfile}::{fname}")}"
call s:Mess('Warning', "***error*** (zip#Browse) Path Traversal Attack detected, dropping relative path")
endif
" cleanup and restore current directory
@ -320,7 +327,6 @@ fun! zip#Write(fname)
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
call delete(tmpdir, "rf")
setlocal nomod
endfun
" ---------------------------------------------------------------------
@ -338,6 +344,9 @@ fun! zip#Extract()
if fname =~ '/$'
call s:Mess('Error', "***error*** (zip#Extract) Please specify a file, not a directory")
return
elseif fname =~ '^[.]\?[.]/'
call s:Mess('Error', "***error*** (zip#Browse) Path Traversal Attack detected, not extracting!")
return
endif
if filereadable(fname)
call s:Mess('Error', "***error*** (zip#Extract) <" .. fname .."> already exists in directory, not overwriting!")
@ -369,7 +378,6 @@ fun! zip#Extract()
else
echomsg "***note*** successfully extracted ".fname
endif
endfun
" ---------------------------------------------------------------------

View File

@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2025 Apr 10
" Last Change: 2025 Jul 13
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
"
" This is loaded if no vimrc file was found.
@ -34,7 +34,6 @@ silent! while 0
silent! endwhile
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set ttimeout " time out for key codes
set ttimeoutlen=100 " wait up to 100ms after Esc for special key

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 9.1. Last change: 2025 Jul 14
*change.txt* For Vim version 9.1. Last change: 2025 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*fold.txt* For Vim version 9.1. Last change: 2025 Jul 13
*fold.txt* For Vim version 9.1. Last change: 2025 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar
@ -651,7 +651,7 @@ all lines of the fold.
This does not happen for |:folddoopen| and |:folddoclosed|.
Note that for some Ex commands like |:source| the range is only adjusted when
using a two-address [range].
using a two line specifiers [range].
When editing a buffer that has been edited before, the last used folding
settings are used again. For manual folding the defined folds are restored.

View File

@ -1,4 +1,4 @@
*options.txt* For Vim version 9.1. Last change: 2025 Jul 10
*options.txt* For Vim version 9.1. Last change: 2025 Jul 13
VIM REFERENCE MANUAL by Bram Moolenaar
@ -7727,8 +7727,7 @@ A jump table for the options with a short description can be found at |Q_op|.
:setlocal showbreak=NONE
<
*'showcmd'* *'sc'* *'noshowcmd'* *'nosc'*
'showcmd' 'sc' boolean (Vim default: on, off for Unix,
Vi default: off, set in |defaults.vim|)
'showcmd' 'sc' boolean (Vim default: on, Vi default: off)
global
Show (partial) command in the last line of the screen. Set this
option off if your terminal is slow.

View File

@ -1,11 +1,10 @@
*pi_tar.txt* For Vim version 9.1. Last change: 2025 Mar 16
*pi_tar.txt* For Vim version 9.1. Last change: 2025 Jul 15
+====================+
| Tar File Interface |
+====================+
Author: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
(remove NOSPAM from Campbell's email first)
Original Author: Charles E. Campbell
Copyright 2005-2017: *tar-copyright*
The VIM LICENSE (see |copyright|) applies to the files in this
package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like
@ -61,7 +60,7 @@ Copyright 2005-2017: *tar-copyright*
the file mentioned in the tarball. If the current directory is not
correct for that path, :TarDiff will fail to find the associated file.
If the [filename] is given, that that filename (and path) will be used
If the [filename] is given, that filename (and path) will be used
to specify the associated file.
@ -95,24 +94,25 @@ Copyright 2005-2017: *tar-copyright*
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
*g:tar_cmd* "tar" the name of the tar program
*g:tar_nomax* 0 if true, file window will not be maximized
*g:tar_secure* undef if exists:
"--"s will be used to prevent unwanted
option expansion in tar commands.
Please be sure that your tar command
accepts "--"; Posix compliant tar
utilities do accept them.
if not exists:
The tar plugin will reject any tar
files or member files that begin with
"-"
Not all tar's support the "--" which is why
it isn't default.
*g:tar_writeoptions* "uf" used to update/replace a file
==============================================================================
4. History *tar-history*
unreleased:
Jul 13, 2025 * drop leading /
May 19, 2025 * restore working directory after read/write
Apr 16, 2025 * decouple from netrw by adding s:WinPath()
instead of shelling out to file(1)
Mar 02, 2025 * determine the compression using readblob()
Mar 02, 2025 * escape the filename before using :read
Mar 01, 2025 * fix syntax error in tar#Read()
Feb 28, 2025 * add support for bzip3 (#16755)
Feb 06, 2025 * add support for lz4 (#16591)
Nov 11, 2024 * support permissions (#7379)
Feb 19, 2024 * announce adoption
Jan 08, 2024 * fix a few problems (#138331, #12637, #8109)
v31 Apr 02, 2017 * (klartext) reported that browsing encrypted
files in a zip archive created unencrypted
swap files. I am applying a similar fix

View File

@ -1,4 +1,4 @@
*pi_zip.txt* For Vim version 9.1. Last change: 2025 Apr 02
*pi_zip.txt* For Vim version 9.1. Last change: 2025 Jul 15
+====================+
| Zip File Interface |
@ -111,6 +111,18 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
==============================================================================
4. History *zip-history* {{{1
unreleased:
Jul 12, 2025 * drop ../ on write to prevent path traversal attacks
Mar 11, 2025 * handle filenames with leading '-' correctly
Aug 21, 2024 * simplify condition to detect MS-Windows
Aug 18, 2024 * correctly handle special globbing chars
Aug 05, 2024 * clean-up and make it work with shellslash on Windows
Aug 05, 2024 * workaround for the FreeBSD's unzip
Aug 04, 2024 * escape '[' in name of file to be extracted
Jul 30, 2024 * fix opening remote zipfile
Jul 24, 2024 * use delete() function
Jul 23, 2024 * fix 'x' command
Jun 16, 2024 * handle whitespace on Windows properly (#14998)
v33 Dec 07, 2021 * *.xlam mentioned twice in zipPlugin
v32 Oct 22, 2021 * to avoid an issue with a vim 8.2 patch, zipfile: has
been changed to zipfile:// . This often shows up

View File

@ -1,4 +1,4 @@
*repeat.txt* For Vim version 9.1. Last change: 2025 Jul 09
*repeat.txt* For Vim version 9.1. Last change: 2025 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar
@ -237,7 +237,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
< Implementation detail: When sourcing a [range] of
lines that falls inside a folded region, the range
will be adjusted to the start and end of the fold,
but only if a two-address range was used.
but only if a two line specifiers range was used.
*:source!*
:so[urce]! {file} Read Vim commands from {file}. These are commands

View File

@ -7857,7 +7857,6 @@ g:tar_copycmd pi_tar.txt /*g:tar_copycmd*
g:tar_extractcmd pi_tar.txt /*g:tar_extractcmd*
g:tar_nomax pi_tar.txt /*g:tar_nomax*
g:tar_readoptions pi_tar.txt /*g:tar_readoptions*
g:tar_secure pi_tar.txt /*g:tar_secure*
g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions*
g:termdebug_config terminal.txt /*g:termdebug_config*
g:termdebugger terminal.txt /*g:termdebugger*

View File

@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 14
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar
@ -41648,6 +41648,9 @@ Default values: ~
- the default value of the 'keyprotocol' option has been updated and support
for the ghostty terminal emulator (using kitty protocol) has been added
- Improved visual highlighting |hl-Visual|
- the default value for 'showcmd' is always enabled when using non-compatible
mode (previously, it was off on UNIX systems) and consequently removed from
|defaults.vim|
Completion: ~
- allow to complete directories from 'cdpath' for |:cd| and similar commands,

View File

@ -889,6 +889,9 @@ autocmd BufRead,BufNewFile *.fnl,{,.}fennelrc setf fennel
" Fetchmail RC file
au BufNewFile,BufRead .fetchmailrc setf fetchmail
" FGA
au BufNewFile,BufRead *.fga setf fga
" FIRRTL - Flexible Internal Representation for RTL
au BufNewFile,BufRead *.fir setf firrtl
@ -1954,6 +1957,9 @@ au BufNewFile,BufRead Pipfile.lock setf json
" Pixi lock
au BufNewFile,BufRead pixi.lock setf yaml
" Pkl
au BufNewFile,BufRead *.pkl setf pkl
" PL/1, PL/I
au BufNewFile,BufRead *.pli,*.pl1 setf pli

13
runtime/ftplugin/fga.vim Normal file
View File

@ -0,0 +1,13 @@
" Vim filetype plugin
" Language: FGA
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2025 Jul 14
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setl comments=:# commentstring=#\ %s
let b:undo_ftplugin = 'setl com< cms<'

14
runtime/ftplugin/pkl.vim Normal file
View File

@ -0,0 +1,14 @@
" Vim filetype plugin
" Language: Pkl
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2025 Jul 14
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
let b:undo_ftplugin = 'setl com< cms<'

View File

@ -2,6 +2,7 @@
" Language: SWIG
" Maintainer: Julien Marrec <julien.marrec 'at' gmail com>
" Last Change: 2023 November 23
" 2025 July 14 by Vim project: set 'comment'/'commentstring' options
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@ -9,5 +10,7 @@ if exists("b:did_ftplugin")
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setlocal iskeyword<"
let b:undo_ftplugin = "setlocal iskeyword< comments< commentstring<"
setlocal iskeyword+=%
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s

14
runtime/ftplugin/twig.vim Normal file
View File

@ -0,0 +1,14 @@
" Vim filetype plugin
" Language: twig
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2025 Jul 14
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=s:{#,e:#}
setlocal commentstring={#\ %s\ #}
let b:undo_ftplugin = 'setl comments< commentstring<'

View File

@ -23,14 +23,14 @@ set cpo&vim
" Public Interface: {{{1
augroup tar
au!
au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"), 1)
au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"), 0)
au BufReadCmd tarfile::* call tar#Read(expand("<amatch>"))
au FileReadCmd tarfile::* call tar#Read(expand("<amatch>"))
au BufWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
au FileWriteCmd tarfile::* call tar#Write(expand("<amatch>"))
if has("unix")
au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 1)
au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"), 0)
au BufReadCmd tarfile::*/* call tar#Read(expand("<amatch>"))
au FileReadCmd tarfile::*/* call tar#Read(expand("<amatch>"))
au BufWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
endif

View File

@ -1,9 +1,10 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2023 Feb 28
" Last Change: 2025 Jul 14
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
" Rob B
"
" This version is a major rewrite by Zvezdan Petkovic.
"
@ -144,24 +145,48 @@ syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
" Triple-quoted strings can contain doctests.
syn region pythonString matchgroup=pythonQuotes
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ contains=pythonEscape,@Spell
\ contains=pythonEscape,pythonUnicodeEscape,@Spell
syn region pythonString matchgroup=pythonTripleQuotes
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
\ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
\ contains=pythonEscape,pythonUnicodeEscape,pythonSpaceError,pythonDoctest,@Spell
syn region pythonRawString matchgroup=pythonQuotes
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ start=+[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ contains=@Spell
syn region pythonRawString matchgroup=pythonTripleQuotes
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
\ start=+[rR]\z('''\|"""\)+ end="\z1" keepend
\ contains=pythonSpaceError,pythonDoctest,@Spell
" Bytes
syn region pythonBytes
\ matchgroup=pythonQuotes
\ start=+\cB\z(['"]\)+
\ end="\z1"
\ skip="\\\\\|\\\z1"
\ contains=pythonEscape
syn region pythonBytes
\ matchgroup=pythonTripleQuotes
\ start=+\cB\z('''\|"""\)+
\ end="\z1"
\ keepend
\ contains=pythonEscape
syn region pythonRawBytes
\ matchgroup=pythonQuotes
\ start=+\c\%(BR\|RB\)\z(['"]\)+
\ end="\z1"
\ skip="\\\\\|\\\z1"
syn region pythonRawBytes
\ matchgroup=pythonTripleQuotes
\ start=+\c\%(BR\|RB\)\z('''\|"""\)+
\ end="\z1"
\ keepend
syn match pythonEscape +\\[abfnrtv'"\\]+ contained
syn match pythonEscape "\\\o\{1,3}" contained
syn match pythonEscape "\\x\x\{2}" contained
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
syn match pythonUnicodeEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
" The specification: https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-4/#G135165
syn match pythonEscape "\\N{\a\+\%(\%(\s\a\+[[:alnum:]]*\)\|\%(-[[:alnum:]]\+\)\)*}" contained
syn match pythonUnicodeEscape "\\N{\a\+\%(\%(\s\a\+[[:alnum:]]*\)\|\%(-[[:alnum:]]\+\)\)*}" contained
syn match pythonEscape "\\$"
" It is very important to understand all details before changing the
@ -313,9 +338,12 @@ hi def link pythonComment Comment
hi def link pythonTodo Todo
hi def link pythonString String
hi def link pythonRawString String
hi def link pythonBytes String
hi def link pythonRawBytes String
hi def link pythonQuotes String
hi def link pythonTripleQuotes pythonQuotes
hi def link pythonEscape Special
hi def link pythonUnicodeEscape pythonEscape
if !exists("python_no_number_highlight")
hi def link pythonNumber Number
endif

View File

@ -2,8 +2,11 @@
" Language: Python 2
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2016 Oct 29
" 2025 Jul 14 by Vim project: highlight unicode strings
" 2025 Jul 15 by Vim project: highlight b-strings
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
" Rob B
"
" This version is a major rewrite by Zvezdan Petkovic.
"
@ -141,24 +144,53 @@ syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
" Triple-quoted strings can contain doctests.
syn region pythonString matchgroup=pythonQuotes
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ start=+[bB]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ contains=pythonEscape,@Spell
syn region pythonString matchgroup=pythonTripleQuotes
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
\ start=+[bB]\=\z('''\|"""\)+ end="\z1" keepend
\ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
syn region pythonRawString matchgroup=pythonQuotes
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ start=+[bB]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ contains=@Spell
syn region pythonRawString matchgroup=pythonTripleQuotes
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
\ start=+[bB]\=[rR]\z('''\|"""\)+ end="\z1" keepend
\ contains=pythonSpaceError,pythonDoctest,@Spell
" Unicode strings
syn region pythonString
\ matchgroup=pythonQuotes
\ start=+[uU]\z(['"]\)+
\ end="\z1"
\ skip="\\\\\|\\\z1"
\ contains=pythonEscape,pythonUnicodeEscape,@Spell
syn region pythonString
\ matchgroup=pythonTripleQuotes
\ start=+[uU]\z('''\|"""\)+
\ end="\z1"
\ keepend
\ contains=pythonEscape,pythonUnicodeEscape,pythonSpaceError,pythonDoctest,@Spell
" Raw Unicode strings recognize Unicode escape sequences
" https://docs.python.org/2.7/reference/lexical_analysis.html#string-literals
syn region pythonRawString
\ matchgroup=pythonQuotes
\ start=+[uU][rR]\z(['"]\)+
\ end="\z1"
\ skip="\\\\\|\\\z1"
\ contains=pythonUnicodeEscape,@Spell
syn region pythonRawString
\ matchgroup=pythonTripleQuotes
\ start=+[uU][rR]\z('''\|"""\)+
\ end="\z1"
\ keepend
\ contains=pythonUnicodeEscape,pythonSpaceError,pythonDoctest,@Spell
syn match pythonEscape +\\[abfnrtv'"\\]+ contained
syn match pythonEscape "\\\o\{1,3}" contained
syn match pythonEscape "\\x\x\{2}" contained
syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
syn match pythonUnicodeEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
syn match pythonUnicodeEscape "\\N{\a\+\%(\s\a\+\)*}" contained
syn match pythonEscape "\\$"
" It is very important to understand all details before changing the
@ -320,6 +352,7 @@ hi def link pythonRawString String
hi def link pythonQuotes String
hi def link pythonTripleQuotes pythonQuotes
hi def link pythonEscape Special
hi def link pythonUnicodeEscape pythonEscape
if !exists("python_no_number_highlight")
hi def link pythonNumber Number
endif

View File

@ -0,0 +1,20 @@
>#+0#0000e05#ffffff0| |S|t|r|i|n|g| |l|i|t|e|r|a|l|s| +0#0000000&@57
|#+0#0000e05&| |h|t@1|p|s|:|/@1|d|o|c|s|.|p|y|t|h|o|n|.|o|r|g|/|2|/|r|e|f|e|r|e|n|c|e|/|l|e|x|i|c|a|l|_|a|n|a|l|y|s|i|s|.|h|t|m|l|#|s|t|r|i|n|g|-|l|i|t|e|r|a|l|s
| +0#0000000&@74
|#+0#0000e05&| |S|t|r|i|n|g|s|:| |S|o|u|r|c|e| |e|n|c|o|d|i|n|g|,| |n|o| |U|n|i|c|o|d|e| |e|s|c|a|p|e| |s|e|q|u|e|n|c|e|s| +0#0000000&@19
|t|e|s|t| |=| |'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@29
|t|e|s|t| |=| |"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@32
|t|e|s|t| |=| |'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T|I
|O|N| |M|A|R|K|}|'| +0#0000000&@65
|t|e|s|t| |=| |"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@20
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |'+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|t|e|s|t| |=| |"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
@75
|#+0#0000e05&| |R|a|w| |s|t|r|i|n|g|s| +0#0000000&@61
|t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
@57|1|,|1| @10|T|o|p|

View File

@ -0,0 +1,20 @@
|t+0&#ffffff0|e|s|t| |=| |"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
@75
|#+0#0000e05&| |R|a|w| |s|t|r|i|n|g|s| +0#0000000&@61
>t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
|t|e|s|t| |=| |R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27
|t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L
|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60
|t|e|s|t| |=| |R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |r+0#e000002&|'@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|t|e|s|t| |=| |R+0#e000002&|"@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
@75
|#+0#0000e05&| |B|-|s|t|r|i|n|g|s|:| |P|r|e|f|i|x| |i|s| |a|l@1|o|w|e|d| |b|u|t| |i|g|n|o|r|e|d| |(|h|t@1|p|s|:|/@1|p|e|p|s|.|p|y|t|h|o|n|.|o|r|g|/|p|e|p|-|@+0#4040ff13&@2
| +0#0000000&@56|1|8|,|1| @9|1|8|%|

View File

@ -0,0 +1,20 @@
|#+0#0000e05#ffffff0| |B|-|s|t|r|i|n|g|s|:| |P|r|e|f|i|x| |i|s| |a|l@1|o|w|e|d| |b|u|t| |i|g|n|o|r|e|d| |(|h|t@1|p|s|:|/@1|p|e|p|s|.|p|y|t|h|o|n|.|o|r|g|/|p|e|p|-|3|1@1
|2|)| +0#0000000&@72
|t|e|s|t| |=| |b+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@28
|t|e|s|t| |=| |B+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@31
|t|e|s|t| |=| |b+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T
|I|O|N| |M|A|R|K|}|'| +0#0000000&@64
>t|e|s|t| |=| |B+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@19
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |b+0#e000002&|'@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|t|e|s|t| |=| |B+0#e000002&|"@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
@75
|#+0#0000e05&| |R|a|w| |b|-|s|t|r|i|n|g|s| +0#0000000&@59
|t|e|s|t| |=| |b+0#e000002&|r|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@23
|t|e|s|t| |=| |b+0#e000002&|R|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@26
|t|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |@+0#4040ff13&@2
| +0#0000000&@56|3|4|,|1| @9|4|3|%|

View File

@ -0,0 +1,20 @@
|t+0&#ffffff0|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C
|L|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@59
|t|e|s|t| |=| |B+0#e000002&|R|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@12
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |b+0#e000002&|r|'@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@32
>a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|t|e|s|t| |=| |B+0#e000002&|R|"@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@32
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
@75
|#+0#0000e05&| |U|n|i|c|o|d|e| |s|t|r|i|n|g|s| +0#0000000&@57
|t|e|s|t| |=| |u+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@28
|t|e|s|t| |=| |U+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@31
|t|e|s|t| |=| |u+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T
|I|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@64
|t|e|s|t| |=| |U+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@19
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |u+0#e000002&|'@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
@57|5|0|,|1| @9|6|9|%|

View File

@ -0,0 +1,20 @@
|t+0&#ffffff0|e|s|t| |=| |u+0#e000002&|'@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|t|e|s|t| |=| |U+0#e000002&|"@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
>a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
@75
|#+0#0000e05&| |R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g|s|:| |O|n|l|y| |U|n|i|c|o|d|e| |e|s|c|a|p|e| |s|e|q|u|e|n|c|e|s| +0#0000000&@22
|t|e|s|t| |=| |u+0#e000002&|r|'|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@15
|t|e|s|t| |=| |u+0#e000002&|R|"|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@18
|t|e|s|t| |=| |U+0#e000002&|r|'|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E
|R|T|E|D| |E|X|C|L|A|M|A|T|I|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@51
|t|e|s|t| |=| |U+0#e000002&|R|"|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@4
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |u+0#e000002&|r|'@2|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@24
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|t|e|s|t| |=| |U+0#e000002&|R|"@2|R|a|w| |U|n|i|c|o|d|e| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@24
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
@57|6|7|,|1| @9|9|5|%|

View File

@ -0,0 +1,20 @@
|a+0#e000002#ffffff0|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
@75
>#+0#0000e05&| |v|i|m|:| |s|y|n|t|a|x|=|p|y|t|h|o|n|2| +0#0000000&@53
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
| +0#0000000&@56|8|2|,|1| @9|B|o|t|

View File

@ -0,0 +1,20 @@
>#+0#0000e05#ffffff0| |S|t|r|i|n|g| |a|n|d| |B|y|t|e|s| |l|i|t|e|r|a|l|s| +0#0000000&@47
|#+0#0000e05&| |h|t@1|p|s|:|/@1|d|o|c|s|.|p|y|t|h|o|n|.|o|r|g|/|3|/|r|e|f|e|r|e|n|c|e|/|l|e|x|i|c|a|l|_|a|n|a|l|y|s|i|s|.|h|t|m|l|#|s|t|r|i|n|g|-|a|n|d|-|b|y|t|e
|s|-|l|i|t|e|r|a|l|s| +0#0000000&@64
@75
|#+0#0000e05&| |S|t|r|i|n|g|s| +0#0000000&@65
|t|e|s|t| |=| |'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@29
|t|e|s|t| |=| |"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@32
|t|e|s|t| |=| |'+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T|I
|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@65
|t|e|s|t| |=| |"+0#e000002&|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@20
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |'+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|t|e|s|t| |=| |"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
@75
|#+0#0000e05&| |R|a|w| |s|t|r|i|n|g|s| +0#0000000&@61
@57|1|,|1| @10|T|o|p|

View File

@ -0,0 +1,20 @@
|a+0#e000002#ffffff0|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|t|e|s|t| |=| |"+0#e000002&@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
@75
>#+0#0000e05&| |R|a|w| |s|t|r|i|n|g|s| +0#0000000&@61
|t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
|t|e|s|t| |=| |R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27
|t|e|s|t| |=| |r+0#e000002&|'|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L
|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60
|t|e|s|t| |=| |R+0#e000002&|"|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |r+0#e000002&|'@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|t|e|s|t| |=| |R+0#e000002&|"@2|R|a|w| |s|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
@75
@57|1|7|,|1| @9|1|5|%|

View File

@ -0,0 +1,20 @@
| +0&#ffffff0@74
|#+0#0000e05&| |B|y|t|e|s| +0#0000000&@67
|t|e|s|t| |=| |b+0#e000002&|'|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@29
|t|e|s|t| |=| |B+0#e000002&|"|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@32
|t|e|s|t| |=| |b+0#e000002&|'|B|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T|I
|O|N| |M|A|R|K|}|'| +0#0000000&@65
>t|e|s|t| |=| |B+0#e000002&|"|B|y|t|e|s| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@20
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |b+0#e000002&|'@2|B|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|t|e|s|t| |=| |B+0#e000002&|"@2|B|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@38
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
@75
|#+0#0000e05&| |R|a|w| |b|y|t|e|s| +0#0000000&@63
|t|e|s|t| |=| |b+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
|t|e|s|t| |=| |b+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27
|t|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|@+0#4040ff13&@2
| +0#0000000&@56|3|4|,|1| @9|3|8|%|

View File

@ -0,0 +1,20 @@
|t+0&#ffffff0|e|s|t| |=| |B+0#e000002&|r|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L
|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60
|t|e|s|t| |=| |B+0#e000002&|R|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |r+0#e000002&|b|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@24
>t|e|s|t| |=| |r+0#e000002&|B|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@27
|t|e|s|t| |=| |R+0#e000002&|b|'|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L
|A|M|A|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@60
|t|e|s|t| |=| |R+0#e000002&|B|"|R|a|w| |b|y|t|e|s| |w|i|t|h| |l|i|t|e|r|a|l| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@13
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |b+0#e000002&|r|'@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@38
|t|e|s|t| |=| |R+0#e000002&|B|"@2|R|a|w| |b|y|t|e|s| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@33
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |l|i|t|e|r|a|l| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|"@2| +0#0000000&@38
@75
|#+0#0000e05&| |U|n|i|c|o|d|e| |l|i|t|e|r|a|l|s|:| |P|r|e|f|i|x| |i|s| |a|l@1|o|w|e|d| |b|u|t| |i|g|n|o|r|e|d| |(|h|t@1|p|s|:|/@1|p|e|p|s|.|p|y|t|h|o|n|.|o|r|g|/
|p|e|p|-|0|4|1|4|)| +0#0000000&@65
@57|5|0|,|1| @9|6|0|%|

View File

@ -0,0 +1,20 @@
|#+0#0000e05#ffffff0| |U|n|i|c|o|d|e| |l|i|t|e|r|a|l|s|:| |P|r|e|f|i|x| |i|s| |a|l@1|o|w|e|d| |b|u|t| |i|g|n|o|r|e|d| |(|h|t@1|p|s|:|/@1|p|e|p|s|.|p|y|t|h|o|n|.|o|r|g|/
|p|e|p|-|0|4|1|4|)| +0#0000000&@65
|t|e|s|t| |=| |u+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@28
|t|e|s|t| |=| |U+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@31
|t|e|s|t| |=| |u+0#e000002&|'|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A|T
|I|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@64
>t|e|s|t| |=| |U+0#e000002&|"|S|t|r|i|n|g| |w|i|t|h| |e|s|c|a|p|e|d| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h| |a|n|d| |i|g|n|o|r|e|d| |\+0#e000e06&| +0#0000000&@19
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |u+0#e000002&|'@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|'+0#e000002&@2| +0#0000000&@38
|t|e|s|t| |=| |U+0#e000002&|"@2|S|t|r|i|n|g| |w|i|t|h| |q|u|o|t|e|s| |'| |a|n|d| |"| +0#0000000&@37
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@42
|a+0#e000002&|n|d| |e|s|c|a|p|e|s| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@38
@75
|#+0#0000e05&| |R|a|w| |U|n|i|c|o|d|e| |l|i|t|e|r|a|l|s| |a|r|e| |n|o|t| |a|l@1|o|w|e|d| +0#0000000&@36
|t|e|s|t| |=| |u|r+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|'| |a|n|d| |\|"| |a|n|d| |\|t|'| +0#0000000&@27
|t|e|s|t| |=| |u|R+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|0|4|0| |a|n|d| |\|x|F@1|"| +0#0000000&@30
|t|e|s|t| |=| |U|r+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|@+0#4040ff13&@2
| +0#0000000&@56|6|5|,|1| @9|8|1|%|

View File

@ -0,0 +1,20 @@
|t+0&#ffffff0|e|s|t| |=| |U|r+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5| |a|n|d| |\|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A
|T|I|O|N| |M|A|R|K|}|'| +0#0000000&@63
|t|e|s|t| |=| |U|R+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\@1| |b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\| +0#0000000&@16
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |r|u+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\+0#e000e06&|'| +0#e000002&|a|n|d| |\+0#e000e06&|"| +0#e000002&|a|n|d| |\+0#e000e06&|t|'+0#e000002&| +0#0000000&@27
>t|e|s|t| |=| |r|U+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1|"+0#e000002&| +0#0000000&@30
|t|e|s|t| |=| |R|u+0#e000002&|'|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5| +0#e000002&|a|n|d| |\+0#e000e06&|N|{|I|N|V|E|R|T|E|D| |E|X|C|L|A|M|A
|T|I|O|N| |M|A|R|K|}|'+0#e000002&| +0#0000000&@63
|t|e|s|t| |=| |R|U+0#e000002&|"|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |\+0#e000e06&@1| +0#e000002&|b|a|c|k|s|l|a|s|h|e|s| |a|n|d| |l|i|t|e|r|a|l| |\+0#e000e06&| +0#0000000&@16
|n+0#e000002&|e|w|l|i|n|e|"| +0#0000000&@66
|t|e|s|t| |=| |u|r+0#e000002&|'@2|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |'| |a|n|d| |"| +0#0000000&@35
|a+0#e000002&|n|d| |\|t| |a|n|d| |\|0|4|0| |a|n|d| |\|x|F@1| +0#0000000&@50
|a+0#e000002&|n|d| |\|u|0@1|A|1| |a|n|d| |\|U|0@2|1|0|6|0|5|'@2| +0#0000000&@46
|t|e|s|t| |=| |R|U+0#e000002&|"@2|I|n|v|a|l|i|d| |s|t|r|i|n|g| |w|i|t|h| |'| |a|n|d| |"| +0#0000000&@35
|a+0#e000002&|n|d| |\+0#e000e06&|t| +0#e000002&|a|n|d| |\+0#e000e06&|0|4|0| +0#e000002&|a|n|d| |\+0#e000e06&|x|F@1| +0#0000000&@50
|a+0#e000002&|n|d| |\+0#e000e06&|u|0@1|A|1| +0#e000002&|a|n|d| |\+0#e000e06&|U|0@2|1|0|6|0|5|"+0#e000002&@2| +0#0000000&@46
|~+0#4040ff13&| @73
|~| @73
|~| @73
| +0#0000000&@56|8|1|,|1| @9|B|o|t|

View File

@ -0,0 +1,82 @@
# String literals
# https://docs.python.org/2/reference/lexical_analysis.html#string-literals
# Strings: Source encoding, no Unicode escape sequences
test = 'String with escapes \' and \" and \t'
test = "String with escapes \040 and \xFF"
test = 'String with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = "String with escaped \\ backslash and ignored \
newline"
test = '''String with quotes ' and "
and escapes \t and \040 and \xFF
and literal \u00A1 and \U00010605'''
test = """String with quotes ' and "
and escapes \t and \040 and \xFF
and literal \u00A1 and \U00010605"""
# Raw strings
test = r'Raw string with literal \' and \" and \t'
test = R"Raw string with literal \040 and \xFF"
test = r'Raw string with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = R"Raw string with literal \\ backslashes and literal \
newline"
test = r'''Raw string with quotes ' and "
and literal \t and \040 and \xFF
and literal \u00A1 and \U00010605'''
test = R"""Raw string with quotes ' and "
and literal \t and \040 and \xFF
and literal \u00A1 and \U00010605"""
# B-strings: Prefix is allowed but ignored (https://peps.python.org/pep-3112)
test = b'String with escapes \' and \" and \t'
test = B"String with escapes \040 and \xFF"
test = b'String with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = B"String with escaped \\ backslash and ignored \
newline"
test = b'''String with quotes ' and "
and escapes \t and \040 and \xFF
and literal \u00A1 and \U00010605'''
test = B"""String with quotes ' and "
and escapes \t and \040 and \xFF
and literal \u00A1 and \U00010605"""
# Raw b-strings
test = br'Raw string with literal \' and \" and \t'
test = bR"Raw string with literal \040 and \xFF"
test = Br'Raw string with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = BR"Raw string with literal \\ backslashes and literal \
newline"
test = br'''Raw string with quotes ' and "
and literal \t and \040 and \xFF
and literal \u00A1 and \U00010605'''
test = BR"""Raw string with quotes ' and "
and literal \t and \040 and \xFF
and literal \u00A1 and \U00010605"""
# Unicode strings
test = u'String with escapes \' and \" and \t'
test = U"String with escapes \040 and \xFF"
test = u'String with escapes \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = U"String with escaped \\ backslash and ignored \
newline"
test = u'''String with quotes ' and "
and escapes \t and \040 and \xFF
and escapes \u00A1 and \U00010605'''
test = U"""String with quotes ' and "
and escapes \t and \040 and \xFF
and escapes \u00A1 and \U00010605"""
# Raw Unicode strings: Only Unicode escape sequences
test = ur'Raw Unicode string with literal \' and \" and \t'
test = uR"Raw Unicode string with literal \040 and \xFF"
test = Ur'Raw Unicode string with escapes \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = UR"Raw Unicode string with literal \\ backslashes and literal \
newline"
test = ur'''Raw Unicode string with quotes ' and "
and literal \t and \040 and \xFF
and escapes \u00A1 and \U00010605'''
test = UR"""Raw Unicode string with quotes ' and "
and literal \t and \040 and \xFF
and escapes \u00A1 and \U00010605"""
# vim: syntax=python2

View File

@ -0,0 +1,90 @@
# String and Bytes literals
# https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
# Strings
test = 'String with escapes \' and \" and \t'
test = "String with escapes \040 and \xFF"
test = 'String with escapes \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = "String with escaped \\ backslash and ignored \
newline"
test = '''String with quotes ' and "
and escapes \t and \040 and \xFF
and escapes \u00A1 and \U00010605'''
test = """String with quotes ' and "
and escapes \t and \040 and \xFF
and escapes \u00A1 and \U00010605"""
# Raw strings
test = r'Raw string with literal \' and \" and \t'
test = R"Raw string with literal \040 and \xFF"
test = r'Raw string with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = R"Raw string with literal \\ backslashes and literal \
newline"
test = r'''Raw string with quotes ' and "
and literal \t and \040 and \xFF
and literal \u00A1 and \U00010605'''
test = R"""Raw string with quotes ' and "
and literal \t and \040 and \xFF
and literal \u00A1 and \U00010605"""
# Bytes
test = b'Bytes with escapes \' and \" and \t'
test = B"Bytes with escapes \040 and \xFF"
test = b'Bytes with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = B"Bytes with escaped \\ backslash and ignored \
newline"
test = b'''Bytes with quotes ' and "
and escapes \t and \040 and \xFF
and literal \u00A1 and \U00010605'''
test = B"""Bytes with quotes ' and "
and escapes \t and \040 and \xFF
and literal \u00A1 and \U00010605"""
# Raw bytes
test = br'Raw bytes with literal \' and \" and \t'
test = bR"Raw bytes with literal \040 and \xFF"
test = Br'Raw bytes with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = BR"Raw bytes with literal \\ backslashes and literal \
newline"
test = rb'Raw bytes with literal \' and \" and \t'
test = rB"Raw bytes with literal \040 and \xFF"
test = Rb'Raw bytes with literal \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = RB"Raw bytes with literal \\ backslashes and literal \
newline"
test = br'''Raw bytes with quotes ' and "
and literal \t and \040 and \xFF
and literal \u00A1 and \U00010605'''
test = RB"""Raw bytes with quotes ' and "
and literal \t and \040 and \xFF
and literal \u00A1 and \U00010605"""
# Unicode literals: Prefix is allowed but ignored (https://peps.python.org/pep-0414)
test = u'String with escapes \' and \" and \t'
test = U"String with escapes \040 and \xFF"
test = u'String with escapes \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = U"String with escaped \\ backslash and ignored \
newline"
test = u'''String with quotes ' and "
and escapes \t and \040 and \xFF
and escapes \u00A1 and \U00010605'''
test = U"""String with quotes ' and "
and escapes \t and \040 and \xFF
and escapes \u00A1 and \U00010605"""
# Raw Unicode literals are not allowed
test = ur'Invalid string with \' and \" and \t'
test = uR"Invalid string with \040 and \xFF"
test = Ur'Invalid string with \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = UR"Invalid string with \\ backslashes and literal \
newline"
test = ru'Invalid string with \' and \" and \t'
test = rU"Invalid string with \040 and \xFF"
test = Ru'Invalid string with \u00A1 and \U00010605 and \N{INVERTED EXCLAMATION MARK}'
test = RU"Invalid string with \\ backslashes and literal \
newline"
test = ur'''Invalid string with ' and "
and \t and \040 and \xFF
and \u00A1 and \U00010605'''
test = RU"""Invalid string with ' and "
and \t and \040 and \xFF
and \u00A1 and \U00010605"""

0
runtime/syntax/testdir/input/sh_ksh_array.sh Executable file → Normal file
View File

View File

@ -2365,13 +2365,7 @@ static struct vimoption options[] =
{(char_u *)"", (char_u *)0L} SCTX_INIT},
{"showcmd", "sc", P_BOOL|P_VIM,
(char_u *)&p_sc, PV_NONE, NULL, NULL,
{(char_u *)FALSE,
#ifdef UNIX
(char_u *)FALSE
#else
(char_u *)TRUE
#endif
} SCTX_INIT},
{(char_u *)FALSE, (char_u *)TRUE} SCTX_INIT},
{"showcmdloc", "sloc", P_STRING|P_RSTAT,
(char_u *)&p_sloc, PV_NONE, did_set_showcmdloc, expand_set_showcmdloc,
{(char_u *)"last", (char_u *)"last"} SCTX_INIT},

View File

@ -6570,7 +6570,7 @@ RealWaitForChar(int fd, long msec, int *check_for_gpm UNUSED, int *interrupted)
if (wayland_may_restore_connection())
{
wayland_idx = nfd;
fds[nfd].fd = vwl_display_fd;
fds[nfd].fd = wayland_display_fd;
fds[nfd].events = POLLIN;
nfd++;
}

View File

@ -273,7 +273,7 @@ $(PACKAGE).pot: $(PO_INPUTLIST) $(PO_VIM_INPUTLIST)
$(VIMPROG) -u NONE --not-a-term -S fixfilenames.vim $(PACKAGE).pot \
$(PO_VIM_INPUTLIST)
# Delete the temporary files.
rm -f *.js ./vim_to_js
rm -f *.js ./vim_to_js allfiles
vim.desktop: vim.desktop.in $(POFILES)
echo $(LANGUAGES) | tr " " "\n" |$(SED) -e '/\./d' | sort > LINGUAS

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-07-14 22:09+0200\n"
"POT-Creation-Date: 2025-07-15 21:50+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -4257,327 +4257,327 @@ msgstr ""
msgid "%s (%s, compiled %s)"
msgstr ""
#: ../version.c:4022
#: ../version.c:4038
msgid ""
"\n"
"MS-Windows ARM64 GUI/console version"
msgstr ""
#: ../version.c:4024
#: ../version.c:4040
msgid ""
"\n"
"MS-Windows 64-bit GUI/console version"
msgstr ""
#: ../version.c:4027
#: ../version.c:4043
msgid ""
"\n"
"MS-Windows 32-bit GUI/console version"
msgstr ""
#: ../version.c:4032
#: ../version.c:4048
msgid ""
"\n"
"MS-Windows ARM64 GUI version"
msgstr ""
#: ../version.c:4034
#: ../version.c:4050
msgid ""
"\n"
"MS-Windows 64-bit GUI version"
msgstr ""
#: ../version.c:4037
#: ../version.c:4053
msgid ""
"\n"
"MS-Windows 32-bit GUI version"
msgstr ""
#: ../version.c:4041
#: ../version.c:4057
msgid " with OLE support"
msgstr ""
#: ../version.c:4046
#: ../version.c:4062
msgid ""
"\n"
"MS-Windows ARM64 console version"
msgstr ""
#: ../version.c:4048
#: ../version.c:4064
msgid ""
"\n"
"MS-Windows 64-bit console version"
msgstr ""
#: ../version.c:4051
#: ../version.c:4067
msgid ""
"\n"
"MS-Windows 32-bit console version"
msgstr ""
#: ../version.c:4057
#: ../version.c:4073
msgid ""
"\n"
"macOS version"
msgstr ""
#: ../version.c:4059
#: ../version.c:4075
msgid ""
"\n"
"macOS version w/o darwin feat."
msgstr ""
#: ../version.c:4069
#: ../version.c:4085
msgid ""
"\n"
"OpenVMS version"
msgstr ""
#: ../version.c:4084
#: ../version.c:4100
msgid ""
"\n"
"Included patches: "
msgstr ""
#: ../version.c:4109
#: ../version.c:4125
msgid ""
"\n"
"Extra patches: "
msgstr ""
#: ../version.c:4121 ../version.c:4432
#: ../version.c:4137 ../version.c:4448
msgid "Modified by "
msgstr ""
#: ../version.c:4128
#: ../version.c:4144
msgid ""
"\n"
"Compiled "
msgstr ""
#: ../version.c:4131
#: ../version.c:4147
msgid "by "
msgstr ""
#: ../version.c:4143
#: ../version.c:4159
msgid ""
"\n"
"Huge version "
msgstr ""
#: ../version.c:4145
#: ../version.c:4161
msgid ""
"\n"
"Normal version "
msgstr ""
#: ../version.c:4147
#: ../version.c:4163
msgid ""
"\n"
"Tiny version "
msgstr ""
#: ../version.c:4150
#: ../version.c:4166
msgid "without GUI."
msgstr ""
#: ../version.c:4153
#: ../version.c:4169
msgid "with GTK3 GUI."
msgstr ""
#: ../version.c:4155
#: ../version.c:4171
msgid "with GTK2-GNOME GUI."
msgstr ""
#: ../version.c:4157
#: ../version.c:4173
msgid "with GTK2 GUI."
msgstr ""
#: ../version.c:4160
#: ../version.c:4176
msgid "with X11-Motif GUI."
msgstr ""
#: ../version.c:4162
#: ../version.c:4178
msgid "with Haiku GUI."
msgstr ""
#: ../version.c:4164
#: ../version.c:4180
msgid "with Photon GUI."
msgstr ""
#: ../version.c:4166
#: ../version.c:4182
msgid "with GUI."
msgstr ""
#: ../version.c:4168
#: ../version.c:4184
msgid " Features included (+) or not (-):\n"
msgstr ""
#: ../version.c:4175
#: ../version.c:4191
msgid " system vimrc file: \""
msgstr ""
#: ../version.c:4180
#: ../version.c:4196
msgid " user vimrc file: \""
msgstr ""
#: ../version.c:4185
#: ../version.c:4201
msgid " 2nd user vimrc file: \""
msgstr ""
#: ../version.c:4190 ../version.c:4197 ../version.c:4201
#: ../version.c:4206 ../version.c:4213 ../version.c:4217
msgid " 3rd user vimrc file: \""
msgstr ""
#: ../version.c:4193
#: ../version.c:4209
msgid " 4th user vimrc file: \""
msgstr ""
#: ../version.c:4206
#: ../version.c:4222
msgid " user exrc file: \""
msgstr ""
#: ../version.c:4211
#: ../version.c:4227
msgid " 2nd user exrc file: \""
msgstr ""
#: ../version.c:4217
#: ../version.c:4233
msgid " system gvimrc file: \""
msgstr ""
#: ../version.c:4221
#: ../version.c:4237
msgid " user gvimrc file: \""
msgstr ""
#: ../version.c:4225
#: ../version.c:4241
msgid "2nd user gvimrc file: \""
msgstr ""
#: ../version.c:4230
#: ../version.c:4246
msgid "3rd user gvimrc file: \""
msgstr ""
#: ../version.c:4235
#: ../version.c:4251
msgid " defaults file: \""
msgstr ""
#: ../version.c:4240
#: ../version.c:4256
msgid " system menu file: \""
msgstr ""
#: ../version.c:4248
#: ../version.c:4264
msgid " fall-back for $VIM: \""
msgstr ""
#: ../version.c:4254
#: ../version.c:4270
msgid " f-b for $VIMRUNTIME: \""
msgstr ""
#: ../version.c:4258
#: ../version.c:4274
msgid "Compilation: "
msgstr ""
#: ../version.c:4264
#: ../version.c:4280
msgid "Compiler: "
msgstr ""
#: ../version.c:4269
#: ../version.c:4285
msgid "Linking: "
msgstr ""
#: ../version.c:4274
#: ../version.c:4290
msgid " DEBUG BUILD"
msgstr ""
#: ../version.c:4310
#: ../version.c:4326
msgid "VIM - Vi IMproved"
msgstr ""
#: ../version.c:4312
#: ../version.c:4328
msgid "version "
msgstr ""
#: ../version.c:4313
#: ../version.c:4329
msgid "by Bram Moolenaar et al."
msgstr ""
#: ../version.c:4317
#: ../version.c:4333
msgid "Vim is open source and freely distributable"
msgstr ""
#: ../version.c:4319
#: ../version.c:4335
msgid "Help poor children in Uganda!"
msgstr ""
#: ../version.c:4320
#: ../version.c:4336
msgid "type :help iccf<Enter> for information "
msgstr ""
#: ../version.c:4322
#: ../version.c:4338
msgid "type :q<Enter> to exit "
msgstr ""
#: ../version.c:4323
#: ../version.c:4339
msgid "type :help<Enter> or <F1> for on-line help"
msgstr ""
#: ../version.c:4324
#: ../version.c:4340
msgid "type :help version9<Enter> for version info"
msgstr ""
#: ../version.c:4327
#: ../version.c:4343
msgid "Running in Vi compatible mode"
msgstr ""
#: ../version.c:4328
#: ../version.c:4344
msgid "type :set nocp<Enter> for Vim defaults"
msgstr ""
#: ../version.c:4329
#: ../version.c:4345
msgid "type :help cp-default<Enter> for info on this"
msgstr ""
#: ../version.c:4344
#: ../version.c:4360
msgid "menu Help->Orphans for information "
msgstr ""
#: ../version.c:4346
#: ../version.c:4362
msgid "Running modeless, typed text is inserted"
msgstr ""
#: ../version.c:4347
#: ../version.c:4363
msgid "menu Edit->Global Settings->Toggle Insert Mode "
msgstr ""
#: ../version.c:4348
#: ../version.c:4364
msgid " for two modes "
msgstr ""
#: ../version.c:4352
#: ../version.c:4368
msgid "menu Edit->Global Settings->Toggle Vi Compatible"
msgstr ""
#: ../version.c:4353
#: ../version.c:4369
msgid " for Vim defaults "
msgstr ""
#: ../version.c:4394
#: ../version.c:4410
msgid "Sponsor Vim development!"
msgstr ""
#: ../version.c:4395
#: ../version.c:4411
msgid "Become a registered Vim user!"
msgstr ""
#: ../version.c:4398
#: ../version.c:4414
msgid "type :help sponsor<Enter> for information "
msgstr ""
#: ../version.c:4399
#: ../version.c:4415
msgid "type :help register<Enter> for information "
msgstr ""
#: ../version.c:4401
#: ../version.c:4417
msgid "menu Help->Sponsor/Register for information "
msgstr ""
@ -4597,7 +4597,7 @@ msgstr ""
msgid "tab"
msgstr ""
#: ../vim9expr.c:1919
#: ../vim9expr.c:1924
msgid "[end of lines]"
msgstr ""
@ -4741,12 +4741,12 @@ msgstr ""
msgid "wayland protocol error -> "
msgstr ""
#: ../wayland.c:2461
#: ../wayland.c:2463
#, c-format
msgid "restoring Wayland display %s"
msgstr ""
#: ../wayland.c:2468
#: ../wayland.c:2470
msgid "failed restoring, lost connection to Wayland display"
msgstr ""
@ -13566,6 +13566,6 @@ msgstr ""
msgid "options for using tabpanel"
msgstr ""
#: ../../runtime/defaults.vim:129
#: ../../runtime/defaults.vim:128
msgid "You discovered the command-line window! You can close it with \":q\"."
msgstr ""

View File

@ -245,6 +245,7 @@ NEW_TESTS = \
test_plugin_helptoc \
test_plugin_man \
test_plugin_matchparen \
test_plugin_tar \
test_plugin_termdebug \
test_plugin_tohtml \
test_plugin_tutor \
@ -517,6 +518,7 @@ NEW_TESTS_RES = \
test_plugin_helptoc.res \
test_plugin_man.res \
test_plugin_matchparen.res \
test_plugin_tar.res \
test_plugin_termdebug.res \
test_plugin_tohtml.res \
test_plugin_tutor.res \

View File

@ -0,0 +1,8 @@
> +0&#ffffff0@74
|~+0#4040ff13&| @73
|~| @73
|~| @73
|~| @73
|~| @73
|~| @73
|<+0#0000000&|x@53|"| |0|L|,| |0|B| @11

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -184,10 +184,13 @@ func Test_edit_long_file_name()
let longName = 'x'->repeat(min([&columns, 255]))
call writefile([], longName, 'D')
let buf = RunVimInTerminal('-N -u NONE ' .. longName, #{rows: 8})
let buf = RunVimInTerminal('-N -u NONE --cmd ":set noshowcmd" ' .. longName, #{rows: 8})
call VerifyScreenDump(buf, 'Test_long_file_name_1', {})
call term_sendkeys(buf, ":set showcmd\<cr>:e!\<cr>")
call VerifyScreenDump(buf, 'Test_long_file_name_2', {})
" clean up
call StopVimInTerminal(buf)
endfunc

View File

@ -285,6 +285,7 @@ def s:GetFilenameChecks(): dict<list<string>>
faust: ['file.dsp', 'file.lib'],
fennel: ['file.fnl', '.fennelrc', 'fennelrc'],
fetchmail: ['.fetchmailrc'],
fga: ['file.fga'],
fgl: ['file.4gl', 'file.4gh', 'file.m4gl'],
firrtl: ['file.fir'],
fish: ['file.fish'],
@ -604,6 +605,7 @@ def s:GetFilenameChecks(): dict<list<string>>
pilrc: ['file.rcp'],
pine: ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
pinfo: ['/etc/pinforc', '/.pinforc', 'any/.pinforc', 'any/etc/pinforc'],
pkl: ['file.pkl'],
pli: ['file.pli', 'file.pl1'],
plm: ['file.plm', 'file.p36', 'file.pac'],
plp: ['file.plp'],

View File

@ -2907,4 +2907,15 @@ func Test_default_keyprotocol()
call assert_equal('kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty,xterm:mok2', &keyprotocol)
endfunc
func Test_showcmd()
" in no-cp mode, 'showcmd' is enabled
let _cp=&cp
call assert_equal(1, &showcmd)
set cp
call assert_equal(0, &showcmd)
set nocp
call assert_equal(1, &showcmd)
let &cp = _cp
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@ -0,0 +1,128 @@
vim9script
CheckExecutable tar
CheckNotMSWindows
runtime plugin/tarPlugin.vim
def CopyFile(source: string)
if !filecopy($"samples/{source}", "X.tar")
assert_report($"Can't copy samples/{source}")
endif
enddef
def g:Test_tar_basic()
CopyFile("sample.tar")
defer delete("X.tar")
defer delete("./testtar", 'rf')
e X.tar
### Check header
assert_match('^" tar\.vim version v\d\+', getline(1))
assert_match('^" Browsing tarfile .*/X.tar', getline(2))
assert_match('^" Select a file with cursor and press ENTER, "x" to extract a file', getline(3))
assert_match('^$', getline(4))
assert_match('testtar/', getline(5))
assert_match('testtar/file1.txt', getline(6))
### Check ENTER on header
:1
exe ":normal \<cr>"
assert_equal("X.tar", @%)
### Check ENTER on file
:6
exe ":normal \<cr>"
assert_equal("tarfile::testtar/file1.txt", @%)
### Check editing file
### Note: deleting entries not supported on BSD
if has("mac")
return
endif
if has("bsd")
return
endif
s/.*/some-content/
assert_equal("some-content", getline(1))
w!
assert_equal("tarfile::testtar/file1.txt", @%)
bw!
close
bw!
e X.tar
:6
exe "normal \<cr>"
assert_equal("some-content", getline(1))
bw!
close
### Check extracting file
:5
normal x
assert_true(filereadable("./testtar/file1.txt"))
bw!
enddef
def g:Test_tar_evil()
CopyFile("evil.tar")
defer delete("X.tar")
defer delete("./etc", 'rf')
e X.tar
### Check header
assert_match('^" tar\.vim version v\d\+', getline(1))
assert_match('^" Browsing tarfile .*/X.tar', getline(2))
assert_match('^" Select a file with cursor and press ENTER, "x" to extract a file', getline(3))
assert_match('^" Note: Path Traversal Attack detected', getline(4))
assert_match('^$', getline(5))
assert_match('/etc/ax-pwn', getline(6))
### Check ENTER on header
:1
exe ":normal \<cr>"
assert_equal("X.tar", @%)
assert_equal(1, b:leading_slash)
### Check ENTER on file
:6
exe ":normal \<cr>"
assert_equal(1, b:leading_slash)
assert_equal("tarfile::/etc/ax-pwn", @%)
### Check editing file
### Note: deleting entries not supported on BSD
if has("mac")
return
endif
if has("bsd")
return
endif
s/.*/none/
assert_equal("none", getline(1))
w!
assert_equal(1, b:leading_slash)
assert_equal("tarfile::/etc/ax-pwn", @%)
bw!
close
bw!
# Writing was aborted
e X.tar
assert_match('^" Note: Path Traversal Attack detected', getline(4))
:6
exe "normal \<cr>"
assert_equal("something", getline(1))
bw!
close
### Check extracting file
:5
normal x
assert_true(filereadable("./etc/ax-pwn"))
bw!
enddef

View File

@ -1,21 +1,23 @@
vim9script
CheckExecutable unzip
if 0 " Find uncovered line
if 0 # Find uncovered line
profile start zip_profile
profile! file */zip*.vim
endif
runtime plugin/zipPlugin.vim
def Test_zip_basic()
### get our zip file
if !filecopy("samples/test.zip", "X.zip")
assert_report("Can't copy samples/test.zip")
return
def CopyZipFile(source: string)
if !filecopy($"samples/{source}", "X.zip")
assert_report($"Can't copy samples/{source}.zip")
endif
defer delete("X.zip")
enddef
def g:Test_zip_basic()
CopyZipFile("test.zip")
defer delete("X.zip")
e X.zip
### Check header
@ -136,15 +138,11 @@ def Test_zip_basic()
bw
enddef
def Test_zip_glob_fname()
def g:Test_zip_glob_fname()
CheckNotMSWindows
# does not work on Windows, why?
### copy sample zip file
if !filecopy("samples/testa.zip", "X.zip")
assert_report("Can't copy samples/testa.zip")
return
endif
CopyZipFile("testa.zip")
defer delete("X.zip")
defer delete('zipglob', 'rf')
@ -234,14 +232,11 @@ def Test_zip_glob_fname()
bw
enddef
def Test_zip_fname_leading_hyphen()
def g:Test_zip_fname_leading_hyphen()
CheckNotMSWindows
### copy sample zip file
if !filecopy("samples/poc.zip", "X.zip")
assert_report("Can't copy samples/poc.zip")
return
endif
CopyZipFile("poc.zip")
defer delete("X.zip")
defer delete('-d', 'rf')
defer delete('/tmp/pwned', 'rf')
@ -256,3 +251,26 @@ def Test_zip_fname_leading_hyphen()
assert_false(filereadable('/tmp/pwned'))
bw
enddef
def g:Test_zip_fname_evil_path()
CheckNotMSWindows
# needed for writing the zip file
CheckExecutable zip
CopyZipFile("evil.zip")
defer delete("X.zip")
e X.zip
:1
var fname = 'pwn'
search('\V' .. fname)
normal x
assert_false(filereadable('/etc/ax-pwn'))
var mess = execute(':mess')
assert_match('Path Traversal Attack', mess)
exe ":normal \<cr>"
:w
assert_match('zipfile://.*::etc/ax-pwn', @%)
bw
enddef

View File

@ -3875,4 +3875,131 @@ def Test_disassemble_assign_tuple_set_type()
unlet g:instr
enddef
" Disassemble the code generated for a has() function call
def Test_disassemble_has_shortcircuit()
# true && false condition check
var lines =<< trim END
vim9script
def Fn(): string
if has('jumplist') && has('foobar')
return 'present'
endif
return 'missing'
enddef
g:instr = execute('disassemble Fn')
END
v9.CheckScriptSuccess(lines)
assert_match('<SNR>\d\+_Fn\_s*' ..
'if has(''jumplist'') && has(''foobar'')\_s*' ..
'return ''present''\_s*' ..
'endif\_s*' ..
'return ''missing''\_s*' ..
'0 PUSHS "missing"\_s*' ..
'1 RETURN', g:instr)
# false && true condition check
lines =<< trim END
vim9script
def Fn(): string
if has('foobar') && has('jumplist')
return 'present'
endif
return 'missing'
enddef
g:instr = execute('disassemble Fn')
END
v9.CheckScriptSuccess(lines)
assert_match('<SNR>\d\+_Fn\_s*' ..
'if has(''foobar'') && has(''jumplist'')\_s*' ..
'return ''present''\_s*' ..
'endif\_s*' ..
'return ''missing''\_s*' ..
'0 PUSHS "missing"\_s*' ..
'1 RETURN', g:instr)
# false && false condition check
lines =<< trim END
vim9script
def Fn(): string
if has('foobar') && has('foobaz')
return 'present'
endif
return 'missing'
enddef
g:instr = execute('disassemble Fn')
END
v9.CheckScriptSuccess(lines)
assert_match('<SNR>\d\+_Fn\_s*' ..
'if has(''foobar'') && has(''foobaz'')\_s*' ..
'return ''present''\_s*' ..
'endif\_s*' ..
'return ''missing''\_s*' ..
'0 PUSHS "missing"\_s*' ..
'1 RETURN', g:instr)
# true || false condition check
lines =<< trim END
vim9script
def Fn(): string
if has('jumplist') || has('foobar')
return 'present'
endif
return 'missing'
enddef
g:instr = execute('disassemble Fn')
END
v9.CheckScriptSuccess(lines)
assert_match('<SNR>\d\+_Fn\_s*' ..
'if has(''jumplist'') || has(''foobar'')\_s*' ..
'return ''present''\_s*' ..
'0 PUSHS "present"\_s*' ..
'1 RETURN\_s*' ..
'endif\_s*' ..
'return ''missing''\_s*' ..
'2 PUSHS "missing"\_s*' ..
'3 RETURN', g:instr)
# false || true condition check
lines =<< trim END
vim9script
def Fn(): string
if has('foobar') || has('jumplist')
return 'present'
endif
return 'missing'
enddef
g:instr = execute('disassemble Fn')
END
v9.CheckScriptSuccess(lines)
assert_match('<SNR>\d\+_Fn\_s*' ..
'if has(''foobar'') || has(''jumplist'')\_s*' ..
'return ''present''\_s*' ..
'0 PUSHS "present"\_s*' ..
'1 RETURN\_s*' ..
'endif\_s*' ..
'return ''missing''\_s*' ..
'2 PUSHS "missing"\_s*' ..
'3 RETURN', g:instr)
# false || false condition check
lines =<< trim END
vim9script
def Fn(): string
if has('foobar') || has('foobaz')
return 'present'
endif
return 'missing'
enddef
g:instr = execute('disassemble Fn')
END
v9.CheckScriptSuccess(lines)
assert_match('<SNR>\d\+_Fn\_s*' ..
'if has(''foobar'') || has(''foobaz'')\_s*' ..
'return ''present''\_s*' ..
'endif\_s*' ..
'return ''missing''\_s*' ..
'0 PUSHS "missing"\_s*' ..
'1 RETURN', g:instr)
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker

View File

@ -5265,6 +5265,102 @@ def Test_method_call_with_list_arg()
v9.CheckSourceSuccess(lines)
enddef
" Test for using more than one has() check in a compound if condition.
def Test_has_func_shortcircuit()
def Has_And1_Cond(): string
# true && false
if has('jumplist') && has('foobar')
return 'present'
endif
return 'missing'
enddef
assert_equal('missing', Has_And1_Cond())
def Has_And2_Cond(): string
# false && true
if has('foobar') && has('jumplist')
return 'present'
endif
return 'missing'
enddef
assert_equal('missing', Has_And2_Cond())
def Has_And3_Cond(): string
# false && false
if has('foobar') && has('foobaz')
return 'present'
endif
return 'missing'
enddef
assert_equal('missing', Has_And3_Cond())
def Has_Or1_Cond(): string
# true || false
if has('jumplist') || has('foobar')
return 'present'
endif
return 'missing'
enddef
assert_equal('present', Has_Or1_Cond())
def Has_Or2_Cond(): string
# false || true
if has('foobar') || has('jumplist')
return 'present'
endif
return 'missing'
enddef
assert_equal('present', Has_Or2_Cond())
def Has_Or3_Cond(): string
# false || false
if has('foobar') || has('foobaz')
return 'present'
endif
return 'missing'
enddef
assert_equal('missing', Has_Or3_Cond())
enddef
" Test for using more than one len() function in a compound if condition.
def Test_len_func_shortcircuit()
def Len_And1_Cond(): string
# true && false
if len('xxx') == 3 && len('yyy') == 2
return 'match'
endif
return 'nomatch'
enddef
assert_equal('nomatch', Len_And1_Cond())
def Len_And2_Cond(): string
# false && true
if len('xxx') == 2 && len('yyy') == 3
return 'match'
endif
return 'nomatch'
enddef
assert_equal('nomatch', Len_And2_Cond())
def Len_Or1_Cond(): string
# true || false
if len('xxx') == 3 || len('yyy') == 2
return 'match'
endif
return 'nomatch'
enddef
assert_equal('match', Len_Or1_Cond())
def Len_Or2_Cond(): string
# false || true
if len('xxx') == 2 || len('yyy') == 3
return 'match'
endif
return 'nomatch'
enddef
assert_equal('match', Len_Or2_Cond())
enddef
" Keep this last, it messes up highlighting.
def Test_substitute_cmd()
new

View File

@ -719,6 +719,22 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1552,
/**/
1551,
/**/
1550,
/**/
1549,
/**/
1548,
/**/
1547,
/**/
1546,
/**/
1545,
/**/
1544,
/**/

View File

@ -1233,9 +1233,13 @@ compile_call(
&& ((is_has && !dynamic_feature(argvars[0].vval.v_string))
|| !is_has))
{
typval_T *tv = &ppconst->pp_tv[ppconst->pp_used];
*arg = s + 1;
if (cctx->ctx_skip != SKIP_YES)
{
typval_T *tv = &ppconst->pp_tv[ppconst->pp_used];
argvars[1].v_type = VAR_UNKNOWN;
tv->v_type = VAR_NUMBER;
tv->vval.v_number = 0;
@ -1245,8 +1249,9 @@ compile_call(
f_len(argvars, tv);
else
f_exists(argvars, tv);
clear_tv(&argvars[0]);
++ppconst->pp_used;
}
clear_tv(&argvars[0]);
return OK;
}
clear_tv(&argvars[0]);

View File

@ -603,7 +603,9 @@ vwl_log_handler(const char *fmt, va_list args)
// Remove newline that libwayland puts
buf[STRLEN(buf) - 1] = NUL;
#ifdef FEAT_EVAL
ch_log(NULL, "%s", buf);
#endif
emsg(buf);
vim_free(buf);